Commit 32c276ac authored by Rakshit Mittal's avatar Rakshit Mittal
Browse files

Commented classifier extension preference for release

parent da8e1e06
......@@ -16,7 +16,7 @@ public class TestDeltaInplace extends TestAbstract {
protected DIMTransformationDeltaInplace initiateDIMTransformationDeltaInplace(String inputModelName) {
prepareTestDeltaInplaceResources(inputModelName);
final ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(aaxlResource.getResourceSet()));
final DIMTransformationDeltaInplace transformation = new DIMTransformationDeltaInplace((SystemInstance) aaxlResource.getContents().get(0), engine, new DIMPreferences(false, false, false, false, "none"));
final DIMTransformationDeltaInplace transformation = new DIMTransformationDeltaInplace((SystemInstance) aaxlResource.getContents().get(0), engine, new DIMPreferences(false, false, false, false/*, "none"*/));
transformation.execute();
return transformation;
}
......
......@@ -16,7 +16,7 @@ public class TestState extends TestAbstract {
prepareTestStateResources(inputModelName);
AadlPackage aadlPackage = PackageUtils.configureAadlPackage(topSystemInst.eResource().getURI(), topSystemInst);
aadlResource.getContents().add(aadlPackage);
TransformationUtils.executeStateDIM(aaxlResource.getResourceSet(), topSystemInst, aadlPackage, aadlResource, new DIMPreferences(false, false, false, false, "none"));
TransformationUtils.executeStateDIM(aaxlResource.getResourceSet(), topSystemInst, aadlPackage, aadlResource, new DIMPreferences(false, false, false, false/*, "none"*/));
System.out.println("DIM: State-based DIMTransformation finished corresponding to "+inputModelName+" instance model.");
}
......
......@@ -57,7 +57,7 @@ public class DIMUIPlugin extends AbstractUIPlugin{
// Getter methods
public DIMPreferences getPreferences(IProject project) {
DIMPreferences preferences = new DIMPreferences(getInheritProperty(project), getInheritMode(project), getAddClassifierProperty(project), getModifyReused(project), getExtendClassifier(project));
DIMPreferences preferences = new DIMPreferences(getInheritProperty(project), getInheritMode(project), getAddClassifierProperty(project), getModifyReused(project)/*, getExtendClassifier(project)*/);
return preferences;
}
......@@ -105,14 +105,14 @@ public class DIMUIPlugin extends AbstractUIPlugin{
}
}
private final String getExtendClassifier(IProject project) {
IScopeContext context = new ProjectScope(project);
Preferences prefs = context.getNode(PREFS_QUALIFIER);
if (!prefs.getBoolean(PREF_USE_WORKSPACE, true)) {
return prefs.get(PREF_EXTEND_CLASSIFIER, null);
} else {
final IPreferenceStore store = getPreferenceStore();
return store.getString(EXTEND_CLASSIFIER_PROPERTY);
}
}
// private final String getExtendClassifier(IProject project) {
// IScopeContext context = new ProjectScope(project);
// Preferences prefs = context.getNode(PREFS_QUALIFIER);
// if (!prefs.getBoolean(PREF_USE_WORKSPACE, true)) {
// return prefs.get(PREF_EXTEND_CLASSIFIER, null);
// } else {
// final IPreferenceStore store = getPreferenceStore();
// return store.getString(EXTEND_CLASSIFIER_PROPERTY);
// }
// }
}
......@@ -5,7 +5,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
//import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
......@@ -20,7 +20,7 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
import org.osate.core.AadlNature;
import org.osate.ui.dialogs.ProjectSelectionDialog;
import fr.mem4csd.osatedim.ui.utils.SpacerFieldEditor;
import fr.mem4csd.osatedim.viatra.preference.ClassifierExtensionPreference;
//import fr.mem4csd.osatedim.viatra.preference.ClassifierExtensionPreference;
public class DeinstantiationPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
private static final String LABEL = "Configure Project Specific Settings...";
......@@ -96,15 +96,15 @@ public class DeinstantiationPreferencePage extends FieldEditorPreferencePage imp
DIMUIPlugin.ADD_CLASSIFIER_PROPERTY_PROPERTY,"ADD DIM_Classifier Property to newly created classifiers", getFieldEditorParent());
addField(addClassifierPropertyField);
SpacerFieldEditor spacer4 = new SpacerFieldEditor(getFieldEditorParent());
addField(spacer4);
final RadioGroupFieldEditor classifierExtensionField = new RadioGroupFieldEditor(
DIMUIPlugin.EXTEND_CLASSIFIER_PROPERTY,"Classifier extension preference:",1,
new String[][] {{"NONE",ClassifierExtensionPreference.NONE_EXTENSION.getLiteral()},
{"ONLY REQUIRED (Structural changes)",ClassifierExtensionPreference.REQUIRED_EXTENSION.getLiteral()},
{"ALWAYS",ClassifierExtensionPreference.ALWAYS_EXTENSION.getLiteral()}},getFieldEditorParent());
addField(classifierExtensionField);
// SpacerFieldEditor spacer4 = new SpacerFieldEditor(getFieldEditorParent());
// addField(spacer4);
//
// final RadioGroupFieldEditor classifierExtensionField = new RadioGroupFieldEditor(
// DIMUIPlugin.EXTEND_CLASSIFIER_PROPERTY,"Classifier extension preference:",1,
// new String[][] {{"NONE",ClassifierExtensionPreference.NONE_EXTENSION.getLiteral()},
// {"ONLY REQUIRED (Structural changes)",ClassifierExtensionPreference.REQUIRED_EXTENSION.getLiteral()},
// {"ALWAYS",ClassifierExtensionPreference.ALWAYS_EXTENSION.getLiteral()}},getFieldEditorParent());
// addField(classifierExtensionField);
}
@Override
......
......@@ -2,14 +2,14 @@ package fr.mem4csd.osatedim.viatra.preference;
public class DIMPreferences {
private final boolean inheritProperty, inheritMode, addClassifierProperty, modifyReused;
private final String extendClassifier;
// private final String extendClassifier;
public DIMPreferences(boolean inheritProperty, boolean inheritMode, boolean modifyReused, boolean addClassifierProperty, String extendClassifier) {
public DIMPreferences(boolean inheritProperty, boolean inheritMode, boolean modifyReused, boolean addClassifierProperty/*, String extendClassifier*/) {
this.addClassifierProperty = addClassifierProperty;
this.inheritMode = inheritMode;
this.inheritProperty = inheritProperty;
this.modifyReused = modifyReused;
this.extendClassifier = extendClassifier;
// this.extendClassifier = extendClassifier;
}
public boolean isInheritProperty() {
......@@ -24,9 +24,9 @@ public class DIMPreferences {
return addClassifierProperty;
}
public String getExtendClassifier() {
return extendClassifier;
}
// public String getExtendClassifier() {
// return extendClassifier;
// }
public boolean isModifyReused() {
return modifyReused;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment