Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormgolubev2015-04-27 16:29:45 +0000
committerCamille Letavernier2015-04-28 08:08:37 +0000
commit2eb0340a0ec1a88b22097f35d6e27c16a75545c2 (patch)
tree97939996a7fed2cf5f6603d8d81e57bb7625ae76 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src
parentc3c4f8c71a29af4f549ca3e44c0058721f3e4585 (diff)
downloadorg.eclipse.papyrus-2eb0340a0ec1a88b22097f35d6e27c16a75545c2.tar.gz
org.eclipse.papyrus-2eb0340a0ec1a88b22097f35d6e27c16a75545c2.tar.xz
org.eclipse.papyrus-2eb0340a0ec1a88b22097f35d6e27c16a75545c2.zip
Bug 431063: [Activity Diagram] Hiding action pin label causes
NullPointerException Papyrus specific workaround for Bug 465611 for GMF Runtime Change-Id: I9cac2163cdf94a87350757702d766d7358ee2b49 Signed-off-by: mgolubev <golubev@montages.com> Reviewed-on: https://git.eclipse.org/r/46580 Tested-by: Hudson CI Reviewed-by: Camille Letavernier <camille.letavernier@cea.fr> Tested-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java
index fba434c5b4b..c814d432191 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusLabelEditPart.java
@@ -15,6 +15,7 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.editpart;
+import org.eclipse.core.resources.IResource;
import org.eclipse.draw2d.Connection;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
@@ -354,5 +355,16 @@ public abstract class PapyrusLabelEditPart extends LabelEditPart implements Name
}
}
}
+
+ /**
+ * Workaround for bug #465611, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=465611
+ */
+ @Override
+ public Object getAdapter(Class key) {
+ if (IResource.class == key && getParent() == null) {
+ return null;
+ }
+ return super.getAdapter(key);
+ }
}

Back to the top