Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremie.tatibouet2015-05-26 13:24:29 +0000
committerArnaud Cuccuru2015-05-26 15:02:27 +0000
commit455f4aad0b34872dca6ba98c6e46f94558c917c3 (patch)
tree66be0bfbe14974c828e7c65666c6c60cd622af2b /extraplugins/alf/core
parent08f1067b5d8478a799c683ed4b65fe21b61c46d8 (diff)
downloadorg.eclipse.papyrus-455f4aad0b34872dca6ba98c6e46f94558c917c3.tar.gz
org.eclipse.papyrus-455f4aad0b34872dca6ba98c6e46f94558c917c3.tar.xz
org.eclipse.papyrus-455f4aad0b34872dca6ba98c6e46f94558c917c3.zip
Provide a preference page for the Papyrus Alf integration.
The nominal behavior is that Alf tooling is disabled. The user can next enabled it through the preference page and additionnaly activate the automated synchronization. Answers to bug 468312. Change-Id: I8c3102b0bb450818e42b921007a2ad49bba89803 Signed-off-by: jeremie.tatibouet <jeremie.tatibouet@cea.fr> Reviewed-on: https://git.eclipse.org/r/48638 Tested-by: Hudson CI Reviewed-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr> Tested-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
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