Page 1 of 2

Alternative to procedure browser

Posted: Tue Nov 18, 2003 2:55 am
by PB
The procedure browser is great for quickly jumping to another section of
code, but not when you have dozens of procedures and have to scroll
through the browser to find the entry you want. :)

Would it be possible to right-click on a procedure call (in code) and have
a menu item pop-up like "Jump to procedure" ? This means I wouldn't
have to use the browser at all, but just right-click the procedure call in
my app to go to it. Shouldn't be too hard to implement, methinks? :)

Posted: Tue Nov 18, 2003 1:28 pm
by freak
http://freak.purearea.net/stuff/PureBasicIDE.zip

(a double-click on the name jumps to the procedure, just like with IncludeFile)

... that's got to be the fastest implementation of a feature request in PB's history 8)

Note: this is not *official* yet. I commited my changes to the CVS, but if the
other guys think this is a bad thing, it might as well be kicked out again.

Timo

Posted: Tue Nov 18, 2003 5:26 pm
by blueznl
hey, how about doing the same thing for structures? don't get me carried away! :-)

(euh, dear editor of japbe :-) are you watching? ;-))

one of the things that would be nice is a keyboard shortcut to return to the place that the cursor was at that moment, that would make this feature absof*ck*nglutely fantastic...

(whilst doing so, please a keyboard shortcut for this 'doubleclick jump' thingy as well, hint hint, gonna' love this!)

Posted: Tue Nov 18, 2003 6:31 pm
by GPI
I see only one Problem: What is, when the Procedure/Structure is not in the same file...

Posted: Tue Nov 18, 2003 6:32 pm
by Berikco
First bug report.

Does not work in multiple sources 8)


:twisted:

Posted: Tue Nov 18, 2003 6:34 pm
by Fred
F12 is the VisualC++ shortcut to jump to the declaration, so it could be used in PB too (if anyone doesn't have a better suggestion of course :-)

Posted: Tue Nov 18, 2003 7:43 pm
by freak
> I see only one Problem: What is, when the Procedure/Structure is not in the same file...

> Does not work in multiple sources

No Bug. Do you see the ProcedureBrowser display procedures of other sources?
This is an extension to the ProcedureBrowser, so... :wink:

Timo

Posted: Tue Nov 18, 2003 7:52 pm
by Berikco
freak wrote:> I see only one Problem: What is, when the Procedure/Structure is not in the same file...

> Does not work in multiple sources

No Bug. Do you see the ProcedureBrowser display procedures of other sources?
This is an extension to the ProcedureBrowser, so... :wink:

Timo
Hey, but it shoud be better :twisted:
We want multiple sources support :mrgreen:

Posted: Tue Nov 18, 2003 8:23 pm
by blueznl
no, i don't, i'm happy with one source... well... unless an include is opened etc... (got to think on this :-))

actually, as long as error reports with include files are wacko di dacko totally off, i keep on hard pasting my own libs in the code, so i don't mind too much it doesn't look in other sources

now if it would look in other sources, that *could* be cool but a little dangerous as well, what if multiple sources have the same name for a struct, for example, but different contents?

for the moment, i settle for one source :-) unless includes work properly, then i wouldn't mind looking through the includes related to the currently active source, perhaps even loading it into the editor? hmm... and then a key to jump back... hmm hmm hmm

takers?

Posted: Wed Nov 19, 2003 2:40 am
by PB
> http://freak.purearea.net/stuff/PureBasicIDE.zip

Thanks for doing that, Freak! :D

> This is an extension to the ProcedureBrowser

That's why I knew it wouldn't be hard to implement. ;)

Fred, please make this part of the official editor -- it's a BIG timesaver!

The only thing that worries me: if a double-click jumps to the procedure,
how can I then quickly select a procedure name for copying? Normally I'd
just double-click it (to select the name) then hit CTRL+C to copy it...

UPDATE: Never mind -- all I have to do is hold down Shift when doing the
double-click and the editor still selects the text properly. Woohoo! :)

Posted: Wed Nov 19, 2003 9:55 am
by Fred
It should be implemented while holding down 'CTRL' and double click, else you break the word select routine, as PB just mentionned it. It's done like this in several IDE (like IDEA for example)

