| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> |
| <HEAD> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
| |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> |
| <TITLE> |
| Contributing marker help |
| </TITLE> |
| |
| <link rel="stylesheet" type="text/css" HREF="../book.css"> |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h4>Contributing marker help</h4> |
| <p>Now we are ready to look at how to add help to the readme tool's |
| markers. Adding marker help is done using the <b><a href="../reference/extension-points/org_eclipse_ui_ide_markerHelp.html">org.eclipse.ui.ide.markerHelp</a></b> |
| 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:</p> |
| <pre><extension point="org.eclipse.ui.ide.markerHelp"> |
| <markerHelp |
| <b>markerType="org.eclipse.ui.examples.readmetool.readmemarker" </b> |
| helpContextId="org.eclipse.ui.examples.readmetool.marker_example1_context"> |
| <b> <attribute name="org.eclipse.ui.examples.readmetool.id" value= "1234"/> </b> |
| </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> |
| ...</pre> |
| <p>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 <b>id</b> attribute is set to <b>"1234"</b>. The help |
| contexts are defined in the plug-in's <b>HelpContexts.xml </b>file:</p> |
| <pre><context id="marker_example1_context" > |
| <description>Readme marker example 1 <b>Help</b> id = 1234 </description> |
| </context></pre> |
| |
| <p>Sure enough, when we select a readme marker with id="1234" and select |
| help using F1, we see our help in the help view. </p> |
| <p><img src="images/readmemarkerhelp.png" alt="Tasks list with marker help" border="0" ></p> |
| |
| |
| |
| </BODY> |
| </HTML> |