Page 1 of 1
[Implemented] IDE: open file under cursor
Posted: Mon Aug 14, 2006 3:23 am
by mskuma
I think this hasn't been asked before.. it would be great to be able to right-mouse click under an include filename, and then an 'open <filename>' option would appear allowing the file to be easily opened in the editor, e.g.
(this is my mockup image)
Posted: Mon Aug 14, 2006 3:28 am
by freak
Try a doubleclick

Posted: Mon Aug 14, 2006 3:34 am
by mskuma
heh.. (I say embarrassingly

) - thanks alot freak
Posted: Mon Aug 14, 2006 9:31 am
by mskuma
On 2nd thought, I think it's worth considering this to make it easier for newbies to find, since double-clicking clicking on the term 'include' (rather than the filename itself) seems rather non-standard. A menu inclusion is seen in other IDEs.
Posted: Mon Aug 14, 2006 10:20 am
by Trond
It's a bit annoying as well when you double click several lines above and the file opens.
Posted: Tue Aug 22, 2006 1:30 am
by mskuma
freak wrote:Try a doubleclick

I've noticed this only works if the include file is in the same folder as the file you're editing. If the file is elsewhere, courtesy of includepath, nothing happens, i.e.
Code: Select all
XIncludeFile "file1.pb" ; works
IncludePath "includes"
XIncludeFile "file2.pb" ; doesn't open upon double-click
In any case, I still maintain it's better to have the sub-menu facility.
Posted: Tue Aug 22, 2006 7:35 am
by horst
mskuma wrote:..If the file is elsewhere, courtesy of includepath, nothing happens, ..
I wrote the InclOpen add-in to handle this (see my website):
If you press the assigned hotkey on an IncludeFile line, it will open the file. On any other line it will pop up a menu with all included files to select from.
Of course, IncludePath is taken into account, and #PB_Compiler_Home is evaluated.
Posted: Tue Aug 22, 2006 8:05 am
by mskuma
Thanks alot Horst - I tried it and it works very well - even with includes buried in folders. Great
