diff --git a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAComputationPreferencePage.java b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAComputationPreferencePage.java index 70645e5e77032a032acd9f0bdb592635a623f9b7..0a43d0f92ab9cbba9632ed38fd861fe0337198aa 100644 --- a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAComputationPreferencePage.java +++ b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAComputationPreferencePage.java @@ -4,6 +4,7 @@ import org.eclipse.jface.preference.*; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbench; import fr.irisa.atsyra.ide.ui.Activator; +import fr.irisa.atsyra.preferences.constants.AtsyraPreferenceConstants; /** * This class represents a preference page that @@ -37,19 +38,19 @@ public class ATSyRAComputationPreferencePage */ public void createFieldEditors() { - addField(new IntegerFieldEditor(PreferenceConstants.P_MANYWITNESS, + addField(new IntegerFieldEditor(AtsyraPreferenceConstants.P_MANYWITNESS, "&Manywitness, compute up to xxx witnesses", getFieldEditorParent())); - addField(new BooleanFieldEditor(PreferenceConstants.P_MANYWITNESS_NON_MINIMAL, + addField(new BooleanFieldEditor(AtsyraPreferenceConstants.P_MANYWITNESS_NON_MINIMAL, "&Non minimal length witnesses (uses --init-gadget)", getFieldEditorParent())); - addField(new IntegerFieldEditor(PreferenceConstants.P_STATE_PRINT_LIMIT, + addField(new IntegerFieldEditor(AtsyraPreferenceConstants.P_STATE_PRINT_LIMIT, "&Print-limit, threshold for printout of states in witnesses", getFieldEditorParent())); - addField(new IntegerFieldEditor(PreferenceConstants.P_MAX_EXEC_TIME, + addField(new IntegerFieldEditor(AtsyraPreferenceConstants.P_MAX_EXEC_TIME, "Maximum e&xecution time", getFieldEditorParent())); - addField(new BooleanFieldEditor(PreferenceConstants.P_ENFORCE_DYNAMIC_CONTRACTS, + addField(new BooleanFieldEditor(AtsyraPreferenceConstants.P_ENFORCE_DYNAMIC_CONTRACTS, "Enforce &dynamic contracts", getFieldEditorParent())); } diff --git a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAPreferencePage.java b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAPreferencePage.java index 438b2cdc44a2164f92d622a066c3c41a2f5200b3..f5b1f2733e5f367b6f86108ea3eecde266114bb5 100644 --- a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAPreferencePage.java +++ b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/ATSyRAPreferencePage.java @@ -4,6 +4,7 @@ import org.eclipse.jface.preference.*; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbench; import fr.irisa.atsyra.ide.ui.Activator; +import fr.irisa.atsyra.preferences.constants.AtsyraPreferenceConstants; /** * This class represents a preference page that @@ -37,11 +38,11 @@ public class ATSyRAPreferencePage */ public void createFieldEditors() { addField(new BooleanFieldEditor( - PreferenceConstants.P_GENERATE_OPTIONAL_FILES, + AtsyraPreferenceConstants.P_GENERATE_OPTIONAL_FILES, "&Generate optional files", getFieldEditorParent())); addField(new RadioGroupFieldEditor( - PreferenceConstants.P_OVERRIDE_LOCALE, + AtsyraPreferenceConstants.P_OVERRIDE_LOCALE, "&Custom ATSyRA Locale", 1, new String[][] { { "&none", "" }, { "&fr", "fr" }, { diff --git a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceConstants.java b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceConstants.java index 96e3038ba9c24e74632631c2672f37a6515ec308..becb17be675264cdf03381babf610c23279598a6 100644 --- a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceConstants.java +++ b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceConstants.java @@ -1,17 +1,20 @@ package fr.irisa.atsyra.ide.ui.preferences; +import fr.irisa.atsyra.preferences.constants.AtsyraPreferenceConstants; + /** * Constant definitions for plug-in preferences + * Redirects to to {@link fr.irisa.atsyra.preferences.constants#AtsyraPreferenceConstants AtsyraPreferenceConstants} for compatibility. */ public class PreferenceConstants { - public static final String P_GENERATE_OPTIONAL_FILES = "generateResultFiles"; - public static final String P_OVERRIDE_LOCALE = "overrideLocale"; + public static final String P_GENERATE_OPTIONAL_FILES = AtsyraPreferenceConstants.P_GENERATE_OPTIONAL_FILES; + public static final String P_OVERRIDE_LOCALE = AtsyraPreferenceConstants.P_OVERRIDE_LOCALE; - public static final String P_MANYWITNESS = "manyPreference"; - public static final String P_MANYWITNESS_NON_MINIMAL = "nonMinimalManyPreference"; - public static final String P_STATE_PRINT_LIMIT = "statePrintLimitPreference"; - public static final String P_MAX_EXEC_TIME = "maxExecTimePreference"; - public static final String P_ENFORCE_DYNAMIC_CONTRACTS = "enforceDynamicContracts"; + public static final String P_MANYWITNESS = AtsyraPreferenceConstants.P_MANYWITNESS; + public static final String P_MANYWITNESS_NON_MINIMAL = AtsyraPreferenceConstants.P_MANYWITNESS_NON_MINIMAL; + public static final String P_STATE_PRINT_LIMIT = AtsyraPreferenceConstants.P_STATE_PRINT_LIMIT; + public static final String P_MAX_EXEC_TIME = AtsyraPreferenceConstants.P_MAX_EXEC_TIME; + public static final String P_ENFORCE_DYNAMIC_CONTRACTS = AtsyraPreferenceConstants.P_ENFORCE_DYNAMIC_CONTRACTS; } diff --git a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceInitializer.java b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceInitializer.java index 490f29413d3617869bf63c147c629fed6eb15554..bc1a5b162869e278d54ef0d3a27ff031ce188dae 100644 --- a/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceInitializer.java +++ b/plugins/fr.irisa.atsyra.ide.ui/src/fr/irisa/atsyra/ide/ui/preferences/PreferenceInitializer.java @@ -4,6 +4,7 @@ import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; import fr.irisa.atsyra.ide.ui.Activator; +import fr.irisa.atsyra.preferences.constants.AtsyraPreferenceConstants; /** * Class used to initialize default preference values. @@ -17,14 +18,14 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer { */ public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - store.setDefault(PreferenceConstants.P_GENERATE_OPTIONAL_FILES, true); - store.setDefault(PreferenceConstants.P_OVERRIDE_LOCALE, ""); + store.setDefault(AtsyraPreferenceConstants.P_GENERATE_OPTIONAL_FILES, true); + store.setDefault(AtsyraPreferenceConstants.P_OVERRIDE_LOCALE, ""); - store.setDefault(PreferenceConstants.P_MANYWITNESS, 10); - store.setDefault(PreferenceConstants.P_MANYWITNESS_NON_MINIMAL, true); - store.setDefault(PreferenceConstants.P_STATE_PRINT_LIMIT, 50); - store.setDefault(PreferenceConstants.P_MAX_EXEC_TIME, 60); - store.setDefault(PreferenceConstants.P_ENFORCE_DYNAMIC_CONTRACTS, true); + store.setDefault(AtsyraPreferenceConstants.P_MANYWITNESS, 10); + store.setDefault(AtsyraPreferenceConstants.P_MANYWITNESS_NON_MINIMAL, true); + store.setDefault(AtsyraPreferenceConstants.P_STATE_PRINT_LIMIT, 50); + store.setDefault(AtsyraPreferenceConstants.P_MAX_EXEC_TIME, 60); + store.setDefault(AtsyraPreferenceConstants.P_ENFORCE_DYNAMIC_CONTRACTS, true); } } diff --git a/plugins/fr.irisa.atsyra.preferences/META-INF/MANIFEST.MF b/plugins/fr.irisa.atsyra.preferences/META-INF/MANIFEST.MF index d749f8299f4af1d64408a69c908a048ea8005b32..a456f03708ab953074f50cffe289e2ada2ca644c 100644 --- a/plugins/fr.irisa.atsyra.preferences/META-INF/MANIFEST.MF +++ b/plugins/fr.irisa.atsyra.preferences/META-INF/MANIFEST.MF @@ -5,4 +5,5 @@ Bundle-SymbolicName: fr.irisa.atsyra.preferences Bundle-Version: 1.0.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Automatic-Module-Name: fr.irisa.atsyra.preferences -Export-Package: fr.irisa.atsyra.preferences +Export-Package: fr.irisa.atsyra.preferences, + fr.irisa.atsyra.preferences.constants diff --git a/plugins/fr.irisa.atsyra.preferences/src/fr/irisa/atsyra/preferences/constants/AtsyraPreferenceConstants.java b/plugins/fr.irisa.atsyra.preferences/src/fr/irisa/atsyra/preferences/constants/AtsyraPreferenceConstants.java new file mode 100644 index 0000000000000000000000000000000000000000..8167ab3f5c9875b916bbff7eadd1061b424aff8a --- /dev/null +++ b/plugins/fr.irisa.atsyra.preferences/src/fr/irisa/atsyra/preferences/constants/AtsyraPreferenceConstants.java @@ -0,0 +1,29 @@ +package fr.irisa.atsyra.preferences.constants; + +/** + * Constant definitions for preferences + */ +public class AtsyraPreferenceConstants { + private AtsyraPreferenceConstants() { + // static class + } + // the qualifier of the eclipse preference plugin + public static final String P_QUALIFIER = "fr.irisa.atsyra.ide.ui"; + + // Boolean + public static final String P_GENERATE_OPTIONAL_FILES = "generateResultFiles"; + // Radio + public static final String P_OVERRIDE_LOCALE = "overrideLocale"; + + // Integer + public static final String P_MANYWITNESS = "manyPreference"; + // Boolean + public static final String P_MANYWITNESS_NON_MINIMAL = "nonMinimalManyPreference"; + // Integer + public static final String P_STATE_PRINT_LIMIT = "statePrintLimitPreference"; + // Integer + public static final String P_MAX_EXEC_TIME = "maxExecTimePreference"; + // Boolean + public static final String P_ENFORCE_DYNAMIC_CONTRACTS = "enforceDynamicContracts"; + +} diff --git a/plugins/fr.irisa.atsyra.preferences/src/fr/irisa/atsyra/preferences/constants/GalPreferenceConstants.java b/plugins/fr.irisa.atsyra.preferences/src/fr/irisa/atsyra/preferences/constants/GalPreferenceConstants.java new file mode 100644 index 0000000000000000000000000000000000000000..46f97bf07be7430501de48fb5de7375c688e8b73 --- /dev/null +++ b/plugins/fr.irisa.atsyra.preferences/src/fr/irisa/atsyra/preferences/constants/GalPreferenceConstants.java @@ -0,0 +1,42 @@ +package fr.irisa.atsyra.preferences.constants; + +/** + * Constant definitions for preferences + */ +public class GalPreferenceConstants { + private GalPreferenceConstants() { + // static class + } + + // the qualifier of the eclipse preference plugin + public static final String P_QUALIFIER = "fr.lip6.move.gal.itstools.preference"; + + // Integer + public static final String TIMEOUT_DURATION = "Maximum execution time"; + + // Boolean + public static final String QUIET_PARAMETER = "Low Verbosity"; + + // Boolean + public static final String DDDSDD_PARAMETER = "Privilege SDD encoding"; + + // Combo + public static final String SCALAR_PARAMETER = "Use recursive encodings for scalar"; + public static final String DEPTH2 = "Depth2"; + public static final String DEPTHREC = "DepthRec"; + public static final String DEPTHSHALLOW = "DepthShallow"; + + // Integer + public static final String GCTHRESHOLD = "GC Threshold, in MB"; + + // Integer + public static final String BLOCK_SIZE_PARAMETER = "Block size in Scalar encoding"; + + // String + public static final String ITSREACH_EXE = "its-reach"; + // String + public static final String ITSCTL_EXE = "its-ctl"; + // String + public static final String ITSLTL_EXE = "its-ltl"; + +}