| <!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> |
| Marker help and resolution |
| </TITLE> |
| |
| <link rel="stylesheet" type="text/css" HREF="../book.css"> |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h3>Marker help and resolution</h3> |
| <p>In <a href="resAdv_markers.htm">Resource markers</a>, we saw how plug-ins can |
| define specialized marker types in order to annotate resources with |
| information. The <a href="../samples/org.eclipse.ui.examples.readmetool/doc-html/ui_readmetool_ex.html">readme |
| tool</a> example defines its own markers in order to demonstrate two |
| marker-related workbench extensions: <b>marker help</b> and <b>marker |
| resolutions</b>. The marker definition is in the readme plug-in's manifest |
| markup:</p> |
| |
| |
| <pre><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> </pre> |
| |
| |
| <p>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.</p> |
| |
| |
| <p>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.</p> |
| |
| |
| <p>Markers can be added to a <b>.readme</b> file using the readme editor's popup |
| menu. (The popup menu actions are added dynamically in <b>ReadmeTextEditor.<font SIZE="2" COLOR="#000000">editorContextMenuAboutToShow(IMenuManager</font> |
| </b><font SIZE="2" COLOR="#000000"><b>parentMenu)</b>). Once added, |
| the markers appear on the left side of the editor and in the tasks view.</font></p> |
| |
| |
| <p><img src="images/readmemarkermenu.png" alt="Readme editor with readme markers on left side ruler" border="0"></p> |
| |
| |
| |
| |
| |
| </BODY> |
| </HTML> |