<!doctype html public "-//w3c//dtd html 4.0//en"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<title>README Tool Extension Points</title> | |
</head> | |
<body link="#0000FF" vlink="#800080"> | |
<center> | |
<h1> | |
Section Parser</h1></center> | |
<b><i>Identifier: </i></b>org.eclipse.ui.examples.readmetool.sectionParser | |
<p><b><i>Description: </i></b>This extension point allows tools to provide | |
a parser for Readme files which identifies the sections of the file. | |
The sections determined by this parser will show up in the outliner when a | |
Readme file is open in the editor. The sections will also appear in the | |
"Readme sections" view. | |
<p>The default section parser provided with the Readme Tool is a simple parser | |
which considers sections to be numbered at the beginning of a line. Top-level | |
sections are signified by a number followed by a period, such as in the following | |
regular expression: "[0-9]+\.". Examples are "1.", "0.", and "12345.". | |
Subsections are signified by the regular expression: "([0-9]+\.)+[0-9]+". Examples | |
of subsections are "1.1", "1.1.1.1", and "123.456.7890". Any level of subsection | |
nesting may occur. Section and subsection markers must occur before any other | |
non-whitespace characters on a line. | |
<p><b><i>Configuration Markup:</i></b> | |
<p><tt> <!ATTLIST sectionParser</tt> | |
<br><tt> name CDATA #REQUIRED</tt> | |
<br><tt> id CDATA #REQUIRED</tt> | |
<br><tt> class CDATA #REQUIRED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>name</b> - a string describing this contribution.</li> | |
<li> | |
<b>id</b> - a unique identifier that can be used to reference this extension.</li> | |
<li> | |
<b>class</b> - a fully qualified name of the class which provides this extension.</li> | |
</ul> | |
<b><i>Examples:</i></b> | |
<p>The following is an example of a sectionParser extension point: | |
<p><tt> <extension point="org.eclipse.ui.examples.readmetool.sectionParser"></tt> | |
<br><tt> <parser</tt> | |
<br><tt> name="Custom README Section Parser"</tt> | |
<br><tt> id="com.xyz.CustomSectionParser"</tt> | |
<br><tt> class="com.xyz.CustomSectionParser"></tt> | |
<br><tt> </parser></tt> | |
<br><tt> </extension></tt> | |
<p>In the example above, the class com.xyz.CustomSectionParser will be used as | |
the section parser for Readme files. | |
<p><b><i>API Information: </i></b>Value of the action attribute <b>class</b> | |
must be a fully qualified class name of a Java class that implements the interface | |
org.eclipse.ui.examples.readmetool.IReadmeFileParser. This interface is loaded as | |
late as possible to avoid loading the entire tool before it is really needed. | |
<p><b><i>Supplied Implementation: </i></b>As described above, the default section | |
parser uses a simple grammar of sections identified by numbers followed by periods, | |
and subsections identified by the pattern of a number followed by a period, repeated | |
an arbitrary number of times, and ending with a number. | |
<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved." width="195" height="12" border="0"></a></p> | |
</body> | |
</html> |