Marker in Eclipse editor not showing message -


I am creating custom text editor plugin for a domain specific language in Eclipse.

I can detect errors in the format of editorial content and use the Eclipse marker to indicate the user to point out the errors.

I have the following code in the plugin: Public static zero opensMarkerForResource (int linenumber, string message) throws coreException { IRSource Resources = getFile (); CreateMarkerForResource (resource, linenumber, message); } Public static zero creates the MarkerFor Resource (IRSource Resource, Ant LineNumber, String Message) CoreException {Hashmop & lt; String, Object & gt; Map = new hashmop & lt; String, Object & gt; (); Marker utility.SetelLinumber (map, linum); Marker Utility. Settlements (Map, Message); MarkerUplit.Credit Marker (Resources, Maps, IMMarkars, PROBLEM); IMarker [] Marker = Resources. Fill Marks (Empty, Truth, for IRSOSER: (Imarker: Marker) {System.out.println ("Marker Content" + Marker Utilize.jet Message (Marker) Hello ");

It successfully gives me an image on the right line

 Enter image details here

And if I take it over, then I 'You can click this thing' cursor but I can not get the message to rise above.

The message is definitely fixed because: {Marker: marker} {system.out.println ("marker content" + marker utije.jet message (marker)); Code>

The code "marker content" outputs output as expected, what am I doing wrong?

Edit:

The problem

 Enter image details here

Answer Njol is right and works for me (Eclipse Neon .1).

But two additional recommendations:

  1. I'm reusing a built-in field , So the annotation hoover is not always the new created (the cardinal method is not created)
  2. The default annotation hoover shows all annotations, so when you want only markers to be shown (and Example:
     Example:  
      import org. Any other - eg, Deposit Annotation from GIT, should be override you. eclipse.jface.text.source.SourceViewerConfiguration; ... public class MySourceViewerConfiguration extends SourceViewerConfiguration {... Private InnotationHover AnnotationsHouwer; ... public MySourceViewerConfiguration () {this.annotationHoover = New MyNnotationHoover ();} ... @ Override Public InnotationHover getNnotationHover (ISourceViewer sourceViewer) {Return AnnotationsHow; }}   

    and here annotation hoover class

      private class MyNnotationHoover expands the default annotation hover {@ Override protected boolean (annotation annotation) {if (Annotation Instation Marker Annotation) {Back true; } / * We do not support other annotations / markbacks as compared to markers; }}    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -