Author Topic: BrowseTracker plugin  (Read 91501 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: BrowseTracker plugin
« Reply #15 on: July 03, 2007, 08:36:03 pm »
hello Pecan

ok, starting collecting ideas ...

i would think that every jump to any code location should be recorded,
which wasn't done by the cursor keys or page up/down and begin/end.

i.e.
* all kind of Find commands: Find, Find Next/Previous, Find in Files, ThreadSearch find, ...
* movement by  jump to bookmarks
* changing active editor file: editor tab, opened files list, project files, ...

usr interface
* Alt-Left/Right could present the last Browsetracker files-list (as already implemented)
* Alt-Up/Down jumps in the History of locations (new)

if codecompletion was enabled, the names from the symbol-browser could be stored too
and shown in the Browsetracker files-list as sub-list to each file

better stopping now  :P

brgds, tiwag

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: BrowseTracker plugin
« Reply #16 on: July 22, 2007, 10:13:06 pm »
BrowseTracker re-compiled for svn 4261 to avoid missing symbols and turn off log.

http://wiki.codeblocks.org/index.php?title=BrowseTracker_plugin

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BrowseTracker plugin
« Reply #17 on: July 22, 2007, 10:28:55 pm »
Hi,

After reading this post (the first post specially), I noticed that there is an actual an incomplete functionality in the wxFlatNotebook smart tabbing - which only stores the last 2 editors (kinda sux.  :D).

So, I updated wxFlatNotebook's smart tabbing so it will keeps an *unlimited* stack of recently visited tabs.

Due to the above change, the following functionality was improved/added:
- closing a tab, will cause wxFNB to select the previously visited tab (if this tab was already closed, it will select the one before it, and so on)
- Ctrl+tab/Ctrl+PgDn/Up (navigating between tabs) - will offer the list of tabs in orders they were visited.

-Eran

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: BrowseTracker plugin
« Reply #18 on: July 22, 2007, 10:50:40 pm »
Hi Eran,
thanks for these modifications! :-)
- Ctrl+PgDn/Up (navigating between tabs)
Anyway, is this customisable somehow? Because this functionality is (within IDE's) often used to switch to the previous / next method in a file. This includes C::B and e.g. Visual Studio.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BrowseTracker plugin
« Reply #19 on: July 22, 2007, 10:56:23 pm »
Well,

It is not hard coded.

I am capturing OnNavigationKey event
Code
void wxFlatNotebook::OnNavigationKey(wxNavigationKeyEvent& event)

which seems to react for these two combinations (Ctrl + PgUp/Dn & Ctr+Tab+(Shift)), so I guess this comes from the system settings, but I really dont know from where or how to change this.

-Eran

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: BrowseTracker plugin
« Reply #20 on: July 23, 2007, 10:10:54 am »
I am capturing OnNavigationKey event
Code
void wxFlatNotebook::OnNavigationKey(wxNavigationKeyEvent& event)

which seems to react for these two combinations (Ctrl + PgUp/Dn & Ctr+Tab+(Shift)), so I guess this comes from the system settings, but I really dont know from where or how to change this.
Ah - ok... good to know. At least that's the starting point for further "research"... ;-) Thanks!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: BrowseTracker plugin
« Reply #21 on: July 23, 2007, 01:38:39 pm »
I am capturing OnNavigationKey event
Code
void wxFlatNotebook::OnNavigationKey(wxNavigationKeyEvent& event)

which seems to react for these two combinations (Ctrl + PgUp/Dn & Ctr+Tab+(Shift)), so I guess this comes from the system settings, but I really dont know from where or how to change this.
Ah - ok... good to know. At least that's the starting point for further "research"... ;-) Thanks!

http://developer.berlios.de/bugs/?func=detailbug&bug_id=11348&group_id=5358

That are actually defined by the OS as the "minor control navigation keys". They are sent to wxControlContainer, and from there to any class using the navigation event.
« Last Edit: July 23, 2007, 01:41:53 pm by Pecan »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: BrowseTracker plugin
« Reply #22 on: July 23, 2007, 02:13:58 pm »
http://developer.berlios.de/bugs/?func=detailbug&bug_id=11348&group_id=5358
That are actually defined by the OS as the "minor control navigation keys". They are sent to wxControlContainer, and from there to any class using the navigation event.
Thanks for that info. Well, we have a conflict now: Two functionalities fight for a hotkey. Which one is right? Both has to do with navigation. The pro for wxFNB is that it's "wxWidgets native" then, the pro for jumping to next/previous method is being compatible with major other IDE's (like Visual Studio). Which do we want?
With regards, Morten.
Ps: Can the keybinder plugin handle any re-association?! (I guess no.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: BrowseTracker plugin
« Reply #23 on: July 23, 2007, 02:52:00 pm »
Ps: Can the keybinder plugin handle any re-association?! (I guess no.)

If a plugin changes a keybinding on the menu items, keybinder will recognize and record it withing 15 seconds.

But....

Since wxFlatNotebook is invoked before the plugins, it owns the navigation keys first. Since the OS hands it off to the navigation events.

Since the CC plugin gets invoked later...
CC could then (as it does now) intercept the wxEVT_NAVIGATION_KEY if an option box is checked.

But the user will have to give up the OS "minor navigation control keys".
It seems Visual Studio users find that acceptable.


When in doubt, give the user the option.
« Last Edit: July 23, 2007, 02:58:43 pm by Pecan »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: BrowseTracker plugin
« Reply #24 on: July 23, 2007, 03:34:55 pm »
CC could then (as it does now) intercept the wxEVT_NAVIGATION_KEY if an option box is checked.
It can't really. I have added a listener to this event in CC and it never gets called. This is because simply wxFNB "steals" this event already. I didn't realise this until now as I have switched to wx28 (in wx26 this worked properly). Now the CTRL+PGUP/PGDOWN simply is ignored for CC. This very much deceases my productivity... :-(
I guess we *have* to think either of making this optional in both, wxFNB and CC (which is a bad idea IMHO) or disabling this functionality in on of both and enabling it in the other (which is bad, too) or change the hotkeys for CC or wxFNB.
For now I have disabled the Event in wxFNB (for me only) to be able to "method jump" again... But what makes me wonder: Why is it actually woiring in wx26? Did that mean the the event interception of wxFNB was ignored there?!
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: BrowseTracker plugin
« Reply #25 on: July 23, 2007, 03:43:15 pm »
Now the CTRL+PGUP/PGDOWN simply is ignored for CC. This very much deceases my productivity... :-(
Aaargh! I figured out why that was. I have switched from wx26 to wx28 today and (somehow) all the keybinder associations were broken. Thus suddenly the CTRL+P combination was assigned for both: Jump to previous and next method. I have deleted the keybinder config file and it works again. Anyway all the rest I mentioned is true.
BTW: Should we start a new thread on that topic? This has not very much to do with the BrowserPlugin meanwhile...
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BrowseTracker plugin
« Reply #26 on: July 23, 2007, 04:05:35 pm »
Try to add event.Skip() at the end of the OnNavigationKey() of wxFNB.

Eran

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: BrowseTracker plugin
« Reply #27 on: July 23, 2007, 05:42:34 pm »
Try to add event.Skip() at the end of the OnNavigationKey() of wxFNB.

Eran
will do that.
I hope this week to upgrade to your latest version of wxFBN, Eranif.
Any special things to consider ?

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BrowseTracker plugin
« Reply #28 on: July 23, 2007, 05:49:50 pm »
Quote from: Killerbot
Any special things to consider ?
- If you mean in build process, you should try and built it with 2.8 & 2.6 - I myself uses 2.8 so I am not sure if I didn't break 2.6 builds (for example, wxRect::Contains() vs wxRect::Iside(), I attended theses issues, but still)
- The main reason to switch to the next version, is the new theme (wxFNB_FF2), the property dialog and couple of bug fixes.

Eran



Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: BrowseTracker plugin
« Reply #29 on: July 23, 2007, 07:17:11 pm »
@Eran :

2 changes I made to your sources (compile step) :

renderer.cpp : line 23 : regPts[9] is NOT used.  (I didn't touch th comment just above it )

wxFlatNotebook.cpp : line 127 : signed/unsigned comp warning

if(m_iActivePage > (int)page || (int)page >= m_pagesInfoVec.Count())

becomes

if(m_iActivePage > (int)page || (int)page >= (int)(m_pagesInfoVec.Count()))


CB builds fine (first testing on windows), now time for the tests


moving to another dedicated topic --> negative side effects


« Last Edit: July 23, 2007, 07:28:38 pm by killerbot »