NavigationContext "jump to declaration" not always suitable for script languages

Milian Wolff mail at milianw.de
Fri Sep 18 15:20:01 UTC 2009


Am Freitag, 18. September 2009 16:54:26 schrieb Milian Wolff:
> Scripting languages often load some module, written e.g. in C or some other
> non-scripting-language which then provides a bunch of classes, functions
>  etc.
> 
> Now in PHP we have this, but still internal functions show, when hovered, a
> "jump to declaration", because we offer our PHPInternalFunctions file.
> 
> I'd like to extend the AbstractDeclarationNavigationContext to handle this
> case, and let the implementer decide whether to show the jump-to-xyz line
>  or something else.
> 
> I'd say a simple virtual function that creates the link by default would be
> good. Then I could overwrite it and decide to show something different,
>  e.g.
> 
> Decl.: PHP internal
> 
> May I do that?

Found something easier: I made makeLink virtual and overload it in my language 
plugin. Minimal change, all the result I wanted.

Hope it's ok.

-- 
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: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090918/90096707/attachment.sig>


More information about the KDevelop-devel mailing list