How to offer links in eclipse editor plugin?

I am writing an eclipse editor plugin for a special file format and I want to offer a way to quickly go to the definition of an entity from a named link to it - basically, the function of "open declaration" of the eclipse Java editor.

I know that I can do this by registering the action of the editor and placing it in the context menu, but I would really like all Java identifiers to turn into links to their declaration when CTRL is pressed in the Java editor - how can I do it? I can not find anything about this in the documentation.

+5
source share
1 answer

, . : org.eclipse.ui.workbench.texteditor.hyperlinkDetectors, Mylyn plugin.xml:

<extension point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
  <hyperlinkDetector            
        class="org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector"
        id="org.eclipse.mylyn.tasks.ui.hyperlinks.detectors.task"
        name="%TaskHyperlinkDetector.name"
        targetId="org.eclipse.ui.DefaultTextEditor">
  </hyperlinkDetector>

AbstractHyperlinkDetector, , , .

+8

All Articles