Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratischenko2015-10-13 14:41:33 -0400
committerGerrit Code Review @ Eclipse.org2015-10-27 06:21:53 -0400
commitaffc638f030129e887837f8594f43a5edb540807 (patch)
tree2a77d91a8499279196c62114e5f745d35e68533f /plugins
parentc6a97b0eaa860838c79a8c832a12cd2eec97b364 (diff)
downloadorg.eclipse.papyrus-affc638f030129e887837f8594f43a5edb540807.tar.gz
org.eclipse.papyrus-affc638f030129e887837f8594f43a5edb540807.tar.xz
org.eclipse.papyrus-affc638f030129e887837f8594f43a5edb540807.zip
Bug 450921 - Additional graphics no longer available
Change-Id: I84c544e1cae02a835d29494740d2ce4a1665d98c Signed-off-by: atischenko <tischenko@montages.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java
index 23621256dd4..12b463c5622 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/commands/CreateViewCommand.java
@@ -39,6 +39,20 @@ public class CreateViewCommand extends CreateCommand {
@Override
public boolean canExecute() {
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=450921
+ // it should be possible to create not only elements with semantic
+ // like oval or note
+ int hint;
+ try {
+ hint = Integer.parseInt(viewDescriptor.getSemanticHint());
+ } catch(Exception e) {
+ hint = -1;
+ }
+
+ if (hint == -1) {
+ return super.canExecute();
+ }
+
// Warning the element adapter can possibly be null (see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=353129)
if (viewDescriptor.getElementAdapter() == null) {
return false;

Back to the top