Skip to content

Commit b5c3c17

Browse files
Bananeweizenlkoe
authored andcommitted
Add extension point implementation examples
This copies the existing example extensions from the documentation into the extension point declaration itself. This way the examples are available directly when creating the extension in PDE.
1 parent 11383bf commit b5c3c17

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

net.sf.eclipsecs.core/schema/configurations.exsd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,27 @@ The all-time default configuration "Sun Checks" is defined with defaul
123123
</documentation>
124124
</annotation>
125125

126+
<annotation>
127+
<appinfo>
128+
<meta.section type="examples"/>
129+
</appinfo>
130+
<documentation>
131+
The following is an example of using the &lt;samp&gt;configurations&lt;/samp&gt; extension point.
132+
133+
&lt;pre&gt;
134+
&lt;extension
135+
id=&quot;checkstyle.CheckConfiguration&quot;
136+
point=&quot;net.sf.eclipsecs.core.configurations&quot;&gt;
137+
&lt;check-configuration
138+
name=&quot;Sample Builtin Checks&quot;
139+
location=&quot;sample_checks.xml&quot;
140+
description=&quot;Sample Built-in configuration&quot;&gt;
141+
&lt;property name=&quot;maxLineLength&quot; value=&quot;50&quot;/&gt;
142+
&lt;/check-configuration&gt;
143+
&lt;/extension&gt;
144+
&lt;/pre&gt;
145+
</documentation>
146+
</annotation>
126147

127148

128149

net.sf.eclipsecs.core/schema/filters.exsd

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,26 @@ The filter class must implement &lt;code&gt;net.sf.eclipsecs.core.filters.IFilte
129129
</documentation>
130130
</annotation>
131131

132+
<annotation>
133+
<appinfo>
134+
<meta.section type="examples"/>
135+
</appinfo>
136+
<documentation>
137+
The following is an example of using the &lt;samp&gt;filters&lt;/samp&gt; extension point.
138+
139+
&lt;pre&gt;
140+
&lt;extension
141+
id=&quot;checkstyle.CheckstyleFilters&quot;
142+
point=&quot;net.sf.eclipsecs.core.filters&quot;&gt;
143+
&lt;filter
144+
name=&quot;Sample Filter&quot;
145+
internal-name=&quot;SampleFilter&quot;
146+
description=&quot;Sample Filter&quot;
147+
class=&quot;net.sf.eclipsecs.sample.filter.SampleFilter&quot;/&gt;
148+
&lt;/extension&gt;
149+
&lt;/pre&gt;
150+
</documentation>
151+
</annotation>
132152

133153

134154

0 commit comments

Comments
 (0)