Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag')
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/plugin.xml2
-rw-r--r--plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.settings/.api_filters11
-rw-r--r--plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/plugin.xml2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/.api_filters11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/.api_filters11
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/AbstractResizableCompartmentEditPart.java91
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NavigableShapeCompartmentEditPart.java89
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/.settings/.api_filters11
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/PasteInDiagramHandler.java6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.settings/.api_filters11
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/META-INF/MANIFEST.MF2
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/pom.xml2
-rw-r--r--[-rwxr-xr-x]plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/src/org/eclipse/papyrus/infra/gmfdiag/tooling/runtime/linklf/LinkLFShapeCompartmentEditPart.java82
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/.settings/.api_filters11
-rw-r--r--plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml2
18 files changed, 267 insertions, 83 deletions
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/plugin.xml b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/plugin.xml
index cbc38fb5b36..e36c5280144 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/plugin.xml
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.editor/plugin.xml
@@ -23,7 +23,7 @@
id="org.eclipse.papyrus.infra.gmfdiag.assistant.presentation.AssistantModelWizardID"
name="%_UI_AssistantModelWizard_label"
class="org.eclipse.papyrus.infra.gmfdiag.assistant.presentation.AssistantModelWizard"
- category="org.eclipse.papyrus.wizards.category/org.eclipse.papyrus.wizards.addons.category"
+ category="org.eclipse.papyrus.wizards.category/org.eclipse.papyrus.wizards.custo.category/org.eclipse.papyrus.wizards.custo.editors.category"
icon="icons/full/obj16/AssistantModelFile.gif">
<description>%_UI_AssistantModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.settings/.api_filters b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.settings/.api_filters
deleted file mode 100644
index 7faff2aa342..00000000000
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.papyrus.infra.gmfdiag.assistant" version="2">
- <resource path="META-INF/MANIFEST.MF">
- <filter id="926941240">
- <message_arguments>
- <message_argument value="2.1.0"/>
- <message_argument value="2.0.0"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/plugin.xml b/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/plugin.xml
index 1272c225304..ded3aa9768e 100644
--- a/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/plugin.xml
+++ b/plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.editor/plugin.xml
@@ -11,7 +11,7 @@
id="org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.presentation.ExpansionModelModelWizardID"
name="%_UI_ExpansionModelModelWizard_label"
class="org.eclipse.papyrus.infra.gmfdiag.expansion.expansionmodel.presentation.ExpansionModelModelWizard"
- category="org.eclipse.papyrus.wizards.category/org.eclipse.papyrus.wizards.addons.category"
+ category="org.eclipse.papyrus.wizards.category/org.eclipse.papyrus.wizards.dev.category/org.eclipse.papyrus.wizards.dev.editors.category"
icon="icons/full/obj16/ExpansionModelModelFile.gif">
<description>%_UI_ExpansionModelModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/.api_filters b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/.api_filters
deleted file mode 100644
index ef1730aba0a..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.canonical/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.papyrus.infra.gmfdiag.canonical" version="2">
- <resource path="META-INF/MANIFEST.MF">
- <filter id="926941240">
- <message_arguments>
- <message_argument value="3.1.0"/>
- <message_argument value="3.0.0"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/.api_filters b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/.api_filters
deleted file mode 100644
index fbd75a89482..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.papyrus.infra.gmfdiag.common" version="2">
- <resource path="src/org/eclipse/papyrus/infra/gmfdiag/common/sync/UISyncUtils.java" type="org.eclipse.papyrus.infra.gmfdiag.common.sync.UISyncUtils">
- <filter id="338792546">
- <message_arguments>
- <message_argument value="org.eclipse.papyrus.infra.gmfdiag.common.sync.UISyncUtils"/>
- <message_argument value="asyncExec(ISyncObject, SyncServiceRunnable&lt;V,X&gt;)"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
index ebb9c24d826..3a5765238fb 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
@@ -99,7 +99,7 @@ Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.common.Activator
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.2.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
index 55516b17229..5a748174bbb 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/pom.xml
@@ -9,6 +9,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.common</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/AbstractResizableCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/AbstractResizableCompartmentEditPart.java
new file mode 100644
index 00000000000..b54d76586fd
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/AbstractResizableCompartmentEditPart.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+* Copyright (c) 2021 CEA LIST, ARTAL
+*
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License 2.0
+* which accompanies this distribution, and is available at
+* https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+*
+* Contributors:
+* Etienne ALLOGO (ARTAL) - Initial API and implementation
+* Etienne ALLOGO (ARTAL) - etienne.allogo@artal.fr - Bug 569174 : generate less dead or duplicate code
+*****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.editpart;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+
+/**
+ * An intermediate class with the common methods used by resizeable list compartments (inherit from ResizeableListCompartmentEditPart).
+ *
+ * @author allogo
+ * @since 4.2
+ */
+public abstract class AbstractResizableCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param model
+ * the model
+ */
+ public AbstractResizableCompartmentEditPart(EObject model) {
+ super(model);
+ }
+
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature)
+ || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ @Override
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(
+ this,
+ getFigure(),
+ new Rectangle(loc, size));
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NavigableShapeCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NavigableShapeCompartmentEditPart.java
new file mode 100644
index 00000000000..940557d0b16
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NavigableShapeCompartmentEditPart.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Etienne ALLOGO (ARTAL) - etienne.allogo@artal.fr - Bug 569174 : Pull up refreshVisuals/setRatio for shape compartments
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.editpart;
+
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DeselectAllTracker;
+import org.eclipse.gmf.runtime.diagram.ui.internal.tools.RubberbandDragTracker;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * this is an abstract editpart used to allow double click on XY layout compartment
+ *
+ * @since 4.2
+ *
+ */
+@SuppressWarnings("restriction")
+public abstract class NavigableShapeCompartmentEditPart extends XYLayoutShapeCompartmentEditPart {
+
+ public NavigableShapeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart#getDragTracker(org.eclipse.gef.Request)
+ *
+ */
+ @Override
+ public DragTracker getDragTracker(Request req) {
+ if (!supportsDragSelection()) {
+ return super.getDragTracker(req);
+ }
+ if (req instanceof SelectionRequest && ((SelectionRequest) req).getLastButtonPressed() == 3) {
+ return new DeselectAllTracker(this) {
+
+ @Override
+ protected boolean handleButtonDown(int button) {
+ getCurrentViewer().select(NavigableShapeCompartmentEditPart.this);
+ return true;
+ }
+ };
+ }
+ return new RubberbandDragTracker() {
+
+ /*
+ * this method has been respecified in order to allow double click
+ * on the compartment.
+ * hence it allows the navigation by double click
+ */
+ @Override
+ protected boolean handleDoubleClick(int button) {
+ SelectionRequest request = new SelectionRequest();
+ request.setLocation(getLocation());
+ request.setType(RequestConstants.REQ_OPEN);
+ NavigableShapeCompartmentEditPart.this.performRequest(request);
+ return true;
+ }
+
+ @Override
+ protected void handleFinished() {
+ if (getViewer().getSelectedEditParts().isEmpty()) {
+ getViewer().select(NavigableShapeCompartmentEditPart.this);
+ }
+ }
+ };
+ }
+
+ @Override
+ public boolean isSelectable() {
+ return false;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/.settings/.api_filters b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/.settings/.api_filters
deleted file mode 100644
index 6ab8dd3f4df..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.papyrus.infra.gmfdiag.menu" version="2">
- <resource path="META-INF/MANIFEST.MF">
- <filter id="926941240">
- <message_arguments>
- <message_argument value="2.1.0"/>
- <message_argument value="2.0.0"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/PasteInDiagramHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/PasteInDiagramHandler.java
index e4890eda481..e9736af1c26 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/PasteInDiagramHandler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu/src/org/eclipse/papyrus/infra/gmfdiag/menu/handlers/PasteInDiagramHandler.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
+ * Copyright (c) 2014, 2021 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,7 +11,7 @@
*
* Contributors:
* Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
- *
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - bug 573807
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.menu.handlers;
@@ -82,7 +82,7 @@ public class PasteInDiagramHandler extends AbstractGraphicalCommandHandler {
Control focusControl = null;
if (activeShell instanceof Shell) {
Shell shell = (Shell) activeShell;
- Display display = shell.getDisplay();
+ Display display = !shell.isDisposed() ? shell.getDisplay() : null;
if (display != null) {
focusControl = display.getFocusControl();
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF
index 8cccfbd0b58..c8f72e5c3d9 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF
@@ -20,7 +20,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.6.0,4.0.0)",
org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.infra.ui;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.papyrus.views.modelexplorer;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[5.0.0,6.0.0)",
org.eclipse.uml2.types;bundle-version="[2.5.0,3.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.settings/.api_filters b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.settings/.api_filters
deleted file mode 100644
index 2b79ef983ec..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.papyrus.infra.gmfdiag.properties" version="2">
- <resource path="META-INF/MANIFEST.MF">
- <filter id="926941240">
- <message_arguments>
- <message_argument value="5.1.0"/>
- <message_argument value="5.0.0"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/META-INF/MANIFEST.MF
index af99350d2f8..a4a61333387 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.tooling.runtime;singleton:=true
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Description: %Bundle-Description
Bundle-Localization: plugin
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/pom.xml
index a0449c6cf3c..b15fbab72c1 100755
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/pom.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/pom.xml
@@ -9,7 +9,7 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.tooling.runtime</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<description>Papyrus fork of org.eclipse.gmf.tooling.runtime to remain in the release train</description>
</project> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/src/org/eclipse/papyrus/infra/gmfdiag/tooling/runtime/linklf/LinkLFShapeCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/src/org/eclipse/papyrus/infra/gmfdiag/tooling/runtime/linklf/LinkLFShapeCompartmentEditPart.java
index f85d4211dfd..ee07ca67a48 100755..100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/src/org/eclipse/papyrus/infra/gmfdiag/tooling/runtime/linklf/LinkLFShapeCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.tooling.runtime/src/org/eclipse/papyrus/infra/gmfdiag/tooling/runtime/linklf/LinkLFShapeCompartmentEditPart.java
@@ -1,7 +1,7 @@
/*****************************************************************************
- * Copyright (c) 2014-15 CEA LIST, Montages AG and others
+ * Copyright (c) 2014-15, 2021 CEA LIST, Montages AG, ARTAL and others
+ *
*
- *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -11,8 +11,9 @@
*
* Contributors:
* Anatoly Tishenko (tishenko@montages.com) - Initial API and implementation
- */
-package org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf;
+ * Etienne ALLOGO (ARTAL) - etienne.allogo@artal.fr - Bug 569174 : Pull up refreshVisuals/setRatio for shape compartments
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@@ -28,16 +29,22 @@ import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.geometry.Translatable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
import org.eclipse.gef.SnapToGrid;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemsAwareFreeFormLayer;
import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
import org.eclipse.gmf.runtime.diagram.ui.layout.FreeFormLayoutEx;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.AnimatableScrollPane;
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.OverlayScrollPaneLayout;
import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
/**
@@ -45,8 +52,9 @@ import org.eclipse.gmf.runtime.notation.View;
*/
public class LinkLFShapeCompartmentEditPart extends ShapeCompartmentEditPart {
- private final PropertyChangeListener myGridListener = new PropertyChangeListener() {
+ private PropertyChangeListener myGridListener = new PropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent evt) {
String propertyName = evt.getPropertyName();
if (SnapToGrid.PROPERTY_GRID_ORIGIN.equals(propertyName) || //
@@ -164,12 +172,13 @@ public class LinkLFShapeCompartmentEditPart extends ShapeCompartmentEditPart {
private class SnapToGridRangeModel implements RangeModel {
- private final RangeModel myBaseRangeModel;
+ private RangeModel myBaseRangeModel;
public SnapToGridRangeModel(RangeModel rangeModel) {
myBaseRangeModel = rangeModel;
}
+ @Override
public void setValue(int value) {
Rectangle gridSpec = getGridSpec(getViewer());
if (gridSpec != null) {
@@ -181,46 +190,57 @@ public class LinkLFShapeCompartmentEditPart extends ShapeCompartmentEditPart {
}
}
+ @Override
public void setMinimum(int min) {
myBaseRangeModel.setMinimum(min);
}
+ @Override
public void setMaximum(int max) {
myBaseRangeModel.setMaximum(max);
}
+ @Override
public void setExtent(int extent) {
myBaseRangeModel.setExtent(extent);
}
+ @Override
public void setAll(int min, int extent, int max) {
myBaseRangeModel.setAll(min, extent, max);
}
+ @Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
myBaseRangeModel.removePropertyChangeListener(listener);
}
+ @Override
public boolean isEnabled() {
return true;
}
+ @Override
public int getValue() {
return myBaseRangeModel.getValue();
}
+ @Override
public int getMinimum() {
return myBaseRangeModel.getMinimum();
}
+ @Override
public int getMaximum() {
return myBaseRangeModel.getMaximum();
}
+ @Override
public int getExtent() {
return myBaseRangeModel.getExtent();
}
+ @Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
myBaseRangeModel.addPropertyChangeListener(listener);
}
@@ -265,21 +285,71 @@ public class LinkLFShapeCompartmentEditPart extends ShapeCompartmentEditPart {
myMapMode = mm;
}
+ @Override
public int LPtoDP(int logicalUnit) {
return myMapMode.LPtoDP(logicalUnit);
}
+ @Override
public int DPtoLP(int deviceUnit) {
return myMapMode.DPtoLP(deviceUnit);
}
+ @Override
public Translatable LPtoDP(Translatable t) {
return myMapMode.LPtoDP(t);
}
+ @Override
public Translatable DPtoLP(Translatable t) {
return myMapMode.DPtoLP(t);
}
}
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature)
+ || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * Refresh bounds.
+ *
+ * @since 4.1
+ */
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+
}
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/.settings/.api_filters b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/.settings/.api_filters
deleted file mode 100644
index 1ae42d426a7..00000000000
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor" version="2">
- <resource path="META-INF/MANIFEST.MF">
- <filter id="926941240">
- <message_arguments>
- <message_argument value="4.1.0"/>
- <message_argument value="4.0.0"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml
index c09267a6413..80b8e2d764e 100644
--- a/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml
+++ b/plugins/infra/gmfdiag/paletteconfiguration/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor/plugin.xml
@@ -16,7 +16,7 @@
id="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.presentation.PaletteconfigurationModelWizardID"
name="%_UI_PaletteconfigurationModelWizard_label"
class="org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.presentation.CustomPaletteconfigurationModelWizard"
- category="org.eclipse.papyrus.wizards.category/org.eclipse.papyrus.wizards.addons.category"
+ category="org.eclipse.papyrus.wizards.category/org.eclipse.papyrus.wizards.custo.category/org.eclipse.papyrus.wizards.custo.editors.category"
icon="icons/full/obj16/PaletteconfigurationModelFile.gif">
<description>%_UI_PaletteconfigurationModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>

Back to the top