如何添加ctrl - 在eclipse java编辑器中单击监听器

时间:2010-06-07 01:01:30

标签: java eclipse

我想在eclipse java编辑器中为自定义javadoc注释添加一个ctrl-clic类型的监听器,因此我希望能够在使用ctrl-clic @customJavadoc注释时将焦点移动到特定位置。

1 个答案:

答案 0 :(得分:0)

我刚刚找到了使用eclipse扩展程序完成它的方法:

<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>

testproject.ShouldAnnotationDetector应该扩展testproject.ShouldAnnotationDetector