Posted: Wed Nov 19, 2003 2:47 pm
by GPI
Fred wrote:F12 is the VisualC++ shortcut to jump to the declaration, so it could be used in PB too (if anyone doesn't have a better suggestion of course :-)
Bad idea.. I know F12 as "Save As" and i use it so in jaPBe...

I take the key F13 (Shift+F3), because F3=Find Next and F13=Find "Declaration".

Also double-Click with CTRL is a good idea...

Posted: Wed Nov 19, 2003 2:56 pm
by blueznl
F13? now *that* is a bad idea, many keyboards don't have an F13 :-) some laptops stop even at F10 (!)

i see three different functions...

- jump to struct or proc declaration
- mark jumppoint
- jump back to jumppoint

i don't know what function keys are currently in use... care to provide a list so i can make an educated suggestion? :-)

Posted: Wed Nov 19, 2003 4:49 pm
by GPI
F13 = Shift+F3!


jaPBe use this keys:
(strg=ctrl!)

Code: Select all

Alt + A ASCII Tabelle 
Alt + B Block Kommentar über die markierten Zeilen entfernen (auch Strg + Shift + B) 
Alt + D Alle Falten schließen 
Alt + F Öffnet das Suchen und Ersetzen Fenster. Trägt das Wort unter dem Cursor automatisch ein. 
Alt + I Include Anzeiger 
Alt + L Synch List 
Alt + P Farb auswählen 
Alt + S Strukturen Anzeiger 
Alt + hoch/runter Scrollt den Cursor Absatzweise hoch/runter. Ein Absatz wird durch eine Leerzeile definiert. 
Alt + links/rechts Cursor TeilWortweise bewegen 
Alt + F4 jaPBe beenden 
Alt + Pos1 Springt direkt an den Zeilenanfang 
Alt + Shift + D Alle Falten öffnen 
  
Einfg Wechseln zwischen Schreibmodus Einfügen und Überschreiben 
Esc Schließen der Dialog Fenster.
Deaktivieren des AutoComplete PopUps und schließen des Suchen und Ersetzen-Fensters, wenn es offen ist.  
  
F1 Hilfe zum Befehl welcher momentan unter dem Cursor steht 
F2 Restyle eines Bezeichners 
F3 Weitersuchen 
F5 Kompilieren des Quellcodes und Starten des Programms 
F6 Starten des zuletzt kompilierten Programms 
F12 Speichern unter ... 
  
Shift + Einfg Einfügen aus der Zwischenablage 
Shift + Entf Ausschneiden des markierten Textes in die Zwischenablage 
Shift + F1 Hilfe der in den CallTips gezeigten Prozedur 
Shift + F2 Update der Synch List 
Shift + Return Es wird nur die aktuelle Zeile syntaxgerecht eingerückt. Hierbei wird kein Zeilenumbruch gesetzt. 
Shift + Tab erniedrigen der Einrückung der aktuellen Zeile oder markierten Zeilen 
  
Strg + A Alles Auswählen 
Strg + B Block Kommentar über die markierten Zeilen einfügen 
Strg + C Kopieren des markierten Textes in die Zwischenablage 
Strg + D Falte schließen/öffnen 
Strg + F Suchen und Ersetzen 
Strg + G Gehe zu Zeile 
Strg + N Neue Datei 
Strg + O Datei Öffnen 
Strg + P Aufrufen der Einstellungen 
Strg + R Suchen und Ersetzen 
Strg + S Datei speichern 
Strg + V Einfügen aus der Zwischenablage 
Strg + W Datei schließen 
Strg + X Ausschneiden des markierten Textes in die Zwischenablage 
Strg + Y Redo (Wiederrufen des letzten Undos) 
Strg + Z Undo (Wiederrufen der letzten Textänderung) 
Strg + Alt + Links Wechselt zur vorherigen Datei 
Strg + Alt + Rechts Wechselt zur nächsten Datei 
Strg + Back Wortrest links löschen 
Strg + Einfg Kopieren des markierten Textes in die Zwischenablage 
Strg + Ende Setzt den Cursor an das Ende des Dokumentes 
Strg + Entf Wortrest rechts löschen 
Strg + F6 Wechselt zur nächsten offenen Datei 
Strg + Pos1 Setzt den Cursor an den Anfang des Dokumentes 
Strg + Return Verhindert das Einfügen des "End-Tags" bei Schlüsselwörtern Bei aktivem AutoComplete Übernahme des aktuell ausgewählten Eintrages 
Strg + hoch/runter Scrollt ohne den Cursor zu verschieben  
Strg + links/rechts Cursor Wortweise bewegen 
Strg + Shift + B Block Kommentar über die markierten Zeilen entfernen (auch Alt + B) 
Strg + Shift + Back Zeilenrest links löschen 
Strg + Shift + Entf Zeilenrest rechts löschen 
Strg + Shift + F6 Wechselt zur vorherigen Datei 
Strg + SeiteRauf Wechselt zur vorherigen Datei 
Strg + SeiteRunter Wechselt zur nächsten Datei 
Strg + Tab automatisches syntaxgerechtes Einrücken aller markierten Zeilen 
  
Pos1 Springt an das erste zeichen der Zeile, oder wenn es schon dort ist, an den Zeilenanfang.  
  
Tab Wenn Text markiert ist werden die markierten Linien eingerückt.
Wenn AutoComplete PopUp aktiv ist, wird die aktuelle Auswahl des AutoComplete PopUps übernommen.
In allen anderen Fällen verhält sich das Tab wie in jedem anderen Editor auch. 

Posted: Wed Nov 19, 2003 7:20 pm
by GPI
When you want to try: New version of jaPBe...

CTRL+Click on Procedure/Constant/Structures will start search for the declaration (on all open SourceCodes). (same with Shift+F3=F13)

When you hit Strg+F3, you jump back to the old line...