Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.preferences/src/org/eclipse/papyrus/uml/alf/preferences/AlfIntegrationPreferencesUtil.java')
-rw-r--r--extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.preferences/src/org/eclipse/papyrus/uml/alf/preferences/AlfIntegrationPreferencesUtil.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.preferences/src/org/eclipse/papyrus/uml/alf/preferences/AlfIntegrationPreferencesUtil.java b/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.preferences/src/org/eclipse/papyrus/uml/alf/preferences/AlfIntegrationPreferencesUtil.java
new file mode 100644
index 00000000000..998c2ff5303
--- /dev/null
+++ b/extraplugins/alf/ui/org.eclipse.papyrus.uml.alf.preferences/src/org/eclipse/papyrus/uml/alf/preferences/AlfIntegrationPreferencesUtil.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Jeremie Tatibouet (CEA LIST)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.alf.preferences;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
+
+public class AlfIntegrationPreferencesUtil {
+
+ private final static String qualifier = "org.eclipse.papyrus.uml.alf.preferences";
+
+ public static boolean isAlfSupportEnabled() {
+ IPreferencesService preferencesService = Platform.getPreferencesService();
+ return preferencesService.getBoolean(qualifier,
+ AlfIntegrationPreferencesConstants.ALF_SUPPORT, false, null);
+ }
+
+ public static boolean isAlfAutoSyncEnabled() {
+ IPreferencesService preferencesService = Platform.getPreferencesService();
+ boolean syncEnabled = preferencesService.getBoolean(qualifier,
+ AlfIntegrationPreferencesConstants.ALF_AUTOMATIC_SYNCHRONIZATION, false, null);
+ return syncEnabled && isAlfSupportEnabled();
+ }
+}

Back to the top