mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
Michael Wenz | 06fccde | 2014-04-16 16:35:18 +0200 | [diff] [blame] | 2 | <?eclipse version="3.4"?> |
| 3 | <!-- |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 4 | <copyright> |
| 5 | |
mwenz | 4364ec2 | 2015-09-17 15:35:44 +0200 | [diff] [blame] | 6 | Copyright (c) 2005, 2015 SAP AG. |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 7 | All rights reserved. This program and the accompanying materials |
| 8 | are made available under the terms of the Eclipse Public License v1.0 |
| 9 | which accompanies this distribution, and is available at |
| 10 | http://www.eclipse.org/legal/epl-v10.html |
| 11 | |
| 12 | Contributors: |
| 13 | SAP AG - initial API, implementation and documentation |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 14 | mwenz - Bug 336075 - DiagramEditor accepts URIEditorInput |
Michael Wenz | 80a2fec | 2013-10-31 19:39:31 +0100 | [diff] [blame] | 15 | mwenz - Bug 418409 - Graphiti new project and new diagram wizards have disappeared from toolbar new entry |
mwenz | 4364ec2 | 2015-09-17 15:35:44 +0200 | [diff] [blame] | 16 | mwenz - Bug 423018 - Direct Graphiti diagram exporter |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 17 | |
| 18 | </copyright> |
| 19 | |
| 20 | --> |
| 21 | |
| 22 | <plugin> |
| 23 | <extension |
| 24 | point="org.eclipse.ui.navigator.viewer"> |
| 25 | <viewerContentBinding |
| 26 | viewerId="org.eclipse.ui.navigator.ProjectExplorer"> |
| 27 | <includes> |
| 28 | <contentExtension |
| 29 | isRoot="false" |
| 30 | pattern="org.eclipse.graphiti.examples.navigatorContent"> |
| 31 | </contentExtension> |
| 32 | </includes> |
| 33 | </viewerContentBinding> |
| 34 | </extension> |
| 35 | |
| 36 | <extension |
| 37 | point="org.eclipse.ui.navigator.navigatorContent"> |
| 38 | <navigatorContent |
| 39 | contentProvider="org.eclipse.graphiti.examples.common.navigator.GFEmfTreeContentProvider" |
| 40 | id="org.eclipse.graphiti.examples.navigatorContent" |
| 41 | labelProvider="org.eclipse.graphiti.examples.common.navigator.GFEmfLabelProvider" |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 42 | name="%navigatorContent.name" |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 43 | priority="higher"> |
| 44 | <triggerPoints> |
| 45 | <or> |
| 46 | <instanceof |
| 47 | value="org.eclipse.core.resources.IProject"> |
| 48 | </instanceof> |
| 49 | </or> |
| 50 | </triggerPoints> |
| 51 | <actionProvider |
| 52 | class="org.eclipse.graphiti.examples.common.RenameActionProvider"> |
| 53 | <enablement> |
| 54 | <and> |
| 55 | <instanceof |
| 56 | value="org.eclipse.emf.ecore.EClass"> |
| 57 | </instanceof> |
| 58 | </and> |
| 59 | </enablement> |
| 60 | </actionProvider> |
| 61 | <possibleChildren> |
| 62 | <or> |
| 63 | <instanceof |
| 64 | value="org.eclipse.graphiti.examples.common.navigator.nodes.EClassesNode"> |
| 65 | </instanceof> |
| 66 | <instanceof |
| 67 | value="org.eclipse.emf.ecore.EClass"> |
| 68 | </instanceof> |
| 69 | </or> |
| 70 | </possibleChildren> |
| 71 | </navigatorContent> |
| 72 | <commonWizard |
| 73 | type="new" |
| 74 | wizardId="org.eclipse.graphiti.examples.ui.CreateDiagramWizard"> |
| 75 | <enablement> |
| 76 | <adapt |
| 77 | type="org.eclipse.core.resources.IProject"> |
| 78 | <test |
| 79 | property="org.eclipse.core.resources.projectNature" |
mgorning | d8ceacb | 2010-08-25 07:17:39 +0000 | [diff] [blame] | 80 | value="org.eclipse.graphiti.examples.examplesnature"/> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 81 | </adapt> |
| 82 | </enablement> |
| 83 | </commonWizard> |
| 84 | </extension> |
jpasch | ce0d37e | 2012-05-08 14:07:26 +0200 | [diff] [blame] | 85 | |
| 86 | <extension |
| 87 | point="org.eclipse.ui.navigator.linkHelper"> |
| 88 | <linkHelper |
| 89 | class="org.eclipse.graphiti.examples.common.navigator.EditorLinkHelper" |
| 90 | id="org.eclipse.graphiti.examples.navigatorContent"> |
| 91 | <editorInputEnablement> |
| 92 | <instanceof |
| 93 | value="org.eclipse.graphiti.ui.editor.DiagramEditorInput"> |
| 94 | </instanceof> |
| 95 | </editorInputEnablement> |
| 96 | <selectionEnablement> |
| 97 | <instanceof |
| 98 | value="org.eclipse.core.resources.IFile"> |
| 99 | </instanceof> |
| 100 | </selectionEnablement> |
| 101 | </linkHelper> |
| 102 | </extension> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 103 | |
| 104 | <extension |
| 105 | point = "org.eclipse.ui.newWizards"> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 106 | <wizard |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 107 | class="org.eclipse.graphiti.examples.common.ui.CreateSampleProjectWizard" |
| 108 | finalPerspective="org.eclipse.graphiti.examples.common.perspective.GFPerspective" |
| 109 | icon="icons/rialto16.gif" |
| 110 | id="org.eclipse.graphiti.examples.ui.CreateSampleProjectWizard" |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 111 | name="%wizard.name" |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 112 | project="true"> |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 113 | <description>%wizard.description</description> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 114 | <selection class="org.eclipse.core.resources.IResource"/> |
| 115 | </wizard> |
| 116 | <wizard |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 117 | class="org.eclipse.graphiti.examples.common.ui.CreateDiagramWizard" |
| 118 | finalPerspective="org.eclipse.graphiti.examples.common.perspective.GFPerspective" |
| 119 | icon="icons/pid16.gif" |
| 120 | id="org.eclipse.graphiti.examples.ui.CreateDiagramWizard" |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 121 | name="%wizard.name.0"> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 122 | <description> |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 123 | %wizard.description.0 |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 124 | </description> |
| 125 | <selection |
| 126 | class="org.eclipse.core.resources.IContainer"> |
| 127 | </selection> |
| 128 | </wizard> |
| 129 | </extension> |
| 130 | |
| 131 | <extension |
| 132 | point="org.eclipse.core.resources.natures" |
| 133 | id="org.eclipse.graphiti.examples.examplesnature" |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 134 | name="%nature.name"> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 135 | <runtime> |
mwenz | a50420f | 2010-08-16 13:20:08 +0000 | [diff] [blame] | 136 | <run class="org.eclipse.graphiti.examples.common.ExampleProjectNature"> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 137 | </run> |
| 138 | </runtime> |
| 139 | </extension> |
| 140 | |
| 141 | <extension |
| 142 | point="org.eclipse.graphiti.ui.imageProviders"> |
| 143 | <imageProvider |
mwenz | a50420f | 2010-08-16 13:20:08 +0000 | [diff] [blame] | 144 | class="org.eclipse.graphiti.examples.common.ExampleImageProvider" |
| 145 | id="org.eclipse.graphiti.examples.common.ExampleImageProvider"> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 146 | </imageProvider> |
| 147 | </extension> |
| 148 | |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 149 | <extension |
| 150 | point="org.eclipse.ui.preferencePages"> |
| 151 | <page |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 152 | class="org.eclipse.graphiti.examples.common.preference.GraphicsTestPreferencePage" |
| 153 | id="org.eclipse.graphiti.examples.common.preference.GraphicsTestPreferencePage" |
| 154 | name="%_test_preferences_page"> |
| 155 | </page> |
| 156 | </extension> |
| 157 | |
| 158 | <extension |
| 159 | point="org.eclipse.ui.perspectives"> |
| 160 | <perspective |
| 161 | class="org.eclipse.graphiti.examples.common.perspective.GFPerspective" |
| 162 | fixed="false" |
| 163 | icon="icons/rialto16.gif" |
| 164 | id="org.eclipse.graphiti.examples.common.perspective.GFPerspective" |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 165 | name="%perspective.name"/> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 166 | </extension> |
| 167 | |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 168 | <extension point="org.eclipse.ui.commands"> |
| 169 | <command id="org.eclipse.graphiti.examples.common.commands.openDiagramFromFile" name="%openDiagramFromFilecommand.name" /> |
| 170 | </extension> |
| 171 | |
| 172 | <extension point="org.eclipse.ui.handlers"> |
mwenz | 836381a | 2013-03-06 08:54:34 +0100 | [diff] [blame] | 173 | <handler commandId="org.eclipse.graphiti.examples.common.commands.openDiagramFromFile" class="org.eclipse.graphiti.examples.common.handler.OpenDiagramEditorFromFileHandler"> |
mwenz | 5640dde | 2011-02-04 13:42:04 +0000 | [diff] [blame] | 174 | <enabledWhen> |
| 175 | <reference definitionId="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected" /> |
| 176 | </enabledWhen> |
| 177 | <activeWhen> |
| 178 | <reference definitionId="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected" /> |
| 179 | </activeWhen> |
| 180 | </handler> |
| 181 | </extension> |
| 182 | |
| 183 | <extension point="org.eclipse.ui.menus"> |
| 184 | <menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions"> |
| 185 | <command commandId="org.eclipse.graphiti.examples.common.commands.openDiagramFromFile"> |
| 186 | id="org.eclipse.graphiti.examples.common.menu.openDiagramFromFile"> |
| 187 | <visibleWhen> |
| 188 | <reference definitionId="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected" /> |
| 189 | </visibleWhen> |
| 190 | </command> |
| 191 | </menuContribution> |
| 192 | </extension> |
| 193 | |
| 194 | <extension point="org.eclipse.core.expressions.definitions"> |
| 195 | <definition id="org.eclipse.graphiti.examples.common.definitions.OneProjectSelected"> |
| 196 | <and> |
| 197 | <count value="1" /> |
| 198 | <iterate ifEmpty="false" operator="and"> |
| 199 | <adapt type="org.eclipse.core.resources.IProject"> |
| 200 | <test property="org.eclipse.core.resources.projectNature" |
| 201 | value="org.eclipse.graphiti.examples.examplesnature"/> |
| 202 | </adapt> |
| 203 | </iterate> |
| 204 | </and> |
| 205 | </definition> |
| 206 | </extension> |
mwenz | 4364ec2 | 2015-09-17 15:35:44 +0200 | [diff] [blame] | 207 | |
| 208 | <!-- Command to save a diagram file as image --> |
| 209 | <extension point="org.eclipse.ui.commands"> |
| 210 | <command |
| 211 | defaultHandler="org.eclipse.graphiti.examples.common.handler.SaveDiagramAsImageHandler" |
| 212 | id="org.eclipse.graphiti.examples.common.saveAsImageCommand" |
| 213 | name="%saveAsImageCommand.name"> |
| 214 | </command> |
| 215 | </extension> |
| 216 | |
| 217 | <!-- Context menu entry when 1 diagram file is selected to save the diagram as image --> |
| 218 | <extension point="org.eclipse.ui.menus"> |
| 219 | <menuContribution |
| 220 | locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions"> |
| 221 | <command |
| 222 | commandId="org.eclipse.graphiti.examples.common.saveAsImageCommand" |
| 223 | label="%saveAsImageCommand.label" |
| 224 | style="push"> |
| 225 | <visibleWhen checkEnabled="false"> |
| 226 | <with variable="selection"> |
| 227 | <count value="1"/> |
| 228 | <iterate ifEmpty="false"> |
| 229 | <and> |
| 230 | <test |
| 231 | property="org.eclipse.core.resources.extension" |
| 232 | value="diagram"> |
| 233 | </test> |
| 234 | <adapt type="org.eclipse.core.resources.IFile"> |
| 235 | </adapt> |
| 236 | </and> |
| 237 | </iterate> |
| 238 | </with> |
| 239 | </visibleWhen> |
| 240 | </command> |
| 241 | </menuContribution> |
| 242 | </extension> |
mwenz | b5dc2f9 | 2010-06-16 13:24:52 +0000 | [diff] [blame] | 243 | </plugin> |