diff options
Diffstat (limited to 'plugins/infra/gmfdiag')
5 files changed, 570 insertions, 314 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java index 25cec4c4d63..726386e16b2 100644 --- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java +++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java @@ -102,8 +102,21 @@ public class ResetStyleCommand extends RecordingCommand { Object styleObject = styleIterator.next();
if(styleObject instanceof NamedStyle) {
NamedStyle customStyle = (NamedStyle)styleObject;
+
if(!CSSStyles.RESERVED_KEYWORDS.contains(customStyle.getName())) {
- styleIterator.remove();
+
+ //Remove only NamedStyle which are supported by the CSS Implementation
+ //See org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate.getCSSNamedStyle(EClass, String)
+ //See Bug 425190 - [CSS] Loss of Notation information when CSS style is applied on Edges.
+ switch(customStyle.eClass().getClassifierID()) {
+ case NotationPackage.STRING_VALUE_STYLE:
+ case NotationPackage.BOOLEAN_VALUE_STYLE:
+ case NotationPackage.INT_VALUE_STYLE:
+ case NotationPackage.DOUBLE_VALUE_STYLE:
+ case NotationPackage.STRING_LIST_VALUE_STYLE:
+ styleIterator.remove();
+ }
+
}
} else if(styleObject instanceof Style) {
resetStyle((Style)styleObject);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml index 45243f3c623..7021ed3753b 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml @@ -1,178 +1,179 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin>
- <extension-point id="nestedEditor" name="NestedEditor" schema="schema/nestedEditor.exsd"/>
- <extension-point id="initializeView" name="initializeView" schema="schema/initializeView.exsd"/>
- <extension-point id="shapeProvider" name="ShapeProvider" schema="schema/shapeProvider.exsd"/>
- <extension-point id="notationTypesMapping" name="notationTypesMapping" schema="schema/notationTypesMapping.exsd"/>
- <extension-point id="svgPostProcessors" name="svgPostProcessors" schema="schema/svgPostProcessors.exsd"/>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> -<extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.common.handler.RefreshHandler"
- commandId="org.eclipse.ui.file.refresh">
- <activeWhen>
- <with
- variable="activePartId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </activeWhen>
- </handler>
-</extension>
-<extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipes.papyrus.menu.toolbar">
- <command
- commandId="org.eclipse.ui.file.refresh"
- icon="icons/refresh.gif"
- label="Refresh"
- style="push"
- tooltip="Refresh the current diagram">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-</extension>
-<extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
- class="org.eclipse.papyrus.infra.gmfdiag.common.preferences.ConnectionToolPreferencePage"
- id="org.eclipse.papyrus.infra.gmfdiag.common.connectionTools"
- name="Connection Tools">
- </page>
-</extension>
-<extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.papyrus.infra.gmfdiag.common.preferences.ConnectionToolPreferenceInitializer">
- </initializer>
-</extension>
- <extension
- point="org.eclipse.papyrus.infra.core.model">
- <model
- classname="org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel"
- description="Model for notation">
- </model>
- </extension>
-
-
- <extension
- point="org.eclipse.emf.ecore.extension_parser">
- <parser
- class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"
- type="notation">
- </parser>
- </extension>
-<extension
- point="org.eclipse.papyrus.infra.core.service">
- <serviceFactory
- classname="org.eclipse.papyrus.infra.gmfdiag.common.undocontext.UndoContextServiceFactory"
- description="The shared IUndoContext used to tag command in the CommandStack"
- id="org.eclipse.core.commands.operations.IUndoContext"
- priority="1"
- startKind="lazy">
- <dependsOn
- serviceKeyRef="org.eclipse.emf.transaction.TransactionalEditingDomain">
- </dependsOn>
- </serviceFactory>
- <service
- classname="org.eclipse.papyrus.infra.gmfdiag.common.DefaultGraphicalEditorSupport"
- description="The default diagram editor support implementation."
- id="org.eclipse.papyrus.infra.gmfdiag.common.IGraphicalEditorSupport"
- priority="1"
- startKind="lazy">
- </service>
- </extension>
-<extension
- point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
- <labelProvider
- priority="40"
- provider="org.eclipse.papyrus.infra.gmfdiag.common.providers.NotationFilteredLabelProvider">
- </labelProvider>
-</extension>
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <decoratorProvider
- class="org.eclipse.papyrus.infra.gmfdiag.common.providers.ShapeDecoratorProvider">
- <Priority
- name="Lowest">
- </Priority>
- </decoratorProvider>
-</extension>
-<extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.gmf.runtime.notation.Diagram"
- class="org.eclipse.papyrus.infra.gmfdiag.common.adapter.DiagramAdapterFactory">
- <adapter
- type="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable">
- </adapter>
- </factory>
-</extension>
-
-<!-- ElementType bindings for diagram duplication with paste command -->
- <extension
- point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
- <metamodel
- nsURI="http://www.eclipse.org/emf/2002/Ecore">
- <adviceBinding
- class="org.eclipse.papyrus.infra.gmfdiag.common.advice.GMFDiagramDuplicateEditHelperAdvice"
- id="org.eclipse.papyrus.infra.gmfdiag.common.advice.GMFDiagramDuplicateEditHelperAdvice"
- inheritance="none"
- typeId="*">
- </adviceBinding>
- </metamodel>
- </extension>
-
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
-
- <!-- Bindings declaration -->
- <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
- <advice ref="org.eclipse.papyrus.infra.gmfdiag.common.advice.GMFDiagramDuplicateEditHelperAdvice" />
- </binding>
-</extension>
-<extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramPropertyTester"
- id="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester"
- namespace="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester"
- properties="isDiagramEditor"
- type="org.eclipse.jface.viewers.IStructuredSelection">
- </propertyTester>
- <propertyTester
- class="org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramPropertyTester"
- id="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester"
- namespace="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester"
- properties="isGmfDiagramContextActive"
- type="java.util.Collection">
+<plugin> + <extension-point id="nestedEditor" name="NestedEditor" schema="schema/nestedEditor.exsd"/> + <extension-point id="initializeView" name="initializeView" schema="schema/initializeView.exsd"/> + <extension-point id="shapeProvider" name="ShapeProvider" schema="schema/shapeProvider.exsd"/> + <extension-point id="notationTypesMapping" name="notationTypesMapping" schema="schema/notationTypesMapping.exsd"/> + <extension-point id="svgPostProcessors" name="svgPostProcessors" schema="schema/svgPostProcessors.exsd"/> + <extension-point id="pasteCommandProvider" name="pasteCommandProvider" schema="schema/pasteCommandProvider.exsd"/> + +<extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.infra.gmfdiag.common.handler.RefreshHandler" + commandId="org.eclipse.ui.file.refresh"> + <activeWhen> + <with + variable="activePartId"> + <equals + value="org.eclipse.papyrus.infra.core.papyrusEditor"> + </equals> + </with> + </activeWhen> + </handler> +</extension> +<extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="toolbar:org.eclipes.papyrus.menu.toolbar"> + <command + commandId="org.eclipse.ui.file.refresh" + icon="icons/refresh.gif" + label="Refresh" + style="push" + tooltip="Refresh the current diagram"> + <visibleWhen + checkEnabled="false"> + <with + variable="activeEditorId"> + <equals + value="org.eclipse.papyrus.infra.core.papyrusEditor"> + </equals> + </with> + </visibleWhen> + </command> + </menuContribution> +</extension> +<extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory" + class="org.eclipse.papyrus.infra.gmfdiag.common.preferences.ConnectionToolPreferencePage" + id="org.eclipse.papyrus.infra.gmfdiag.common.connectionTools" + name="Connection Tools"> + </page> +</extension> +<extension + point="org.eclipse.core.runtime.preferences"> + <initializer + class="org.eclipse.papyrus.infra.gmfdiag.common.preferences.ConnectionToolPreferenceInitializer"> + </initializer> +</extension> + <extension + point="org.eclipse.papyrus.infra.core.model"> + <model + classname="org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel" + description="Model for notation"> + </model> + </extension> + + + <extension + point="org.eclipse.emf.ecore.extension_parser"> + <parser + class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory" + type="notation"> + </parser> + </extension> +<extension + point="org.eclipse.papyrus.infra.core.service"> + <serviceFactory + classname="org.eclipse.papyrus.infra.gmfdiag.common.undocontext.UndoContextServiceFactory" + description="The shared IUndoContext used to tag command in the CommandStack" + id="org.eclipse.core.commands.operations.IUndoContext" + priority="1" + startKind="lazy"> + <dependsOn + serviceKeyRef="org.eclipse.emf.transaction.TransactionalEditingDomain"> + </dependsOn> + </serviceFactory> + <service + classname="org.eclipse.papyrus.infra.gmfdiag.common.DefaultGraphicalEditorSupport" + description="The default diagram editor support implementation." + id="org.eclipse.papyrus.infra.gmfdiag.common.IGraphicalEditorSupport" + priority="1" + startKind="lazy"> + </service> + </extension> +<extension + point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider"> + <labelProvider + priority="40" + provider="org.eclipse.papyrus.infra.gmfdiag.common.providers.NotationFilteredLabelProvider"> + </labelProvider> +</extension> +<extension + point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders"> + <decoratorProvider + class="org.eclipse.papyrus.infra.gmfdiag.common.providers.ShapeDecoratorProvider"> + <Priority + name="Lowest"> + </Priority> + </decoratorProvider> +</extension> +<extension + point="org.eclipse.core.runtime.adapters"> + <factory + adaptableType="org.eclipse.gmf.runtime.notation.Diagram" + class="org.eclipse.papyrus.infra.gmfdiag.common.adapter.DiagramAdapterFactory"> + <adapter + type="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable"> + </adapter> + </factory> +</extension> + +<!-- ElementType bindings for diagram duplication with paste command --> + <extension + point="org.eclipse.gmf.runtime.emf.type.core.elementTypes"> + <metamodel + nsURI="http://www.eclipse.org/emf/2002/Ecore"> + <adviceBinding + class="org.eclipse.papyrus.infra.gmfdiag.common.advice.GMFDiagramDuplicateEditHelperAdvice" + id="org.eclipse.papyrus.infra.gmfdiag.common.advice.GMFDiagramDuplicateEditHelperAdvice" + inheritance="none" + typeId="*"> + </adviceBinding> + </metamodel> + </extension> + +<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings"> + + <!-- Bindings declaration --> + <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext"> + <advice ref="org.eclipse.papyrus.infra.gmfdiag.common.advice.GMFDiagramDuplicateEditHelperAdvice" /> + </binding> +</extension> +<extension + point="org.eclipse.core.expressions.propertyTesters"> + <propertyTester + class="org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramPropertyTester" + id="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester" + namespace="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester" + properties="isDiagramEditor" + type="org.eclipse.jface.viewers.IStructuredSelection"> </propertyTester> -</extension>
-<extension
- point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
- <shapeProvider
- class="org.eclipse.papyrus.infra.gmfdiag.common.providers.StyleBasedShapeProvider"
- description="Provides shapes based on the applied styles."
- id="org.eclipse.papyrus.infra.gmfdiag.common.providers.StyleBasedShapeProvider"
- name="StyleBasedShapeProvider">
- <Priority
- name="Low"></Priority>
- </shapeProvider>
-</extension>
+ <propertyTester + class="org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramPropertyTester" + id="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester" + namespace="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester" + properties="isGmfDiagramContextActive" + type="java.util.Collection"> + </propertyTester> +</extension> +<extension + point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider"> + <shapeProvider + class="org.eclipse.papyrus.infra.gmfdiag.common.providers.StyleBasedShapeProvider" + description="Provides shapes based on the applied styles." + id="org.eclipse.papyrus.infra.gmfdiag.common.providers.StyleBasedShapeProvider" + name="StyleBasedShapeProvider"> + <Priority + name="Low"></Priority> + </shapeProvider> +</extension> <extension
point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
<mapping
@@ -180,4 +181,4 @@ type="compartment_shape_display">
</mapping>
</extension>
-</plugin>
+</plugin> diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd new file mode 100644 index 00000000000..828559605ee --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/schema/pasteCommandProvider.exsd @@ -0,0 +1,150 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.eclipse.papyrus.infra.gmfdiag.common" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appInfo> + <meta.schema plugin="org.eclipse.papyrus.infra.gmfdiag.common" id="pasteCommandProvider" name="pasteCommandProvider"/> + </appInfo> + <documentation> + this extension point is used to declare a class that can provide command in charge of the paste + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appInfo> + <meta.element /> + </appInfo> + </annotation> + <complexType> + <sequence> + <element ref="PasteCommandProvider"/> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appInfo> + <meta.attribute translatable="true"/> + </appInfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="PasteCommandProvider"> + <annotation> + <documentation> + a paste provider has to provide an operation in order to paste by taking account system clipboard or papyrus clipboard + </documentation> + </annotation> + <complexType> + <attribute name="realization" type="string" use="required"> + <annotation> + <documentation> + this is the class that will provide the command in charge of the paste + </documentation> + <appInfo> + <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.uml.pastemanager.IPasteCommandProvider"/> + </appInfo> + </annotation> + </attribute> + <attribute name="priority" use="required"> + <annotation> + <documentation> + this the priority of the associated pasteCommandProvider +The priority of the provider. It can be one of the following values: +[Lowest, Low, Medium, High, Highest]. + </documentation> + </annotation> + <simpleType> + <restriction base="string"> + <enumeration value="Lowest"> + </enumeration> + <enumeration value="Low"> + </enumeration> + <enumeration value="Medium"> + </enumeration> + <enumeration value="High"> + </enumeration> + <enumeration value="Highest"> + </enumeration> + </restriction> + </simpleType> + </attribute> + </complexType> + </element> + + <annotation> + <appInfo> + <meta.section type="since"/> + </appInfo> + <documentation> + 0.7.0 + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="examples"/> + </appInfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="apiinfo"/> + </appInfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="implementation"/> + </appInfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + <annotation> + <appInfo> + <meta.section type="copyright"/> + </appInfo> + <documentation> + /***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + </documentation> + </annotation> + +</schema> diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/PasteRequest.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/PasteRequest.java new file mode 100644 index 00000000000..3fd7cc87295 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/requests/PasteRequest.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * 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: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.common.commands.requests; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; + +import org.eclipse.gef.Request; +import org.eclipse.gmf.runtime.diagram.ui.requests.DuplicateRequest; + +/** + * This is a specific paste request in the framework of papyrus. + */ +public class PasteRequest extends Request { + + /** The Constant REQ_PAPYRUS_PASTE. */ + public final static String REQ_PAPYRUS_PASTE="Papyrus_PASTE"; //$NON-NLS-1$ + + /** The element to paste. */ + protected Collection elementToPaste; + + /** + * Instantiates a new paste request. + * + * @param elementToPaste the element to paste + */ + public PasteRequest(Collection elementToPaste){ + this.elementToPaste=elementToPaste; + this.setType(REQ_PAPYRUS_PASTE); + } + + /** + * Sets the element to paste. + * + * @param elementToPaste the elementToPaste to set + */ + public void setElementToPaste(Collection elementToPaste) { + this.elementToPaste = elementToPaste; + } + + /** + * Gets the element to paste. + * + * @return the elementToPaste + */ + public Collection getElementToPaste() { + return elementToPaste; + } + + /** + * Gets the duplicate. + * + * @return the duplicate + */ + public DuplicateRequest getDuplicate(){ + DuplicateRequest duplicateRequest= new DuplicateRequest(); + duplicateRequest.setEditParts(new ArrayList()); + duplicateRequest.setExtendedData(new HashMap()); + return duplicateRequest; + } + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml index 76f118827e0..60cae741b48 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/plugin.xml @@ -1,139 +1,157 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=filtersMenu">
- <menu
- icon="icons/papyrus.png"
- id="org.eclipse.papyrus.infra.gmfdiag.menu.editmenu"
- label="Edit">
- <command
- commandId="org.eclipse.ui.edit.undo"
- style="push">
- </command>
- <command
- commandId="org.eclipse.ui.edit.redo"
- style="push">
- </command>
- <separator
- name="undo_redo_separator"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.ui.edit.cut"
- style="push">
- </command>
- <command
- commandId="org.eclipse.ui.edit.copy"
- style="push">
- </command>
- <command
- commandId="org.eclipse.ui.edit.paste"
- style="push">
- </command>
- <separator
- name="edit_actions_separator"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.papyrus.infra.gmfdiag.menu.selectelementswithsametype"
- style="push">
- </command>
- </menu>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.CutInDiagramHandler"
- commandId="org.eclipse.ui.edit.cut">
- <activeWhen>
- <and>
- <with
- variable="activeContexts">
- <test
- property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester.isGmfDiagramContextActive"
- value="true">
- </test>
- </with>
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester.isDiagramEditor"
- value="true">
- </test>
- </with>
- </and>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.CopyInDiagramHandler"
- commandId="org.eclipse.ui.edit.copy">
- <activeWhen>
- <and>
- <with
- variable="activeContexts">
- <test
- property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester.isGmfDiagramContextActive"
- value="true">
- </test>
- </with>
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester.isDiagramEditor"
- value="true">
- </test>
- </with>
- </and>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.PasteInDiagramHandler"
- commandId="org.eclipse.ui.edit.paste">
- <activeWhen>
- <and>
- <with
- variable="activeContexts">
- <test
- property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester.isGmfDiagramContextActive"
- value="true">
- </test>
- </with>
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester.isDiagramEditor"
- value="true">
- </test>
- </with>
- </and>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.papyrus.editor.category"
- defaultHandler="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.SelectElementWithTheSameTypeHandler"
- description="Select the elements in the current diagram which have the same type"
- id="org.eclipse.papyrus.infra.gmfdiag.menu.selectelementswithsametype"
- name="Select Elements With Same Type">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.papyrus.infra.gmfdiag.menu.selectelementswithsametype"
- contextId="org.eclipse.gmf.runtime.diagram.ui.diagramContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M3+A">
- </key>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=filtersMenu"> + <menu + icon="icons/papyrus.png" + id="org.eclipse.papyrus.infra.gmfdiag.menu.editmenu" + label="Edit"> + <command + commandId="org.eclipse.ui.edit.undo" + style="push"> + </command> + <command + commandId="org.eclipse.ui.edit.redo" + style="push"> + </command> + <separator + name="undo_redo_separator" + visible="true"> + </separator> + <command + commandId="org.eclipse.ui.edit.cut" + style="push"> + </command> + <command + commandId="org.eclipse.ui.edit.copy" + style="push"> + </command> + <command + commandId="org.eclipse.ui.edit.paste" + style="push"> + </command> + <separator + name="edit_actions_separator" + visible="true"> + </separator> + <command + commandId="org.eclipse.papyrus.infra.gmfdiag.menu.selectelementswithsametype" + style="push"> + </command> + </menu> + </menuContribution> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.CutInDiagramHandler" + commandId="org.eclipse.ui.edit.cut"> + <activeWhen> + <and> + <with + variable="activeContexts"> + <test + property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester.isGmfDiagramContextActive" + value="true"> + </test> + </with> + <with + variable="selection"> + <test + forcePluginActivation="true" + property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester.isDiagramEditor" + value="true"> + </test> + </with> + </and> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.CopyInDiagramHandler" + commandId="org.eclipse.ui.edit.copy"> + <activeWhen> + <and> + <with + variable="activeContexts"> + <test + property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester.isGmfDiagramContextActive" + value="true"> + </test> + </with> + <with + variable="selection"> + <test + forcePluginActivation="true" + property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester.isDiagramEditor" + value="true"> + </test> + </with> + </and> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.PasteInDiagramHandler" + commandId="org.eclipse.ui.edit.paste"> + <activeWhen> + <and> + <with + variable="activeContexts"> + <test + property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.context.tester.isGmfDiagramContextActive" + value="true"> + </test> + </with> + <with + variable="selection"> + <test + forcePluginActivation="true" + property="org.eclipse.papyrus.infra.gmfdiag.common.diagram.tester.isDiagramEditor" + value="true"> + </test> + </with> + </and> + </activeWhen> + </handler> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + categoryId="org.eclipse.papyrus.editor.category" + defaultHandler="org.eclipse.papyrus.infra.gmfdiag.menu.handlers.SelectElementWithTheSameTypeHandler" + description="Select the elements in the current diagram which have the same type" + id="org.eclipse.papyrus.infra.gmfdiag.menu.selectelementswithsametype" + name="Select Elements With Same Type"> + </command> + </extension> + <extension + point="org.eclipse.ui.bindings"> + <key + commandId="org.eclipse.papyrus.infra.gmfdiag.menu.selectelementswithsametype" + contextId="org.eclipse.gmf.runtime.diagram.ui.diagramContext" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="M1+M3+A"> + </key> + <key + commandId="org.eclipse.ui.edit.copy" + contextId="org.eclipse.gmf.runtime.diagram.ui.diagramContext" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="M1+M2+C"> + </key> + <key + commandId="org.eclipse.ui.edit.cut" + contextId="org.eclipse.gmf.runtime.diagram.ui.diagramContext" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="M1+M2+X"> + </key> + <key + commandId="org.eclipse.ui.edit.paste" + contextId="org.eclipse.gmf.runtime.diagram.ui.diagramContext" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="M1+M2+V"> + </key> + </extension> + +</plugin> |