开发者

how to add ctrl - click listeners in eclipse java editor

开发者 https://www.devze.com 2023-01-03 00:47 出处:网络
I want to add a ctrl - clic kind of listener to a custom javadoc annotation in eclipse java editor, thus I want to be able t开发者_如何学运维o move the focus to a specific place when the use ctrl - cl

I want to add a ctrl - clic kind of listener to a custom javadoc annotation in eclipse java editor, thus I want to be able t开发者_如何学运维o move the focus to a specific place when the use ctrl - clic @customJavadoc annotation.


I just found the way to get it done, using an eclipse extension:

<plugin>

   <extension
         point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
      <hyperlinkDetector
            activate="true"
            class="testproject.ShouldAnnotationDetector"
            id="testProject.shouldAnnotationDetector"
            name="name"
            targetId="org.eclipse.jdt.ui.javaCode">
      </hyperlinkDetector>
   </extension>

</plugin>

where testproject.ShouldAnnotationDetector should extend testproject.ShouldAnnotationDetector

0

精彩评论

暂无评论...
验证码 换一张
取 消