diff options
author | jeremie.tatibouet | 2015-05-06 08:26:56 +0000 |
---|---|---|
committer | Arnaud Cuccuru | 2015-05-06 09:13:47 +0000 |
commit | 0a48ee9f805213f085b9444c04280ac51348b85b (patch) | |
tree | 4c39e5985265bd9749faa4f3242a64eff126d81c /extraplugins | |
parent | 827b73eb7ef0db1bd99503f0f9c649bfb016176b (diff) | |
download | org.eclipse.papyrus-0a48ee9f805213f085b9444c04280ac51348b85b.tar.gz org.eclipse.papyrus-0a48ee9f805213f085b9444c04280ac51348b85b.tar.xz org.eclipse.papyrus-0a48ee9f805213f085b9444c04280ac51348b85b.zip |
Bug fix: two validations scheduled instead of one. This was due to an
additional refresh.
Change-Id: Ia2d82c7ece71bd511b1a56bf3adc334f06bbf51c
Signed-off-by: jeremie.tatibouet <jeremie.tatibouet@cea.fr>
Reviewed-on: https://git.eclipse.org/r/47252
Tested-by: Hudson CI
Reviewed-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
Tested-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
Diffstat (limited to 'extraplugins')
-rw-r--r-- | extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.properties.xtext/src/org/eclipse/papyrus/uml/alf/properties/xtext/sheet/AlfEditionPropertySection.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.properties.xtext/src/org/eclipse/papyrus/uml/alf/properties/xtext/sheet/AlfEditionPropertySection.java b/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.properties.xtext/src/org/eclipse/papyrus/uml/alf/properties/xtext/sheet/AlfEditionPropertySection.java index 49f85098fb5..3fc986eff17 100644 --- a/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.properties.xtext/src/org/eclipse/papyrus/uml/alf/properties/xtext/sheet/AlfEditionPropertySection.java +++ b/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.properties.xtext/src/org/eclipse/papyrus/uml/alf/properties/xtext/sheet/AlfEditionPropertySection.java @@ -56,8 +56,7 @@ import org.eclipse.xtext.resource.XtextResource; import com.google.inject.Injector;
/**
- * Attention: class has been deactivated, since the additional tab is redundant with the
- * body editor in the standard UML property tab.
+ * Property view contribution for the ALF editor
*/
public class AlfEditionPropertySection extends
AbstractModelerPropertySection implements IContextElementProvider {
@@ -84,7 +83,10 @@ public class AlfEditionPropertySection extends private Injector alfToolingInjector;
+ private EObject previousEObject;
+
public AlfEditionPropertySection() {
+ this.previousEObject = null;
this.undoRedoStack = new UndoRedoStack<ExtendedModifyEvent>();
this.alfSerialization = new DefaultEditStringRetrievalStrategy();
this.alfToolingInjector = AlfActivator.getInstance().getInjector(AlfActivator.ORG_ECLIPSE_PAPYRUS_UML_ALF_ALF);
@@ -96,13 +98,18 @@ public class AlfEditionPropertySection extends @Override
public void refresh() {
- /* 1. Update adapters placed over the xtext resource */
- this.updateXtextAdapters(this.textControl);
- /* 2. Compute edit string */
+ /* 1. Compute edit string */
String serialization = "/*Error: serialization could not be computed*/";
if (this.eObject != null) {
serialization = this.alfSerialization.getEditString(this.getEditableObject(this.eObject));
}
+
+ /* 2. Update adapters placed over the xtext resource */
+ if(this.previousEObject!=this.eObject){
+ this.updateXtextAdapters(this.textControl);
+ this.previousEObject = this.eObject;
+ }
+
/* 3. Set up editor content (textControl) */
this.textControl.setText(serialization);
if (this.textControl != null) {
|