code-peek-atom icon indicating copy to clipboard operation
code-peek-atom copied to clipboard

#29 PL/SQL Support

Open martindsouza opened this issue 7 years ago • 10 comments

martindsouza avatar May 08 '17 21:05 martindsouza

Hey @martindsouza,

I'm personally not very familiar with Oracle SQL files. Can you add some test files in the testFiles folder that demonstrates what they look like and so I can verify it's working?

Thanks for doing this!

DFreds avatar May 09 '17 17:05 DFreds

@DFreds I've added some sample test files for Oracle. Please use oracle_plsql_test.pkb to test the oracle files (i.e. open that file and peak into what it references).

martindsouza avatar May 11 '17 14:05 martindsouza

I'll check this out tonight. Thanks for doing this!

DFreds avatar May 11 '17 20:05 DFreds

Hi @martindsouza,

Just checked this out. Doesn't seem to work right with the way code peek currently works (only showing the peeked function). Is Oracle inherently based on tabs or does it not matter? Code Peek currently expects tabs to mean something or else for curly brackets to mean something.

Anyway, I'm going to start working on the suggestion to show the whole file and just start at the peaked function. That will probably fix this problem, but I'm not going to merge it right now.

DFreds avatar May 11 '17 23:05 DFreds

@DFreds Hmmm it's working for me. Use testFiles/oracle_plsql_test_call.pkb to test the peek. Gif showing it working:

atom-peek

martindsouza avatar May 16 '17 04:05 martindsouza

Right. In the current version of code peek, it's not actually supposed to work that way. It's only supposed to show the peeked function. Basically, this is working because it doesn't know when the function stops. My pull request to always show the whole file and scroll down to where the function starts will fix that issue. It will basically behave the same way as what you're seeing, but now because it is supposed to. 👍

DFreds avatar May 16 '17 19:05 DFreds

Any progress/update on this?

tschf avatar Jul 15 '17 02:07 tschf

@tschf not sure. @DFreds any chance of getting this merged? Would really like to use in Atom.

martindsouza avatar Jul 15 '17 13:07 martindsouza

@DFreds I am also interested as per when this will get merged. Thanks.

bjshumway avatar Jul 27 '17 15:07 bjshumway

Like I said before, it doesn't actually work like everything else in Code Peek. Code Peek as originally intended is supposed to only show the peeked function and not the rest of the file. Basically, it only displays the start of the function to the end of the function.

This merge request always shows the whole file. Therefore, I will not merge it because it does not behave like the rest of the plugin.

However, after some discussion on a separate issue, it seemed that being able to see the whole file would actually be useful. The ideal behavior would be to have the whole file be available but automatically scroll to the line that has the start of the function you peeked.

I tried this but was unable to get the auto-scroll to the peeked function behavior. You can check out my WIP here: https://github.com/DFreds/code-peek-atom/pull/35

Feel free to help. Whenever that WIP finally works, then I'll merge this PR.

DFreds avatar Jul 27 '17 18:07 DFreds