Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Annotation for problemMarkers
Annotation for problemMarkers [message #335033] Tue, 17 March 2009 18:47 Go to next message
Ram Mohan is currently offline Ram MohanFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I am developing an editor(subclass of TextEditor) for a new language.
I am able to mark the errors on the vertical ruler properly but i wasn't
able to annotate them(when mose moves over these markers) with error
messages.

I have added both extensions "annotationTypes and
markerAnnotationSpecification" and mapped them to markertype.
But, I couldn't see any annotation when i move the cursor over the error
marker.

I couldn't find any example and tutorial on how annotations can be added
for markers. It appears to me that i need to add some MarkerListener to
SourceViewerConfiguration. am i going in correct direction? Any pointers
in this regard would be very helpful.

Regards,
Ram

A snippet of my editor plugin.xml

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

<extension
point="org.eclipse.ui.editors.annotationTypes">
<type
markerSeverity="2"
markerType="TACT_Editor.xmlProblem"
name="TACT-Editor.TactError"
super="org.eclipse.ui.workbench.texteditor.error">
</type>
</extension>

<extension
point="org.eclipse.ui.editors.markerAnnotationSpecification ">
<specification
annotationType="TACT-Editor.TactError">
</specification>
</extension>
Re: Annotation for problemMarkers [message #335037 is a reply to message #335033] Wed, 18 March 2009 15:28 Go to previous messageGo to next message
Ram Mohan is currently offline Ram MohanFriend
Messages: 2
Registered: July 2009
Junior Member
I am stuck up in adding Annotation.
Any pointers in this regard would be very helpful.

Thanks,
Ram
Re: Annotation for problemMarkers [message #335048 is a reply to message #335033] Thu, 19 March 2009 10:39 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Ram Mohan wrote:
> Hi,
>
> I am developing an editor(subclass of TextEditor) for a new language.
> I am able to mark the errors on the vertical ruler properly but i
> wasn't able to annotate them(when mose moves over these markers) with
> error messages.
Does the marker appear in the problems view? Do you use the existing
source viewer configuration or do you use your own?

Dani
>
> I have added both extensions "annotationTypes and
> markerAnnotationSpecification" and mapped them to markertype.
> But, I couldn't see any annotation when i move the cursor over the
> error marker.
>
> I couldn't find any example and tutorial on how annotations can be
> added for markers. It appears to me that i need to add some
> MarkerListener to SourceViewerConfiguration. am i going in correct
> direction? Any pointers in this regard would be very helpful.
>
> Regards,
> Ram
>
> A snippet of my editor plugin.xml
>
> <extension
> id="xmlProblem"
> name="XML Problem"
> point="org.eclipse.core.resources.markers">
> <super
> type="org.eclipse.core.resources.problemmarker">
> </super>
> <persistent
> value="true">
> </persistent>
> </extension>
>
> <extension
> point="org.eclipse.ui.editors.annotationTypes">
> <type
> markerSeverity="2"
> markerType="TACT_Editor.xmlProblem"
> name="TACT-Editor.TactError"
> super="org.eclipse.ui.workbench.texteditor.error">
> </type>
> </extension>
>
> <extension
> point="org.eclipse.ui.editors.markerAnnotationSpecification ">
> <specification
> annotationType="TACT-Editor.TactError">
> </specification>
> </extension>
>
Previous Topic:Registering own IDocumentProvider
Next Topic:Shared target platform, debugging, and multiple dev platforms
Goto Forum:
  


Current Time: Fri Apr 19 23:37:59 GMT 2024

Powered by FUDForum. Page generated in 0.03269 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top