Bug 433129 Copy and paste reduces width and height of GMF shapes
diff --git a/org.eclipse.gmf.runtime.draw2d.ui/META-INF/MANIFEST.MF b/org.eclipse.gmf.runtime.draw2d.ui/META-INF/MANIFEST.MF
index ce54994..ea76c77 100644
--- a/org.eclipse.gmf.runtime.draw2d.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.gmf.runtime.draw2d.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.gmf.runtime.draw2d.ui
-Bundle-Version: 1.7.0.qualifier
+Bundle-Version: 1.8.0.qualifier
Bundle-Activator: org.eclipse.gmf.runtime.draw2d.ui.internal.Draw2dPlugin
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.gmf.runtime.draw2d.ui/pom.xml b/org.eclipse.gmf.runtime.draw2d.ui/pom.xml
index 5afc268..9bd49fe 100644
--- a/org.eclipse.gmf.runtime.draw2d.ui/pom.xml
+++ b/org.eclipse.gmf.runtime.draw2d.ui/pom.xml
@@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse.gmf.runtime.draw2d.ui</groupId>
<artifactId>org.eclipse.gmf.runtime.draw2d.ui</artifactId>
- <version>1.7.0-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/HiMetricMapMode.java b/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/HiMetricMapMode.java
index 347e6c9..00bd08f 100644
--- a/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/HiMetricMapMode.java
+++ b/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/HiMetricMapMode.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2014 IBM Corporation and others.
* 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
@@ -90,5 +90,24 @@
t.performScale( scale );
return t;
}
+
+ /**
+ * Indicates whether some other MapMode is "equal to" this MapMode.
+ *
+ * @return <code>true</code> if this MapMode is the same as the MapMode
+ * argument; <code>false</code> otherwise.
+ * @param mapMode
+ * The reference MapMode with which to compare.
+ */
+ public boolean equals(Object mapMode){
+ // if the mapModeect is of type MapModeHolder, get the underlying MapMode
+ if (mapMode instanceof IMapModeHolder){
+ return this.equals(((IMapModeHolder)mapMode).getMapMode());
+ }
+ if (mapMode instanceof HiMetricMapMode){
+ return super.equals(mapMode);
+ }
+ return false;
+ }
}
diff --git a/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/IdentityMapMode.java b/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/IdentityMapMode.java
index e8f3aed..d1d326d 100644
--- a/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/IdentityMapMode.java
+++ b/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/internal/mapmode/IdentityMapMode.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2014 IBM Corporation and others.
* 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
@@ -62,5 +62,25 @@
t.performScale( 1.0 );
return t;
}
+
+ /**
+ * Indicates whether some other MapMode is "equal to" this MapMode.
+ *
+ * @return <code>true</code> if this MapMode is the same as the MapMode
+ * argument; <code>false</code> otherwise.
+ * @param mapMode
+ * The reference MapMode with which to compare.
+ */
+ public boolean equals(Object mapMode){
+ // if the mapModeect is of type MapModeHolder, get the underlying MapMode
+ if (mapMode instanceof IMapModeHolder){
+ return this.equals(((IMapModeHolder)mapMode).getMapMode());
+ }
+ if (mapMode instanceof IdentityMapMode){
+ return super.equals(mapMode);
+ }
+ return false;
+ }
+
}