【问题标题】:Eclipse PDE : How to add marker with quick actionEclipse PDE:如何通过快速操作添加标记
【发布时间】:2013-03-21 04:41:20
【问题描述】:

我的问题与:Eclipse PDE: Custom QuickFix only available in Problems View? 有关,但我无法使用 QuickAssistAssistant。我需要为现有的 M2E pom.xml 编辑器添加快速修复标记。

我已经可以做到了:

但我仍然找不到如何在单击注释图标后更改标记图标(与灯泡变体)显示可能的快速修复。

我想要这个图标

我目前正在使用这个配置

   <extension
          id="me.gladwell.eclipse.m2e.android.markers.dependency.apklib"
          point="org.eclipse.core.resources.markers">
          <super type="org.eclipse.core.resources.problemmarker"/>
          <super type="org.eclipse.core.resources.textmarker"/>
          <super type="me.gladwell.eclipse.m2e.android.markers.dependency"/>
          <persistent value="true" />
   </extension>
   <extension
           point="org.eclipse.ui.ide.markerResolution">
           <markerResolutionGenerator
                  markerType="me.gladwell.eclipse.m2e.android.markers.dependency.apklib"
                  class="me.gladwell.eclipse.m2e.android.quickfix.ImportApklibResolutionGenerator"/>
   </extension>   
   <extension
           point="org.eclipse.ui.editors.annotationTypes">
           <type
               name="me.gladwell.eclipse.m2e.android.annotations"
               super="org.eclipse.ui.workbench.texteditor.error"
               markerType="me.gladwell.eclipse.m2e.android.markers.dependency.apklib"
               markerSeverity="2">
         </type>
   </extension>   

【问题讨论】:

  • 您解决问题了吗?你能提供一些代码sn-ps吗?提前致谢。
  • 不,我已经停止使用 Eclipse。
  • 但是现有的答案呢?我无法确定它是否有用。
  • 这无关紧要。它只解释了如何更改标记的图标,而不是如何在单击标记的图标时获得快速修复建议。看来要提供这个功能,必须从cdt或jdt复制和调整很多代码。
  • 我也想知道您是如何设法在悬停窗口中显示修复建议的...

标签: eclipse marker pde


【解决方案1】:

可能我来晚了,但你需要检查org.eclipse.ui.workbench.texteditor.markerAnnotationSpecification扩展点。

只需使用您的 annotationType 扩展它并使用 quickfix 图标指定 'quickFixIcon' 属性

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多