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

Contributing marker help

Now we are ready to look at how to add help to the readme tool's markers.  Adding marker help is done using the org.eclipse.ui.ide.markerHelp extension point.  This extension point allows plug-ins to associate a help context id with a particular type of marker.  The marker can be qualified by marker type only, or it can be further qualified by the value of one or more of its attributes.  The readme tool declares several different help contexts:

<extension point="org.eclipse.ui.ide.markerHelp"> 
   <markerHelp 
      markerType="org.eclipse.ui.examples.readmetool.readmemarker" 
      helpContextId="org.eclipse.ui.examples.readmetool.marker_example1_context"> 
      <attribute name="org.eclipse.ui.examples.readmetool.id" value= "1234"/> 
   </markerHelp> 
   <markerHelp 
      markerType="org.eclipse.ui.examples.readmetool.readmemarker" 
      helpContextId="org.eclipse.ui.examples.readmetool.marker_example2_context"> 
      <attribute name="org.eclipse.ui.examples.readmetool.level" value= "7"/> 
   </markerHelp> 
   <markerHelp 
      markerType="org.eclipse.ui.examples.readmetool.readmemarker" 
      helpContextId="org.eclipse.ui.examples.readmetool.marker_example3_context"> 
      <attribute name="org.eclipse.ui.examples.readmetool.level" value= "7"/> 
      <attribute name="org.eclipse.ui.examples.readmetool.department" value= "infra"/> 
   </markerHelp> 
   ...

Each marker help context is defined for the readme marker type.  However, each help context is associated with a different combination of attribute values.  The first marker help context will be used for markers whose id attribute is set to "1234".  The help contexts are defined in the plug-in's HelpContexts.xml file:

<context id="marker_example1_context" >
	<description>Readme marker example 1 <b>Help</b> id = 1234 </description>
</context>

Sure enough, when we select a readme marker with id="1234" and select help using F1, we see our help in the help view.

Tasks list with marker help


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