Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2017-11-25 09:37:59 +0000
committerEd Merks2017-11-25 09:37:59 +0000
commit7e6808a576efd023fa8b27feea3f35f02dbcc8f8 (patch)
treed1c7d48de666e9df4979c9620df85dba74381aa6
parente21bb06a430f6854173c5ec9803396438714b63f (diff)
downloadorg.eclipse.emf-7e6808a576efd023fa8b27feea3f35f02dbcc8f8.tar.gz
org.eclipse.emf-7e6808a576efd023fa8b27feea3f35f02dbcc8f8.tar.xz
org.eclipse.emf-7e6808a576efd023fa8b27feea3f35f02dbcc8f8.zip
[527721] Don't show error message for empty string after an Add
-rw-r--r--plugins/org.eclipse.emf.edit.ui/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.edit.ui/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java b/plugins/org.eclipse.emf.edit.ui/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java
index 7b1b76e25..d27919012 100644
--- a/plugins/org.eclipse.emf.edit.ui/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java
+++ b/plugins/org.eclipse.emf.edit.ui/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java
@@ -588,12 +588,16 @@ public class FeatureEditorDialog extends Dialog
{
if (activeControl.get() == choiceText)
{
- String errorMessage = valueHandler.isValid(choiceText.getText());
- if (errorMessage == null && unique && children.contains(valueHandler.toValue(choiceText.getText())))
+ String text = choiceText.getText();
+ String errorMessage = valueHandler.isValid(text);
+ if (errorMessage == null && unique && children.contains(valueHandler.toValue(text)))
{
errorMessage = EMFEditUIPlugin.INSTANCE.getString("_UI_DuplicateValue_message");
}
- setErrorMessage(errorMessage);
+ if (choiceText.isFocusControl() || !"".equals(text))
+ {
+ setErrorMessage(errorMessage);
+ }
addButton.setEnabled(errorMessage == null);
}
}

Back to the top