Move eventFilter from contextbrowser into kate
David Nolden
zwabel at googlemail.com
Mon Nov 10 10:49:05 UTC 2008
Am Montag, 10. November 2008 11:27:51 schrieb Andreas Pakulat:
> Hi,
>
> I was just pointed to some code in the contextbrowser which seems to cry
> for moving it into kate. Its an eventFilter for the "html-like"
> code-browsing in a kte-view. Looking at the code we need relatively little
> from a new KTE interface to support this without the hackery I see here.
> Basically something like this:
>
> class BrowseInterface
> {
> void setBrowseModeTrigger( Qt::Key )
>
> signals:
> void browseModeStarted();
> void browseModeStopped();
> void clicked( KTextEditor::Cursor );
> void moved( KTextEditor::Cursor );
> };
>
> What doe the maintainers of the contextbrowser think?
>
> Andreas
In general I agree, but it's not as simple as the interface you've written.
There is no smart-ranges for all browseable stuff, for example not for
include-directives, not for macros, and in future I'd also like doxygen links
to be browseable, also without attached smart-ranges. Also at some point the
range under the cursor should be underlined when browseable. So a pure
kate-side implementation won't work, it will at least need to ask the
application whether there is something browseable under the cursor, and for
its range.
Also, the browse-mode should work across all kate views open in the same main
window, which is ugliest part of the hackery, and would still need to be
done.
The event-filter is btw. also used to allow passing the focus from the editor
view to the code-browser, so we wouldn't get rid of that.
So in general I would appreciate someone extracting such a nice
browse-interface. Personally I'm happy that it works, and I'll concentrate on
making more stuff work better, instead of refactoring, at least until we have
a release. :)
More information about the KDevelop-devel
mailing list