| <?xml version="1.0" encoding="UTF-8"?> |
| <?eclipse version="3.0"?> |
| <!-- |
| Copyright (c) 2014 1C LLC. |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| |
| Contributors: |
| Vladimir Piskarev (1C) - initial API and implementation |
| --> |
| |
| <plugin> |
| |
| <extension |
| point="org.eclipse.ui.editors"> |
| <editor |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" |
| contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" |
| default="true" |
| extensions="foo" |
| id="org.eclipse.handly.examples.basic.Foo" |
| name="Foo Editor"> |
| </editor> |
| </extension> |
| <extension |
| point="org.eclipse.ui.handlers"> |
| <handler |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" |
| commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened"> |
| </reference> |
| </activeWhen> |
| </handler> |
| <handler |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" |
| commandId="org.eclipse.handly.examples.basic.Foo.validate"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened"> |
| </reference> |
| </activeWhen> |
| </handler> |
| <!-- copy qualified name --> |
| <handler |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" |
| commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> |
| <activeWhen> |
| <reference definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened" /> |
| </activeWhen> |
| </handler> |
| <handler |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" |
| commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> |
| <activeWhen> |
| <and> |
| <reference definitionId="org.eclipse.handly.examples.basic.Foo.XtextEditor.opened" /> |
| <iterate> |
| <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> |
| </iterate> |
| </and> |
| </activeWhen> |
| </handler> |
| </extension> |
| <extension point="org.eclipse.core.expressions.definitions"> |
| <definition id="org.eclipse.handly.examples.basic.Foo.Editor.opened"> |
| <and> |
| <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> |
| <with variable="activeEditor"> |
| <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" |
| value="org.eclipse.handly.examples.basic.Foo" |
| forcePluginActivation="true"/> |
| </with> |
| </and> |
| </definition> |
| <definition id="org.eclipse.handly.examples.basic.Foo.XtextEditor.opened"> |
| <and> |
| <reference definitionId="isXtextEditorActive"/> |
| <with variable="activeEditor"> |
| <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" |
| value="org.eclipse.handly.examples.basic.Foo" |
| forcePluginActivation="true"/> |
| </with> |
| </and> |
| </definition> |
| </extension> |
| <extension |
| point="org.eclipse.ui.preferencePages"> |
| <page |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" |
| id="org.eclipse.handly.examples.basic.Foo" |
| name="Foo"> |
| <keywordReference id="org.eclipse.handly.examples.basic.ui.keyword_Foo"/> |
| </page> |
| <page |
| category="org.eclipse.handly.examples.basic.Foo" |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" |
| id="org.eclipse.handly.examples.basic.Foo.coloring" |
| name="Syntax Coloring"> |
| <keywordReference id="org.eclipse.handly.examples.basic.ui.keyword_Foo"/> |
| </page> |
| <page |
| category="org.eclipse.handly.examples.basic.Foo" |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" |
| id="org.eclipse.handly.examples.basic.Foo.templates" |
| name="Templates"> |
| <keywordReference id="org.eclipse.handly.examples.basic.ui.keyword_Foo"/> |
| </page> |
| </extension> |
| <extension |
| point="org.eclipse.ui.propertyPages"> |
| <page |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" |
| id="org.eclipse.handly.examples.basic.Foo" |
| name="Foo"> |
| <keywordReference id="org.eclipse.handly.examples.basic.ui.keyword_Foo"/> |
| <enabledWhen> |
| <adapt type="org.eclipse.core.resources.IProject"/> |
| </enabledWhen> |
| <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> |
| </page> |
| </extension> |
| <extension |
| point="org.eclipse.ui.keywords"> |
| <keyword |
| id="org.eclipse.handly.examples.basic.ui.keyword_Foo" |
| label="Foo"/> |
| </extension> |
| <extension |
| point="org.eclipse.ui.commands"> |
| <command |
| description="Trigger expensive validation" |
| id="org.eclipse.handly.examples.basic.Foo.validate" |
| name="Validate"> |
| </command> |
| <!-- copy qualified name --> |
| <command |
| id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" |
| categoryId="org.eclipse.ui.category.edit" |
| description="Copy the qualified name for the selected element" |
| name="Copy Qualified Name"> |
| </command> |
| <command |
| id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" |
| categoryId="org.eclipse.ui.category.edit" |
| description="Copy the qualified name for the selected element" |
| name="Copy Qualified Name"> |
| </command> |
| </extension> |
| <extension point="org.eclipse.ui.menus"> |
| <menuContribution |
| locationURI="popup:#TextEditorContext?after=group.edit"> |
| <command |
| commandId="org.eclipse.handly.examples.basic.Foo.validate" |
| style="push" |
| tooltip="Trigger expensive validation"> |
| <visibleWhen checkEnabled="false"> |
| <reference |
| definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened"> |
| </reference> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| <!-- copy qualified name --> |
| <menuContribution locationURI="popup:#TextEditorContext?after=copy"> |
| <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" |
| style="push" tooltip="Copy Qualified Name"> |
| <visibleWhen checkEnabled="false"> |
| <reference definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened" /> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| <menuContribution locationURI="menu:edit?after=copy"> |
| <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" |
| style="push" tooltip="Copy Qualified Name"> |
| <visibleWhen checkEnabled="false"> |
| <reference definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened" /> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> |
| <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" |
| style="push" tooltip="Copy Qualified Name"> |
| <visibleWhen checkEnabled="false"> |
| <and> |
| <reference definitionId="org.eclipse.handly.examples.basic.Foo.XtextEditor.opened" /> |
| <iterate> |
| <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> |
| </iterate> |
| </and> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| </extension> |
| <extension point="org.eclipse.ui.menus"> |
| <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> |
| <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> |
| <visibleWhen checkEnabled="false"> |
| <reference definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened"> |
| </reference> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| </extension> |
| <extension point="org.eclipse.ui.handlers"> |
| <handler |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" |
| commandId="org.eclipse.xtext.ui.editor.FindReferences"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.handly.examples.basic.Foo.Editor.opened"> |
| </reference> |
| </activeWhen> |
| </handler> |
| </extension> |
| |
| <!-- adding resource factories --> |
| |
| <extension |
| point="org.eclipse.emf.ecore.extension_parser"> |
| <parser |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" |
| type="foo"> |
| </parser> |
| </extension> |
| <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> |
| <resourceServiceProvider |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" |
| uriExtension="foo"> |
| </resourceServiceProvider> |
| </extension> |
| |
| <!-- hand-written --> |
| |
| <extension |
| id="fooNature" |
| name="Foo Project Nature" |
| point="org.eclipse.core.resources.natures"> |
| <runtime> |
| <run |
| class="org.eclipse.handly.internal.examples.basic.ui.model.FooProjectNature"> |
| </run> |
| </runtime> |
| <requires-nature |
| id="org.eclipse.xtext.ui.shared.xtextNature"> |
| </requires-nature> |
| </extension> |
| <extension |
| point="org.eclipse.core.runtime.adapters"> |
| <factory |
| adaptableType="org.eclipse.handly.examples.basic.ui.model.IFooElement" |
| class="org.eclipse.handly.internal.examples.basic.ui.model.FooElementAdapterFactory"> |
| <adapter |
| type="org.eclipse.core.resources.IResource"> |
| </adapter> |
| </factory> |
| </extension> |
| <extension |
| point="org.eclipse.ui.newWizards"> |
| <category |
| id="org.eclipse.handly.examples.basic.ui.fooCategory" |
| name="Foo"> |
| </category> |
| <wizard |
| id="org.eclipse.handly.examples.basic.ui.wizards.new.fooProject" |
| name="Foo Project" |
| icon="icons/etool16/newprj_wiz.gif" |
| class="org.eclipse.handly.examples.basic.ui.FooExecutableExtensionFactory:org.eclipse.handly.internal.examples.basic.ui.wizards.NewFooProjectWizard" |
| category="org.eclipse.handly.examples.basic.ui.fooCategory" |
| project="true"> |
| </wizard> |
| </extension> |
| |
| <extension |
| point="org.eclipse.ui.views"> |
| <category |
| id="org.eclipse.handly.examples.basic.ui.fooCategory" |
| name="Foo"> |
| </category> |
| <view |
| id="org.eclipse.handly.examples.basic.ui.views.fooNavigator" |
| name="Foo Navigator" |
| class="org.eclipse.handly.internal.examples.basic.ui.navigator.FooNavigator" |
| category="org.eclipse.handly.examples.basic.ui.fooCategory" |
| restorable="true"> |
| </view> |
| </extension> |
| <extension |
| point="org.eclipse.ui.navigator.viewer"> |
| <viewer |
| viewerId="org.eclipse.handly.examples.basic.ui.views.fooNavigator"> |
| </viewer> |
| <viewerContentBinding |
| viewerId="org.eclipse.handly.examples.basic.ui.views.fooNavigator"> |
| <includes> |
| <contentExtension |
| pattern="org.eclipse.handly.examples.basic.ui.navigator.fooContent"> |
| </contentExtension> |
| <contentExtension |
| pattern="org.eclipse.handly.examples.basic.ui.navigator.fooLinkHelper"> |
| </contentExtension> |
| <contentExtension |
| pattern="org.eclipse.ui.navigator.resources.filters.startsWithDot"> |
| </contentExtension> |
| </includes> |
| </viewerContentBinding> |
| <viewerActionBinding |
| viewerId="org.eclipse.handly.examples.basic.ui.views.fooNavigator"> |
| <includes> |
| <actionExtension |
| pattern="org.eclipse.handly.examples.basic.ui.navigator.OpenActionProvider"> |
| </actionExtension> |
| </includes> |
| </viewerActionBinding> |
| </extension> |
| <extension |
| point="org.eclipse.ui.navigator.navigatorContent"> |
| <navigatorContent |
| id="org.eclipse.handly.examples.basic.ui.navigator.fooContent" |
| name="Foo Content" |
| contentProvider="org.eclipse.handly.internal.examples.basic.ui.FooContentProvider" |
| labelProvider="org.eclipse.handly.internal.examples.basic.ui.FooLabelProvider"> |
| <triggerPoints> |
| <or> |
| <instanceof |
| value="org.eclipse.handly.examples.basic.ui.model.IFooElement"> |
| </instanceof> |
| <instanceof |
| value="org.eclipse.core.resources.IFolder"> |
| </instanceof> |
| </or> |
| </triggerPoints> |
| <possibleChildren> |
| <or> |
| <instanceof |
| value="org.eclipse.handly.examples.basic.ui.model.IFooElement"> |
| </instanceof> |
| <instanceof |
| value="org.eclipse.core.resources.IFolder"> |
| </instanceof> |
| <instanceof |
| value="org.eclipse.core.resources.IFile"> |
| </instanceof> |
| </or> |
| </possibleChildren> |
| </navigatorContent> |
| <actionProvider |
| id="org.eclipse.handly.examples.basic.ui.navigator.OpenActionProvider" |
| class="org.eclipse.handly.internal.examples.basic.ui.navigator.OpenActionProvider"> |
| <enablement></enablement> |
| </actionProvider> |
| </extension> |
| <extension |
| point="org.eclipse.ui.navigator.linkHelper"> |
| <linkHelper |
| id="org.eclipse.handly.examples.basic.ui.navigator.fooLinkHelper" |
| class="org.eclipse.handly.internal.examples.basic.ui.navigator.FooLinkHelper"> |
| <editorInputEnablement> |
| <or> |
| <instanceof |
| value="org.eclipse.ui.IFileEditorInput"> |
| </instanceof> |
| </or> |
| </editorInputEnablement> |
| <selectionEnablement> |
| <or> |
| <instanceof |
| value="org.eclipse.handly.examples.basic.ui.model.IFooElement"> |
| </instanceof> |
| <instanceof |
| value="org.eclipse.core.resources.IResource"> |
| </instanceof> |
| </or> |
| </selectionEnablement> |
| </linkHelper> |
| </extension> |
| |
| </plugin> |