[Implemented] IDE: open file under cursor

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

[Implemented] IDE: open file under cursor

Post 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)
freak
PureBasic Team
PureBasic Team
Posts: 5953
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Try a doubleclick ;)
quidquid Latine dictum sit altum videtur
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

heh.. (I say embarrassingly :oops:) - thanks alot freak
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post 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.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

It's a bit annoying as well when you double click several lines above and the file opens.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post 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.
horst
Enthusiast
Enthusiast
Posts: 197
Joined: Wed May 28, 2003 6:57 am
Location: Munich
Contact:

Post 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.
Horst.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

Thanks alot Horst - I tried it and it works very well - even with includes buried in folders. Great :D
Post Reply