Skip to content

Commit 9899ecc

Browse files
author
Quang Tran
committed
IDE-2473: document plug.xml files and improve their layout
1 parent 1ae5916 commit 9899ecc

File tree

2 files changed

+101
-122
lines changed

2 files changed

+101
-122
lines changed

plugins/eu.numberfour.n4js.xpect.ui/plugin.xml

Lines changed: 98 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ Contributors:
1010
NumberFour AG - Initial API and implementation
1111
-->
1212
<?eclipse version="3.4"?>
13+
<!-- Note: If you change this file, make sure to check the corresponding files for sub-languages -->
1314
<plugin>
1415

15-
<extension point="org.eclipse.ui.views">
16+
<extension point="org.eclipse.ui.views">
1617
<view id="eu.numberfour.n4js.xpect.ui.runner.N4IDEXpectView"
1718
name="Xpect View"
1819
icon="icons/test_view.png"
1920
category="eu.numberfour.n4js.category"
2021
class="eu.numberfour.n4js.xpect.ui.results.N4IDEXpectView"/>
21-
</extension>
22+
</extension>
23+
2224
<extension point="org.eclipse.debug.core.launchConfigurationTypes">
2325
<launchConfigurationType
2426
delegate= "eu.numberfour.n4js.xpect.ui.XpectConfigurationDelegate"
@@ -27,17 +29,16 @@ Contributors:
2729
name="Run XPECT">
2830
</launchConfigurationType>
2931
</extension>
30-
31-
<extension
32+
<extension
3233
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
3334
<launchConfigurationTabGroup
3435
class= "eu.numberfour.n4js.xpect.ui.LaunchConfigurationTabGroup"
3536
id= "eu.numberfour.n4js.xpect.ui.LaunchConfigurationTabGroup.XPECT"
3637
type= "eu.numberfour.n4js.xpect.ui.LaunchConfigurationType.XPECT" >
3738
</launchConfigurationTabGroup>
38-
</extension>
39+
</extension>
3940

40-
<extension
41+
<extension
4142
point= "org.eclipse.debug.ui.launchShortcuts" >
4243
<shortcut
4344
class="eu.numberfour.n4js.xpect.ui.LaunchXpectShortcut"
@@ -61,25 +62,15 @@ Contributors:
6162
property= "org.eclipse.debug.ui.matchesPattern"
6263
value= "*.n4js.xt" >
6364
</test>
64-
<!-- <test
65-
property= "org.eclipse.debug.ui.matchesPattern"
66-
value= "*.js" >
67-
</test>
68-
<test
69-
property= "org.eclipse.debug.ui.matchesPattern"
70-
value= "*.n4js" >
71-
</test>
72-
-->
7365
</or>
7466
</iterate>
7567
</with>
7668
</enablement>
7769
</contextualLaunch>
7870
</shortcut>
79-
</extension>
80-
81-
82-
<extension
71+
</extension>
72+
73+
<extension
8374
point= "org.eclipse.debug.ui.launchShortcuts" >
8475
<shortcut
8576
class="eu.numberfour.n4js.xpect.ui.GenerateJiraBugReportShortcut"
@@ -100,15 +91,6 @@ Contributors:
10091
property= "org.eclipse.debug.ui.matchesPattern"
10192
value= "*.n4js.xt" >
10293
</test>
103-
<!-- <test
104-
property= "org.eclipse.debug.ui.matchesPattern"
105-
value= "*.js" >
106-
</test>
107-
<test
108-
property= "org.eclipse.debug.ui.matchesPattern"
109-
value= "*.n4js" >
110-
</test>
111-
-->
11294
</or>
11395
</iterate>
11496
</with>
@@ -140,106 +122,102 @@ Contributors:
140122
</enablement>
141123
</contextualLaunch>
142124
</shortcut>
143-
</extension>
144-
145-
146-
<extension
147-
point="org.xpect.testSuite">
148-
<testSuite
149-
class="eu.numberfour.n4js.xpect.ui.runner.N4IDEXpectTestClass"
150-
fileExtension="n4js">
151-
</testSuite>
152-
</extension>
125+
</extension>
126+
<!-- Register .n4js file extension to XPECT -->
127+
<extension
128+
point="org.xpect.testSuite">
129+
<testSuite
130+
class="eu.numberfour.n4js.xpect.ui.runner.N4IDEXpectTestClass"
131+
fileExtension="n4js">
132+
</testSuite>
133+
</extension>
134+
<!-- JIRA/GitHub bug command -->
135+
<extension point="org.eclipse.ui.commands">
136+
<command
137+
description="Generate JIRA Bug Report"
138+
id="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.jira"
139+
name="Generate JIRA Bug Report">
140+
</command>
141+
<command
142+
description="Generate GitHub Issue Report"
143+
id="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.github"
144+
name="Generate GitHub Issue Report">
145+
</command>
146+
<command
147+
description="Compare Test Results"
148+
id="eu.numberfour.n4js.xpect.ui.runner.comparecommand"
149+
name="Compare Test Results">
150+
</command>
151+
</extension>
152+
153+
<extension point="org.eclipse.ui.handlers">
154+
<handler
155+
class="eu.numberfour.n4js.xpect.ui.results.XpectCompareCommandHandler"
156+
commandId="eu.numberfour.n4js.xpect.ui.runner.comparecommand">
157+
</handler>
158+
<handler
159+
class="eu.numberfour.n4js.xpect.ui.results.GenerateGitHubIssueXpectReportCommandHandler"
160+
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.github">
161+
</handler>
162+
<handler
163+
class="eu.numberfour.n4js.xpect.ui.results.GenerateJIRABugXpectReportCommandHandler"
164+
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.jira">
165+
</handler>
166+
</extension>
153167

