blob: 6360a06578d57574964950435b6645cf2396cee3 [file] [log] [blame]
Dollynbc58bd72013-05-29 23:58:28 +08001<?xml version="1.0" encoding="UTF-8"?>
2<?eclipse version="3.0"?>
3
4<plugin>
5
6 <extension
7 point="org.eclipse.ui.editors">
8 <editor
9 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
10 contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
11 default="true"
12 extensions="go"
13 id="me.dollyn.goide.Golang"
14 name="Golang Editor">
15 </editor>
16 </extension>
17 <extension
18 point="org.eclipse.ui.handlers">
19 <handler
20 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
21 commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
22 <activeWhen>
23 <reference
24 definitionId="me.dollyn.goide.Golang.Editor.opened">
25 </reference>
26 </activeWhen>
27 </handler>
28 <handler
29 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
30 commandId="me.dollyn.goide.Golang.validate">
31 <activeWhen>
32 <reference
33 definitionId="me.dollyn.goide.Golang.Editor.opened">
34 </reference>
35 </activeWhen>
36 </handler>
37 <!-- copy qualified name -->
38 <handler
39 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
40 commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
41 <activeWhen>
42 <reference definitionId="me.dollyn.goide.Golang.Editor.opened" />
43 </activeWhen>
44 </handler>
45 <handler
46 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
47 commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
48 <activeWhen>
49 <and>
50 <reference definitionId="me.dollyn.goide.Golang.XtextEditor.opened" />
51 <iterate>
52 <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
53 </iterate>
54 </and>
55 </activeWhen>
56 </handler>
57 </extension>
58 <extension point="org.eclipse.core.expressions.definitions">
59 <definition id="me.dollyn.goide.Golang.Editor.opened">
60 <and>
61 <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
62 <with variable="activeEditor">
63 <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
64 value="me.dollyn.goide.Golang"
65 forcePluginActivation="true"/>
66 </with>
67 </and>
68 </definition>
69 <definition id="me.dollyn.goide.Golang.XtextEditor.opened">
70 <and>
71 <reference definitionId="isXtextEditorActive"/>
72 <with variable="activeEditor">
73 <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
74 value="me.dollyn.goide.Golang"
75 forcePluginActivation="true"/>
76 </with>
77 </and>
78 </definition>
79 </extension>
80 <extension
81 point="org.eclipse.ui.preferencePages">
82 <page
83 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
84 id="me.dollyn.goide.Golang"
85 name="Golang">
86 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
87 </page>
88 <page
89 category="me.dollyn.goide.Golang"
90 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
91 id="me.dollyn.goide.Golang.coloring"
92 name="Syntax Coloring">
93 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
94 </page>
95 <page
96 category="me.dollyn.goide.Golang"
97 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
98 id="me.dollyn.goide.Golang.templates"
99 name="Templates">
100 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
101 </page>
102 </extension>
103 <extension
104 point="org.eclipse.ui.propertyPages">
105 <page
106 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
107 id="me.dollyn.goide.Golang"
108 name="Golang">
109 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
110 <enabledWhen>
111 <adapt type="org.eclipse.core.resources.IProject"/>
112 </enabledWhen>
113 <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
114 </page>
115 </extension>
116 <extension
117 point="org.eclipse.ui.keywords">
118 <keyword
119 id="me.dollyn.goide.ui.keyword_Golang"
120 label="Golang"/>
121 </extension>
122 <extension
123 point="org.eclipse.ui.commands">
124 <command
125 description="Trigger expensive validation"
126 id="me.dollyn.goide.Golang.validate"
127 name="Validate">
128 </command>
129 <!-- copy qualified name -->
130 <command
131 id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
132 categoryId="org.eclipse.ui.category.edit"
133 description="Copy the qualified name for the selected element"
134 name="Copy Qualified Name">
135 </command>
136 <command
137 id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
138 categoryId="org.eclipse.ui.category.edit"
139 description="Copy the qualified name for the selected element"
140 name="Copy Qualified Name">
141 </command>
142 </extension>
143 <extension point="org.eclipse.ui.menus">
144 <menuContribution
145 locationURI="popup:#TextEditorContext?after=group.edit">
146 <command
147 commandId="me.dollyn.goide.Golang.validate"
148 style="push"
149 tooltip="Trigger expensive validation">
150 <visibleWhen checkEnabled="false">
151 <reference
152 definitionId="me.dollyn.goide.Golang.Editor.opened">
153 </reference>
154 </visibleWhen>
155 </command>
156 </menuContribution>
157 <!-- copy qualified name -->
158 <menuContribution locationURI="popup:#TextEditorContext?after=copy">
159 <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
160 style="push" tooltip="Copy Qualified Name">
161 <visibleWhen checkEnabled="false">
162 <reference definitionId="me.dollyn.goide.Golang.Editor.opened" />
163 </visibleWhen>
164 </command>
165 </menuContribution>
166 <menuContribution locationURI="menu:edit?after=copy">
167 <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
168 style="push" tooltip="Copy Qualified Name">
169 <visibleWhen checkEnabled="false">
170 <reference definitionId="me.dollyn.goide.Golang.Editor.opened" />
171 </visibleWhen>
172 </command>
173 </menuContribution>
174 <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
175 <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
176 style="push" tooltip="Copy Qualified Name">
177 <visibleWhen checkEnabled="false">
178 <and>
179 <reference definitionId="me.dollyn.goide.Golang.XtextEditor.opened" />
180 <iterate>
181 <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
182 </iterate>
183 </and>
184 </visibleWhen>
185 </command>
186 </menuContribution>
187 </extension>
188 <extension point="org.eclipse.ui.menus">
189 <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
190 <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
191 <visibleWhen checkEnabled="false">
192 <reference definitionId="me.dollyn.goide.Golang.Editor.opened">
193 </reference>
194 </visibleWhen>
195 </command>
196 </menuContribution>
197 </extension>
198 <extension point="org.eclipse.ui.handlers">
199 <handler
200 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
201 commandId="org.eclipse.xtext.ui.editor.FindReferences">
202 <activeWhen>
203 <reference
204 definitionId="me.dollyn.goide.Golang.Editor.opened">
205 </reference>
206 </activeWhen>
207 </handler>
208 </extension>
209
210<!-- adding resource factories -->
211
212 <extension
213 point="org.eclipse.emf.ecore.extension_parser">
214 <parser
215 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
216 type="go">
217 </parser>
218 </extension>
219 <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
220 <resourceServiceProvider
221 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
222 uriExtension="go">
223 </resourceServiceProvider>
224 </extension>
225
226
227 <!-- marker definitions for me.dollyn.goide.Golang -->
228 <extension
229 id="golang.check.fast"
230 name="Golang Problem"
231 point="org.eclipse.core.resources.markers">
232 <super type="org.eclipse.xtext.ui.check.fast"/>
233 <persistent value="true"/>
234 </extension>
235 <extension
236 id="golang.check.normal"
237 name="Golang Problem"
238 point="org.eclipse.core.resources.markers">
239 <super type="org.eclipse.xtext.ui.check.normal"/>
240 <persistent value="true"/>
241 </extension>
242 <extension
243 id="golang.check.expensive"
244 name="Golang Problem"
245 point="org.eclipse.core.resources.markers">
246 <super type="org.eclipse.xtext.ui.check.expensive"/>
247 <persistent value="true"/>
248 </extension>
249
250 <extension
251 point="org.eclipse.xtext.builder.participant">
252 <participant
253 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
254 </participant>
255 </extension>
256 <extension
257 point="org.eclipse.ui.preferencePages">
258 <page
259 category="me.dollyn.goide.Golang"
260 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
261 id="me.dollyn.goide.Golang.compiler.preferencePage"
262 name="Compiler">
263 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
264 </page>
265 </extension>
266 <extension
267 point="org.eclipse.ui.propertyPages">
268 <page
269 category="me.dollyn.goide.Golang"
270 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
271 id="me.dollyn.goide.Golang.compiler.propertyPage"
272 name="Compiler">
273 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
274 <enabledWhen>
275 <adapt type="org.eclipse.core.resources.IProject"/>
276 </enabledWhen>
277 <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
278 </page>
279 </extension>
280
281 <!-- Quick Outline -->
282 <extension
283 point="org.eclipse.ui.handlers">
284 <handler
285 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
286 commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
287 <activeWhen>
288 <reference
289 definitionId="me.dollyn.goide.Golang.Editor.opened">
290 </reference>
291 </activeWhen>
292 </handler>
293 </extension>
294 <extension
295 point="org.eclipse.ui.commands">
296 <command
297 description="Open the quick outline."
298 id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
299 name="Quick Outline">
300 </command>
301 </extension>
302 <extension point="org.eclipse.ui.menus">
303 <menuContribution
304 locationURI="popup:#TextEditorContext?after=group.open">
305 <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
306 style="push"
307 tooltip="Open Quick Outline">
308 <visibleWhen checkEnabled="false">
309 <reference definitionId="me.dollyn.goide.Golang.Editor.opened"/>
310 </visibleWhen>
311 </command>
312 </menuContribution>
313 </extension>
314 <!-- quickfix marker resolution generator for me.dollyn.goide.Golang -->
315 <extension
316 point="org.eclipse.ui.ide.markerResolution">
317 <markerResolutionGenerator
318 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
319 markerType="me.dollyn.goide.ui.golang.check.fast">
320 <attribute
321 name="FIXABLE_KEY"
322 value="true">
323 </attribute>
324 </markerResolutionGenerator>
325 <markerResolutionGenerator
326 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
327 markerType="me.dollyn.goide.ui.golang.check.normal">
328 <attribute
329 name="FIXABLE_KEY"
330 value="true">
331 </attribute>
332 </markerResolutionGenerator>
333 <markerResolutionGenerator
334 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
335 markerType="me.dollyn.goide.ui.golang.check.expensive">
336 <attribute
337 name="FIXABLE_KEY"
338 value="true">
339 </attribute>
340 </markerResolutionGenerator>
341 </extension>
342 <!-- Rename Refactoring -->
343 <extension point="org.eclipse.ui.handlers">
344 <handler
345 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
346 commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
347 <activeWhen>
348 <reference
349 definitionId="me.dollyn.goide.Golang.Editor.opened">
350 </reference>
351 </activeWhen>
352 </handler>
353 </extension>
354 <extension point="org.eclipse.ui.menus">
355 <menuContribution
356 locationURI="popup:#TextEditorContext?after=group.edit">
357 <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
358 style="push">
359 <visibleWhen checkEnabled="false">
360 <reference
361 definitionId="me.dollyn.goide.Golang.Editor.opened">
362 </reference>
363 </visibleWhen>
364 </command>
365 </menuContribution>
366 </extension>
367 <extension point="org.eclipse.ui.preferencePages">
368 <page
369 category="me.dollyn.goide.Golang"
370 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
371 id="me.dollyn.goide.Golang.refactoring"
372 name="Refactoring">
373 <keywordReference id="me.dollyn.goide.ui.keyword_Golang"/>
374 </page>
375 </extension>
376
377 <extension point="org.eclipse.compare.contentViewers">
378 <viewer id="me.dollyn.goide.Golang.compare.contentViewers"
379 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
380 extensions="go">
381 </viewer>
382 </extension>
383 <extension point="org.eclipse.compare.contentMergeViewers">
384 <viewer id="me.dollyn.goide.Golang.compare.contentMergeViewers"
385 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
386 extensions="go" label="Golang Compare">
387 </viewer>
388 </extension>
389 <extension point="org.eclipse.ui.editors.documentProviders">
390 <provider id="me.dollyn.goide.Golang.editors.documentProviders"
391 class="me.dollyn.goide.ui.GolangExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
392 extensions="go">
393 </provider>
394 </extension>
395
396</plugin>