Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/alf/core')
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java5
2 files changed, 7 insertions, 1 deletions
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF
index 64d3a5a0f93..166fe48fd00 100644
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF
+++ b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.alf;bundle-version="1.1.0",
org.eclipse.papyrus.uml.alf.text;bundle-version="0.7.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.compare
+ org.eclipse.compare,
+ org.eclipse.papyrus.uml.alf.preferences
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.uml.alf.transaction,
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java
index 1c2c9402bde..6476489f4a8 100644
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java
+++ b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/FUMLElementListener.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.transaction.ResourceSetChangeEvent;
import org.eclipse.emf.transaction.ResourceSetListenerImpl;
import org.eclipse.emf.transaction.RollbackException;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.uml.alf.preferences.AlfIntegrationPreferencesUtil;
import org.eclipse.papyrus.uml.alf.transaction.commit.ISyncScenario;
import org.eclipse.papyrus.uml.alf.transaction.commit.ScenarioFactory;
import org.eclipse.papyrus.uml.alf.transaction.observation.listener.filter.FUMLFilter;
@@ -53,6 +54,10 @@ public class FUMLElementListener extends ResourceSetListenerImpl {
* Note this is not always possible (e.g. the user has ongoing changes in the text)
*/
public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException {
+ /* 0. If the user disabled the synchronization then we do not exploit notifications*/
+ if(!AlfIntegrationPreferencesUtil.isAlfAutoSyncEnabled()){
+ return null;
+ }
/* 1. Initialization */
CompoundCommand subCommands = new CompoundCommand("Synchronization");
HashMap<Element, List<Notification>> modifications = new HashMap<Element, List<Notification>>();

Back to the top