diff options
author | Mélanie Bats | 2016-05-03 09:06:52 +0000 |
---|---|---|
committer | Stephane Begaudeau | 2016-05-03 13:50:36 +0000 |
commit | a3ac4fb069d6f4d5cd9d5a7144969d0ce6f90e69 (patch) | |
tree | bf3d1937caf244012cc827cfa61f1ce12a08080b | |
parent | f22dd95c4839829646ddb85edae1608e014907c2 (diff) | |
download | org.eclipse.eef-a3ac4fb069d6f4d5cd9d5a7144969d0ce6f90e69.tar.gz org.eclipse.eef-a3ac4fb069d6f4d5cd9d5a7144969d0ce6f90e69.tar.xz org.eclipse.eef-a3ac4fb069d6f4d5cd9d5a7144969d0ce6f90e69.zip |
Fix reference widget actions to be executed in the editing domain
adapter.
Change-Id: I313ded48ac668ceb950a73647e4d5be33ef8cff6
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
-rw-r--r-- | plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFReferenceController.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFReferenceController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFReferenceController.java index 3a30d570c..556f5a82f 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFReferenceController.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFReferenceController.java @@ -123,12 +123,19 @@ public class EEFReferenceController extends AbstractEEFWidgetController implemen * @see org.eclipse.eef.core.api.controllers.IEEFReferenceController#action() */ @Override - public void action(EEFWidgetAction action, List<Object> elements) { - String expression = action.getActionExpression(); - EAttribute eAttribute = EefPackage.Literals.EEF_WIDGET_ACTION__ACTION_EXPRESSION; - Map<String, Object> variables = new HashMap<String, Object>(); - variables.putAll(EEFReferenceController.this.variableManager.getVariables()); - variables.put(EEFExpressionUtils.EEFReference.SELECTION, elements); - new Eval(EEFReferenceController.this.interpreter, variables).call(eAttribute, expression); + public void action(final EEFWidgetAction action, final List<Object> elements) { + contextAdapter.performModelChange(new Runnable() { + @Override + public void run() { + String expression = action.getActionExpression(); + EAttribute eAttribute = EefPackage.Literals.EEF_WIDGET_ACTION__ACTION_EXPRESSION; + + Map<String, Object> variables = new HashMap<String, Object>(); + variables.putAll(EEFReferenceController.this.variableManager.getVariables()); + variables.put(EEFExpressionUtils.EEFReference.SELECTION, elements); + + new Eval(EEFReferenceController.this.interpreter, variables).call(eAttribute, expression); + } + }); } } |