Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 814283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:29:44+00:00 2026-05-15T01:29:44+00:00

I want to specify a custom icon for a marker. Sadly, the icon that

  • 0

I want to specify a custom icon for a marker. Sadly, the icon that I chose is not displayed.

Here’s the relevant parts of the plugin.xml file (the project id “x”):

<extension
      id="xmlProblem"
      name="XML Problem"
      point="org.eclipse.core.resources.markers">
   <super type="org.eclipse.core.resources.problemmarker"/>
   <persistent
         value="true">
   </persistent>
</extension>

<extension
      point="org.eclipse.ui.ide.markerImageProviders">
   <imageprovider
         markertype="x.xmlProblem"
         icon="icons/marker.png"
         id="xmlProblemImageProvider">
   </imageprovider>
</extension>

I also tried specifying a class (implementing IMarkerImageProvider) instead of an icon, but that getImagePath() method of the class does not get called.

Any thoughts on how to make custom marker icons work?

Desperately, yours.

-Itay

Update

VonC’s solution is pretty much correct, except that you must not specify org.eclipse.core.resources.problemmarker as a supertype of your marker. It worked only when I used org.eclipse.core.resources.textmarker as the only supertype.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:29:44+00:00Added an answer on May 15, 2026 at 1:29 am

    See bug 260909 "markerImageProviders extension point does not work" (found after reading this thread)

    Tod Creasey 2009-01-21 07:32:38 EST

    We have never had the push to make this API because it has some inflexibility that made it generally not consumable – it was written early on to enable the first marker views for the 3 severities we use and as a result was not used by the markerSupport as it was not API.

    It is confusing that we have an internal extension point (we don’t generally do
    that) but removing it would likely break someone without warning.

    [EDIT by Itay]

    Following on Vonc’s pointers, I eventually managed to make this thing work.
    Here are the relevant fragments from my plugin.xml (assuming the plugin name is a.b.c)

      <extension point="org.eclipse.core.resources.markers"   
            id="myMarker">
         <super type="org.eclipse.core.resources.textmarker"/>         
         <persistent value="true"/>
      </extension>
    
      <extension point="org.eclipse.ui.editors.annotationTypes">
         <type
            super="org.eclipse.ui.workbench.texteditor.warning"
            markerType="a.b.c.myMarker"
            name="a.b.c.myAnnotation"
            markerSeverity="1"/>
      </extension>
    
      <extension point="org.eclipse.ui.editors.markerAnnotationSpecification">
         <specification
            annotationType="a.b.c.myAnnotation"
            icon="icons/marker.png"
            verticalRulerPreferenceKey="myMarkerIndicationInVerticalRuler"
            verticalRulerPreferenceValue="true"/>
      </extension>
    

    Pitfalls

    • The super type of the marker must be set to org.eclipse.core.resources.textmarker. Any other value will prevent your custom icon from being used.
    • When you create a marker in your code make sure its severity matches the severity value specified in the markerSeverity attribute at the org.eclipse.ui.editors.annotationTypes extension point. 1 means warning, etc.
    • Make sure the icons folder is specified in your build.properties file (or the "build" tab at the plugin editor)
    • The declaration above will only specify a custom icon. If you want to customize other attributes (color of indication at the overview ruler, etc.) follow the sample from here on which this solution is based.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to require that one of my model classes specify my own custom
I have a custom behavior for a service where I want to specify a
I want to specify that either fieldname or freetext must always be present in
I have a Java WebStart application for which I want to specify that the
Can I specify I want the preceding character to be either (NOT A DIGIT)
I would like to specify that I want FEATURE_INDETERMINATE_PROGRESS for my Activity . It
How to Specify NOT with Regular Expressions for Words I want to filter a
I'm trying to specify custom Y axis tick marks, but IDL is not cooperating.
I'm overriding the clean method for my variables and want to specify a custom
I want to be able to specify a security level for my custom binding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.