Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2016-05-30 12:56:07 +0000
committerStéphane Bégaudeau2016-07-21 08:47:41 +0000
commitcecf4ac926a593eae120d98525f82216a57ed8d1 (patch)
treee887af1145b73df9ff0c7f6cc832915d5a0542f5
parenta54ca2654a633a4b91a88adeb17fc93a06b45517 (diff)
downloadorg.eclipse.eef-cecf4ac926a593eae120d98525f82216a57ed8d1.tar.gz
org.eclipse.eef-cecf4ac926a593eae120d98525f82216a57ed8d1.tar.xz
org.eclipse.eef-cecf4ac926a593eae120d98525f82216a57ed8d1.zip
Fix a potential IllegalArgumentException with the label of the page
Change-Id: I1b2bd63fbdb7e7ad94b0664845e4a835f6d4eb01 Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.ide.ui.properties/src/org/eclipse/eef/ide/ui/properties/api/EEFTabDescriptor.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/org.eclipse.eef.ide.ui.properties/src/org/eclipse/eef/ide/ui/properties/api/EEFTabDescriptor.java b/plugins/org.eclipse.eef.ide.ui.properties/src/org/eclipse/eef/ide/ui/properties/api/EEFTabDescriptor.java
index 9568f62ee..c0cbb6a0b 100644
--- a/plugins/org.eclipse.eef.ide.ui.properties/src/org/eclipse/eef/ide/ui/properties/api/EEFTabDescriptor.java
+++ b/plugins/org.eclipse.eef.ide.ui.properties/src/org/eclipse/eef/ide/ui/properties/api/EEFTabDescriptor.java
@@ -28,6 +28,10 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
* @author sbegaudeau
*/
public class EEFTabDescriptor extends AbstractEEFTabDescriptor {
+ /**
+ * The label used by default.
+ */
+ private static final String DEFAULT_PAGE_LABEL = "General"; //$NON-NLS-1$
/**
* The {@link EEFPage}.
@@ -71,7 +75,7 @@ public class EEFTabDescriptor extends AbstractEEFTabDescriptor {
EAttribute eAttribute = EefPackage.Literals.EEF_PAGE_DESCRIPTION__LABEL_EXPRESSION;
return EvalFactory.of(this.eefPage.getInterpreter(), this.eefPage.getVariableManager()).logIfBlank(eAttribute).logIfInvalidType(String.class)
- .evaluate(labelExpression);
+ .defaultValue(DEFAULT_PAGE_LABEL).evaluate(labelExpression);
}
/**

Back to the top