168+
<extension point="org.eclipse.ui.menus">
169+
<menuContribution locationURI="popup:eu.numberfour.n4js.xpect.ui.runner.N4IDEXpectView">
170+
<command
171+
commandId="eu.numberfour.n4js.xpect.ui.runner.comparecommand"
172+
style="push">
173+
<visibleWhen>
174+
<with variable="activeMenuSelection">
175+
<test property="eu.numberfour.n4js.xpect.ui.runner.isTest" value="true"/>
176+
</with>
177+
</visibleWhen>
178+
</command>
179+
<command
180+
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.jira"
181+
style="push">
182+
<visibleWhen>
183+
<with variable="activeMenuSelection">
184+
<test property="eu.numberfour.n4js.xpect.ui.runner.isSuite" value="true"/>
185+
</with>
186+
</visibleWhen>
187+
</command>
188+
<command
189+
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.github"
190+
style="push">
191+
<visibleWhen>
192+
<with
193+
variable="activeMenuSelection">
194+
<test
195+
property="eu.numberfour.n4js.xpect.ui.runner.isSuite"
196+
value="true">
197+
</test>
198+
</with>
199+
</visibleWhen>
200+
</command>
201+
</menuContribution>
202+
</extension>
154203

155-
<extension point="org.eclipse.ui.commands">
156-
<command
157-
description="Generate JIRA Bug Report"
158-
id="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.jira"
159-
name="Generate JIRA Bug Report">
160-
</command>
161-
<command
162-
description="Generate GitHub Issue Report"
163-
id="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.github"
164-
name="Generate GitHub Issue Report">
165-
</command>
166-
<command
167-
description="Compare Test Results"
168-
id="eu.numberfour.n4js.xpect.ui.runner.comparecommand"
169-
name="Compare Test Results">
170-
</command>
171-
</extension>
172-
173-
<extension point="org.eclipse.ui.handlers">
174-
<handler
175-
class="eu.numberfour.n4js.xpect.ui.results.XpectCompareCommandHandler"
176-
commandId="eu.numberfour.n4js.xpect.ui.runner.comparecommand">
177-
</handler>
178-
<handler
179-
class="eu.numberfour.n4js.xpect.ui.results.GenerateGitHubIssueXpectReportCommandHandler"
180-
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.github">
181-
</handler>
182-
<handler
183-
class="eu.numberfour.n4js.xpect.ui.results.GenerateJIRABugXpectReportCommandHandler"
184-
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.jira">
185-
</handler>
186-
</extension>
187-
188-
189-
<extension point="org.eclipse.ui.menus">
190-
<menuContribution locationURI="popup:eu.numberfour.n4js.xpect.ui.runner.N4IDEXpectView">
191-
<command
192-
commandId="eu.numberfour.n4js.xpect.ui.runner.comparecommand"
193-
style="push">
194-
<visibleWhen>
195-
<with variable="activeMenuSelection">
196-
<test property="eu.numberfour.n4js.xpect.ui.runner.isTest" value="true"/>
197-
</with>
198-
</visibleWhen>
199-
</command>
200-
<command
201-
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.jira"
202-
style="push">
203-
<visibleWhen>
204-
<with variable="activeMenuSelection">
205-
<test property="eu.numberfour.n4js.xpect.ui.runner.isSuite" value="true"/>
206-
</with>
207-
</visibleWhen>
208-
</command>
209-
<command
210-
commandId="eu.numberfour.n4js.xpect.ui.runner.generatebugcommand.github"
211-
style="push">
212-
<visibleWhen>
213-
<with
214-
variable="activeMenuSelection">
215-
<test
216-
property="eu.numberfour.n4js.xpect.ui.runner.isSuite"
217-
value="true">
218-
</test>
219-
</with>
220-
</visibleWhen>
221-
</command>
222-
</menuContribution>
223-
</extension>
224-
225-
226-
<extension
204+
<extension
227205
point="org.eclipse.ui.contexts">
228-
<context
206+
<context
229207
id="eu.numberfour.n4js.xpect.ui.runner.N4IDEXpectView.context"
230208
name="XpectView Context"
231209
parentId="org.eclipse.ui.contexts.window">
232-
</context>
233-
</extension>
210+
</context>
211+
</extension>
234212

