Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Marker help and resolution

In Resource markers, we saw how plug-ins can define specialized marker types in order to annotate resources with information.  The readmetool example defines its own markers in order to demonstrate two marker-related workbench extensions:  marker help and marker resolutions.  The marker definition is in the readme plug-in's manifest markup:

<extension id="readmemarker" point="org.eclipse.core.resources.markers" name="%ReadmeMarker.name">
	<super type="org.eclipse.core.resources.taskmarker"/>
	<super type="org.eclipse.core.resources.textmarker"/>
	<persistent value="true"/>
	<attribute name="org.eclipse.ui.examples.readmetool.id"/>
	<attribute name="org.eclipse.ui.examples.readmetool.level"/>
	<attribute name="org.eclipse.ui.examples.readmetool.department"/>
	<attribute name="org.eclipse.ui.examples.readmetool.code"/>
	<attribute name="org.eclipse.ui.examples.readmetool.language"/>
</extension>   

The tool defines a marker that inherits from the platform's text marker and task marker.  It also defines named attributes for the marker.   Marker attributes can be set and queried.

Since the new readme marker is a kind of text marker, it inherits the text marker attributes.  The text marker attributes include the character location of the marker.

Markers can be added to a .readme file using the readme editor's popup menu.  (The popup menu actions are added dynamically in ReadmeTextEditor.editorContextMenuAboutToShow(IMenuManager parentMenu)).  Once added, the markers appear on the left side of the editor and in the tasks view.

Readme editor with readme markers on left side ruler


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire