Hyperlink support is currently limited to class declarations because it was unclear at the time how to efficiently interrogate the DB in this context.
The current implementation uses the SelectionConverter which looks up the selected word as declaration only.
Any tips on how to proceed with adding support for say class methods, local variables and such? Scope is obviously something that must be consider as well.
A good approach here would be to lookup the containing scope (eg class) using the declaration cache, then locate the selected item within the scope. This approach should be quite efficient.
I've been thinking about this a bit more, and realized that much of the required functionality is implemented in the code for Open Declaration. net.sf.sveditor.core.open_decl.OpenDeclUtils.openDecl() calls utility methods to:
The result of the SVContentAssistExprVisitor is the resolved DB item. Calling the same utility methods that OpenDeclUtils calls should allow you to offer users an Open Declaration hyperlink for (as an example) a method invocation.
Hope this helps!
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.