235213
<extension point="org.eclipse.core.expressions.propertyTesters">
236-
<propertyTester
237-
class="eu.numberfour.n4js.xpect.ui.runner.DescriptionTester"
238-
id="eu.numberfour.n4js.xpect.ui.runner.descriptionTester"
239-
namespace="eu.numberfour.n4js.xpect.ui.runner"
240-
properties="isTest, isSuite"
241-
type="org.eclipse.jface.viewers.IStructuredSelection">
242-
</propertyTester>
214+
<propertyTester
215+
class="eu.numberfour.n4js.xpect.ui.runner.DescriptionTester"
216+
id="eu.numberfour.n4js.xpect.ui.runner.descriptionTester"
217+
namespace="eu.numberfour.n4js.xpect.ui.runner"
218+
properties="isTest, isSuite"
219+
type="org.eclipse.jface.viewers.IStructuredSelection">
220+
</propertyTester>
243221
</extension>
244222

245223
</plugin>

plugins/eu.numberfour.n4jsx.xpect.ui/plugin.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Contributors:
1111
-->
1212
<?eclipse version="3.4"?>
1313
<plugin>
14-
14+
<!-- Xpect run menu item -->
1515
<extension
1616
point= "org.eclipse.debug.ui.launchShortcuts" >
1717
<shortcut
@@ -43,7 +43,7 @@ Contributors:
4343
</contextualLaunch>
4444
</shortcut>
4545
</extension>
46-
46+
<!-- JIRA/GitHub bug menu items -->
4747
<extension
4848
point= "org.eclipse.debug.ui.launchShortcuts" >
4949
<shortcut
@@ -98,6 +98,7 @@ Contributors:
9898
</shortcut>
9999
</extension>
100100

101+
<!-- Register .n4jsx file extension to XPECT -->
101102
<extension
102103
point="org.xpect.testSuite">
103104
<testSuite

0 commit comments

Comments
 (0)