blob: 86a2fd3171879a068a6b3b542a6c083918e06400 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
**********************************************************************
* Copyright (c) 2013, 2019 SRC
*
* 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>
<!-- Add the additional view to the Graphiti perspective -->
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.graphiti.examples.common.perspective.GFPerspective">
<view
id="org.eclipse.graphiti.examples.composite.diagramViewExample"
minimized="false"
relationship="stack"
relative="org.eclipse.ui.views.ProblemView">
</view>
</perspectiveExtension>
</extension>
<!-- A view displaying a Graphiti diagram -->
<extension point="org.eclipse.ui.views">
<view
class="org.eclipse.graphiti.examples.composite.view.DiagramCompositeViewExample"
id="org.eclipse.graphiti.examples.composite.diagramViewExample"
name="%view.name"
restorable="true">
</view>
</extension>
<!-- The command to open the popup with 2 diagrams -->
<extension point="org.eclipse.ui.commands">
<command
defaultHandler="org.eclipse.graphiti.examples.composite.dialog.PreviewDiagramHandler"
id="org.eclipse.graphiti.examples.composite.previewCommand"
name="%previewCommand.name">
</command>
</extension>
<!-- Context menu entry when 2 diagram files are selected to open a popup showing both diagrams -->
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
<command
commandId="org.eclipse.graphiti.examples.composite.previewCommand"
label="%previewCommand.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="selection">
<count value="2"/>
<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>