Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Brodt2014-08-08 05:26:49 -0400
committerBob Brodt2014-08-08 05:26:49 -0400
commit5e820fb329bc86e7f33def3b9547feeafbeebd02 (patch)
treeb518bedc3e9c0dbc143556e091c552762851deb2
parent9c153d55cc99b869fd37dd38d72c3e5949d13f2e (diff)
downloadorg.eclipse.bpmn2-modeler-5e820fb329bc86e7f33def3b9547feeafbeebd02.tar.gz
org.eclipse.bpmn2-modeler-5e820fb329bc86e7f33def3b9547feeafbeebd02.tar.xz
org.eclipse.bpmn2-modeler-5e820fb329bc86e7f33def3b9547feeafbeebd02.zip
Some minor changes for stardust support.
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java5
3 files changed, 14 insertions, 10 deletions
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java
index 8c89d76f..b4c38711 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java
@@ -304,14 +304,15 @@ public class ExtendedPropertiesProvider {
* See {@link ExtendedPropertiesAdapter.UI_CAN_SET_NULL}
*/
public static boolean canSetNull(EObject object, EStructuralFeature feature) {
- if (feature != null && feature.getEType() instanceof EClass) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter != null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_SET_NULL);
- if (result instanceof Boolean)
- return ((Boolean) result);
- }
- return true;
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ Object result = null;
+ if (adapter != null) {
+ result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_SET_NULL);
+ if (result instanceof Boolean && ((Boolean)result)==true)
+ return true;
+ }
+ if (feature != null && feature.getEType() instanceof EClass && result instanceof Boolean) {
+ return (Boolean) result;
}
return false;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java
index fdc32bc1..74181921 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java
@@ -49,7 +49,7 @@ public abstract class MultivalueObjectEditor extends ObjectEditor {
/**
* Create the list of name/value pairs from the feature domain. The name string is
* intended to be used for display in the editor widget, and the value is the corresponding
- * feature value. If the values are null, then the name string is assumed to also businessObject
+ * feature value. If the values are null, then the name string is assumed to also be the
* the feature value.
*
* The default implementation simply uses the EMF edit provider adapter to construct a valid
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java
index 4001e892..e7dbbccf 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java
@@ -402,6 +402,7 @@ public class ModelUtil {
public static String toCanonicalString(String anyName) {
// get rid of the "Impl" java suffix
anyName = anyName.replaceAll("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
String displayName = ""; //$NON-NLS-1$
boolean first = true;
char[] chars = anyName.toCharArray();
@@ -415,8 +416,10 @@ public class ModelUtil {
c = Character.toUpperCase(c);
first = false;
}
- if (c=='_')
+ if (!Character.isLetterOrDigit(c))
c = ' ';
+ if (c==' ')
+ first = true;
displayName += c;
}
return displayName.trim();

Back to the top