ContextBrowser questions (Tabs, files without DUChain, ...)

Milian Wolff mail at milianw.de
Thu Jul 15 19:11:44 UTC 2010


On Thursday, 15. July 2010 20:54:39 David Nolden wrote:
> This is tricky. The problem is that we only want meaningful jumps in the
> history, so that "back" and "forward" bring you to meaningful positions.
> This is especially importand when you jump somewhere (without knowing where
> exactly it takes you) using quickopen or similar, because else you have a
> hard time finding the old position back.
> 
> On the other hand if you switch the tab manually, you can easily manually
> switch back. The same is true for manual navigation using the cursor.
> 
> I'm not sure whether adding an entry on tab-switching would be a good
> thing. The position after a tab-switch may be completely meaningless
> because you simply wanted to take a look on what's in the tab or similar.
> 
> There may be other occassions that would be better for adding a history
> entry:
> - when the user edited some code
> - when the cursor was within a function or class block for a specific
> minimum time (10s maybe?)

I agree, adding history items on tab switch might spam the list there. Hm.
But I like the idea with "add history on edit". That would at least make it 
somewhat working in non-duchain enabled files. Everytime I work in e.g. Kate's 
javascript indenters, I often look a function up by searching for it, then 
want to jump back to the place I edited last. That would work with your 
approach, since it would also add a HistoryItem for the looked-up function, 
since jumping back in history triggers the documentJumpPerformed, right?

> Am 15.07.2010 20:09 schrieb "Milian Wolff" <mail at milianw.de>:
> 
> Heyho,
> 
> I notice that switching tabs does not add items to the context browser, as
> that only listens to documentJumpPerformed. Should the latter also be
> emitted
> in such cases? Or should I instead manually listen to documentActivated?
> 
> I personally find it strange that e.g. quickOpen adds items to the context
> browser (even if the file was open), but switching tabs does not.
> 
> Furthermore files without DUChain integration always get the cursor at 0,0
> placed which sucks really bad. I'm tempted to integrate basic features
> there,
> which would essentially add history items, when the user changes the cursor
> significantly, where I'd probably define that as abs(currentLine -
> lastLine)
> 
> X. X = 1 would already exclude arrow navigation and cover mouse clicking,
> pos
> 1, end, pageup/down scrolling. What do you think?
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de
> 
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100715/b198b300/attachment.sig>


More information about the KDevelop-devel mailing list