Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauline DEVILLE2018-07-10 10:19:30 -0400
committervincent lorenzo2018-08-31 10:29:54 -0400
commit8b6ed30d809d95e1a38306eb4344f643c4297823 (patch)
tree0375307f02951797fd04906c85c5d54b1c409eb6
parentf63d85196dc9c8b040c01ef3bd6459fb5f5f524d (diff)
downloadorg.eclipse.papyrus-8b6ed30d809d95e1a38306eb4344f643c4297823.tar.gz
org.eclipse.papyrus-8b6ed30d809d95e1a38306eb4344f643c4297823.tar.xz
org.eclipse.papyrus-8b6ed30d809d95e1a38306eb4344f643c4297823.zip
Bug 536876 - [Table] The menu "Select Stereotype Properties Column" make
Eclipse (and Linux?!) freeze Add a disabled menuItem with "No stereotype's properties available" message to avoid empty list Change-Id: I69a9fa1e7a82e37376486cc7ba7202f5b610548e Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateColumnStereotypePropertyMenuFactory.java10
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateRowStereotypePropertyMenuFactory.java10
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java2
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties1
4 files changed, 21 insertions, 2 deletions
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateColumnStereotypePropertyMenuFactory.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateColumnStereotypePropertyMenuFactory.java
index cabbd16577c..787e0c0ec63 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateColumnStereotypePropertyMenuFactory.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateColumnStereotypePropertyMenuFactory.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2018 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * CEA LIST - Bug 536876 - [Table] The menu "Select Stereotype Properties Column" make Eclipse (and Linux?!) freeze
*
*****************************************************************************/
package org.eclipse.papyrus.uml.nattable.menu;
@@ -21,6 +22,7 @@ import java.util.Map;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.uml.nattable.manager.axis.UMLStereotypePropertyAxisManager;
+import org.eclipse.papyrus.uml.nattable.messages.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -102,6 +104,12 @@ public class CreateColumnStereotypePropertyMenuFactory extends AbstractCreateSte
});
}
+ if (menu.getItemCount() == 0) {
+ // Bug 536876 - [Table] The menu "Select Stereotype Properties Column" make Eclipse (and Linux?!) freeze
+ final MenuItem menuItem = new MenuItem(menu, SWT.NONE);
+ menuItem.setText(Messages.CreateColumnAndRowStereotypePropertyMenuFactory_NoStereotypePropertyAvailable);
+ menuItem.setEnabled(false);
+ }
boolean enabled = menu.getItemCount() != 0;
menu.setEnabled(enabled);
}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateRowStereotypePropertyMenuFactory.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateRowStereotypePropertyMenuFactory.java
index f5c2f52b42f..34ce958835a 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateRowStereotypePropertyMenuFactory.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/menu/CreateRowStereotypePropertyMenuFactory.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2018 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * CEA LIST - Bug 536876 - [Table] The menu "Select Stereotype Properties Column" make Eclipse (and Linux?!) freeze
*
*****************************************************************************/
package org.eclipse.papyrus.uml.nattable.menu;
@@ -21,6 +22,7 @@ import java.util.Map;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.uml.nattable.manager.axis.UMLStereotypePropertyAxisManager;
+import org.eclipse.papyrus.uml.nattable.messages.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -103,6 +105,12 @@ public class CreateRowStereotypePropertyMenuFactory extends AbstractCreateStereo
});
}
+ if (menu.getItemCount() == 0) {
+ // Bug 536876 - [Table] The menu "Select Stereotype Properties Column" make Eclipse (and Linux?!) freeze
+ final MenuItem menuItem = new MenuItem(menu, SWT.NONE);
+ menuItem.setText(Messages.CreateColumnAndRowStereotypePropertyMenuFactory_NoStereotypePropertyAvailable);
+ menuItem.setEnabled(false);
+ }
boolean enabled = menu.getItemCount() != 0;
menu.setEnabled(enabled);
}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java
index a13676702e5..f3d46589ae4 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java
@@ -20,6 +20,8 @@ public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.nattable.messages.messages"; //$NON-NLS-1$
+ public static String CreateColumnAndRowStereotypePropertyMenuFactory_NoStereotypePropertyAvailable;
+
public static String StereotypePropertyCellManager_SeveralStereotypesWithThisFeatureAreApplied;
public static String StereotypePropertyHeaderLabelProvider_RequiredProfileNotFound;
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties
index c9dac43358b..ce0b8730bd5 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties
@@ -1,3 +1,4 @@
+CreateColumnAndRowStereotypePropertyMenuFactory_NoStereotypePropertyAvailable=No stereotype's properties available
StereotypePropertyCellManager_SeveralStereotypesWithThisFeatureAreApplied=Several stereotypes with this feature are applied -> not yet managed
StereotypePropertyHeaderLabelProvider_RequiredProfileNotFound=Required Profile Not Found
UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue=Open dialog to choose the value.

Back to the top