blob: 3e0f17f1263b35fff6f2225dd3f263b99fe1e9ec [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
**********************************************************************
* Copyright (c) 2005, 2019 SAP SE
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* SAP SE - initial API, implementation and documentation
*
* SPDX-License-Identifier: EPL-2.0
***********************************************************************
-->
<plugin>
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
viewerId="org.eclipse.ui.navigator.ProjectExplorer">
<includes>
<contentExtension
isRoot="false"
pattern="org.eclipse.graphiti.examples.navigatorContent">
</contentExtension>
</includes>
</viewerContentBinding>
</extension>
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
contentProvider="org.eclipse.graphiti.examples.common.navigator.GFEmfTreeContentProvider"
id="org.eclipse.graphiti.examples.navigatorContent"
labelProvider="org.eclipse.graphiti.examples.common.navigator.GFEmfLabelProvider"
name="%navigatorContent.name"
priority="higher">
<triggerPoints>
<or>
<instanceof
value="org.eclipse.core.resources.IProject">
</instanceof>
</or>
</triggerPoints>
<actionProvider
class="org.eclipse.graphiti.examples.common.RenameActionProvider">
<enablement>
<and>
<instanceof
value="org.eclipse.emf.ecore.EClass">
</instanceof>
</and>
</enablement>
</actionProvider>
<possibleChildren>
<or>
<instanceof
value="org.eclipse.graphiti.examples.common.navigator.nodes.EClassesNode">
</instanceof>
<instanceof
value="org.eclipse.emf.ecore.EClass">
</instanceof>
</or>
</possibleChildren>
</navigatorContent>
<commonWizard
type="new"
wizardId="org.eclipse.graphiti.examples.ui.CreateDiagramWizard">
<enablement>
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.core.resources.projectNature"
value="org.eclipse.graphiti.examples.examplesnature"/>
</adapt>
</enablement>
</commonWizard>
</extension>
<extension
point="org.eclipse.ui.navigator.linkHelper">
<linkHelper
class="org.eclipse.graphiti.examples.common.navigator.EditorLinkHelper"
id="org.eclipse.graphiti.examples.navigatorContent">
<editorInputEnablement>
<instanceof
value="org.eclipse.graphiti.ui.editor.DiagramEditorInput">
</instanceof>
</editorInputEnablement>
<selectionEnablement>
<instanceof
value="org.eclipse.core.resources.IFile">
</instanceof>
</selectionEnablement>
</linkHelper>
</extension>
<extension
point = "org.eclipse.ui.newWizards">
<wizard
class="org.eclipse.graphiti.examples.common.ui.CreateSampleProjectWizard"
finalPerspective="org.eclipse.graphiti.examples.common.perspective.GFPerspective"
icon="icons/rialto16.gif"
id="org.eclipse.graphiti.examples.ui.CreateSampleProjectWizard"
name="%wizard.name"
project="true">
<description>%wizard.description</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
<wizard
class="org.eclipse.graphiti.examples.common.ui.CreateDiagramWizard"
finalPerspective="org.eclipse.graphiti.examples.common.perspective.GFPerspective"
icon="icons/pid16.gif"
id="org.eclipse.graphiti.examples.ui.CreateDiagramWizard"
name="%wizard.name.0">
<description>
%wizard.description.0
</description>
<selection
class="org.eclipse.core.resources.IContainer">
</selection>
</wizard>
</extension>
<extension
point="org.eclipse.core.resources.natures"
id="org.eclipse.graphiti.examples.examplesnature"
name="%nature.name">
<runtime>
<run class="org.eclipse.graphiti.examples.common.ExampleProjectNature">
</run>
</runtime>
</extension>
<extension
point="org.eclipse.graphiti.ui.imageProviders">
<imageProvider
class="org.eclipse.graphiti.examples.common.ExampleImageProvider"
id="org.eclipse.graphiti.examples.common.ExampleImageProvider">
</imageProvider>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="org.eclipse.graphiti.examples.common.preference.GraphicsTestPreferencePage"
id="org.eclipse.graphiti.examples.common.preference.GraphicsTestPreferencePage"
name="%_test_preferences_page">
</page>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
class="org.eclipse.graphiti.examples.common.perspective.GFPerspective"
fixed="false"
icon="icons/rialto16.gif"
id="org.eclipse.graphiti.examples.common.perspective.GFPerspective"
name="%perspective.name"/>
</extension>
<extension point="org.eclipse.ui.commands">
<command id="org.eclipse.graphiti.examples.common.commands.openDiagramFromFile" name="%openDiagramFromFilecommand.name" />
</extension>
<extension point="org.eclipse.ui.handlers">
<handler commandId="org.eclipse.graphiti.examples.common.commands.openDiagramFromFile" class="org.eclipse.graphiti.examples.common.handler.OpenDiagramEditorFromFileHandler">
<enabledWhen>
<reference definitionId="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected" />
</enabledWhen>
<activeWhen>
<reference definitionId="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected" />
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
<command commandId="org.eclipse.graphiti.examples.common.commands.openDiagramFromFile">
id="org.eclipse.graphiti.examples.common.menu.openDiagramFromFile">
<visibleWhen>
<reference definitionId="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected" />
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected">
<and>
<count value="1" />
<iterate ifEmpty="false" operator="and">
<adapt type="org.eclipse.core.resources.IProject">
<test property="org.eclipse.core.resources.projectNature"
value="org.eclipse.graphiti.examples.examplesnature"/>
</adapt>
</iterate>
</and>
</definition>
</extension>
<!-- Command to save a diagram file as image -->
<extension point="org.eclipse.ui.commands">
<command
defaultHandler="org.eclipse.graphiti.examples.common.handler.SaveDiagramAsImageHandler"
id="org.eclipse.graphiti.examples.common.saveAsImageCommand"
name="%saveAsImageCommand.name">
</command>
</extension>
<!-- Context menu entry when 1 diagram file is selected to save the diagram as image -->
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
<command
commandId="org.eclipse.graphiti.examples.common.saveAsImageCommand"
label="%saveAsImageCommand.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="selection">
<count value="1"/>
<iterate ifEmpty="false">
<and>
<test
property="org.eclipse.core.resources.extension"
value="diagram">
</test>
<adapt type="org.eclipse.core.resources.IFile">
</adapt>
</and>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>
</plugin>