diff options
| author | Pierre-Charles David | 2016-01-13 15:43:44 +0000 |
|---|---|---|
| committer | Stephane Begaudeau | 2016-01-28 08:33:08 +0000 |
| commit | bba8378db4dfec0d850b5003f46c351e9f6ff109 (patch) | |
| tree | 45a3fda851153ad89681b5732c3d0966ac513dc9 | |
| parent | f3e03449b03b51fac4ea56f7a4d19d6d78c1131b (diff) | |
| download | org.eclipse.eef-bba8378db4dfec0d850b5003f46c351e9f6ff109.tar.gz org.eclipse.eef-bba8378db4dfec0d850b5003f46c351e9f6ff109.tar.xz org.eclipse.eef-bba8378db4dfec0d850b5003f46c351e9f6ff109.zip | |
[482528] Use IEvaluationResult.success() to simplify EEFViewImpl
Bug: 482528
Change-Id: I4ef92005047b9783ecacd090c0dbd45fa6a9e9f3
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/EEFViewImpl.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/EEFViewImpl.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/EEFViewImpl.java index 5cc32cb90..bcad88703 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/EEFViewImpl.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/EEFViewImpl.java @@ -21,7 +21,6 @@ import org.eclipse.eef.core.api.EEFPage; import org.eclipse.eef.core.api.EEFView; import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.transaction.RecordingCommand; import org.eclipse.emf.transaction.TransactionalEditingDomain; @@ -124,7 +123,7 @@ public class EEFViewImpl implements EEFView { if (!isBlank(semanticCandidateExpression)) { IEvaluationResult evaluationResult = this.interpreter .evaluateExpression(this.variableManager.getVariables(), semanticCandidateExpression); - if (Diagnostic.OK == evaluationResult.getDiagnostic().getSeverity() && evaluationResult.getValue() != null) { + if (evaluationResult.success()) { IVariableManager childVariableManager = this.variableManager.createChild(); childVariableManager.put(EEFExpressionUtils.SELF, evaluationResult.getValue()); page = new EEFPageImpl(this, description, childVariableManager, this.interpreter, this.editingDomain); @@ -153,7 +152,7 @@ public class EEFViewImpl implements EEFView { if (!isBlank(pageSemanticCandidateExpression)) { IEvaluationResult evaluationResult = this.interpreter.evaluateExpression(this.variableManager.getVariables(), pageSemanticCandidateExpression); - if (Diagnostic.OK == evaluationResult.getDiagnostic().getSeverity() && evaluationResult.getValue() != null) { + if (evaluationResult.success()) { eefPage.getVariableManager().put(EEFExpressionUtils.SELF, evaluationResult.getValue()); } else { // Something is very wrong here... @@ -166,7 +165,7 @@ public class EEFViewImpl implements EEFView { if (!isBlank(groupSemanticCandidateExpression)) { IEvaluationResult evaluationResult = this.interpreter.evaluateExpression(eefPage.getVariableManager().getVariables(), groupSemanticCandidateExpression); - if (Diagnostic.OK == evaluationResult.getDiagnostic().getSeverity() && evaluationResult.getValue() != null) { + if (evaluationResult.success()) { eefGroup.getVariableManager().put(EEFExpressionUtils.SELF, evaluationResult.getValue()); } else { // Something is very wrong here... |
