Search code examples
eclipsemarkerpde

Eclipse PDE : How to add marker with quick action


My problem is related to the: Eclipse PDE: Custom QuickFix only available in Problems View?, but I can't use QuickAssistAssistant. I need to add marker with quick fix to existing M2E pom.xml editor.

I'm already able do this:

displayed quick fix as text hover

But I still can't found how to change marker icon (to variant with bulb) a show possible quick fix also after click on the annotation icon.

I want this icon What I want

I'm currently use this configuration

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

Solution

  • May be I'm too late, but you need to check org.eclipse.ui.workbench.texteditor.markerAnnotationSpecification extension point .

    Just extend it with your annotationType and specify 'quickFixIcon' attribute with quickfix icon