Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnault Lapitre2018-01-31 16:15:39 +0000
committerArnault Lapitre2018-01-31 17:14:19 +0000
commit0a1de95f8895984c5fc2de808502a424f05d8eb7 (patch)
tree168ade1d8753353d507e873dd8f23faa566dac75
parenta5ce162839482a542a6f561e62a9325aa41e1faf (diff)
downloadorg.eclipse.efm-modeling-0a1de95f8895984c5fc2de808502a424f05d8eb7.tar.gz
org.eclipse.efm-modeling-0a1de95f8895984c5fc2de808502a424f05d8eb7.tar.xz
org.eclipse.efm-modeling-0a1de95f8895984c5fc2de808502a424f05d8eb7.zip
Bug 514634 general Improvement
[Update] Create a dedicated workflow using configuration and model name [update] Adding option for identifier formating using '#' or not as name separator for symbolic fresh variable Change-Id: If84f6503587c2fe828665db1586537a88a15bdc7 Signed-off-by: Arnault Lapitre <arnault.lapitre@cea.fr>
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationConstants.java17
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowPreferenceConstants.java8
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/SymbexPreferenceUtil.java4
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/DirectorCustomImpl.java32
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkflowCustomImpl.java12
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/BasicTraceSerializerWorkerCustomImpl.java2
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/META-INF/MANIFEST.MF4
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/LaunchDelegate.java56
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/plugin2analyse/SWTQualitativeInfo.java2
-rw-r--r--execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/LaunchConfigurationManager.java37
-rw-r--r--execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/SymbexWorkflowView.java59
11 files changed, 187 insertions, 46 deletions
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationConstants.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationConstants.java
index b288380..cafe137 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationConstants.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationConstants.java
@@ -466,8 +466,8 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
// %1% --> condition
+ "\npath#condition = \"\\tPC: %1%\\n\""
+ "\npath#timed#condition = \"\\tPtC: %1%\\n\""
- + "\nnode#condition = "//\"\\tNC: %1%\\n\""
- + "\nnode#timed#condition = "//\"\\tNtC: %1%\\n\""
+ + "\nnode#condition = \"\\tNC: %1%\\n\""
+ + "\nnode#timed#condition = \"\\tNtC: %1%\\n\""
// %1% --> machine runtime pid
// %2% --> machine identifier name
// %3% --> port | signal | variable | machine | transition | routine
@@ -702,16 +702,23 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
PLUGIN_LAUNCH_ID + ".ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC"; //$NON-NLS-1$
public static final String DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC
+ // %1% --> ec#id
+ // %2% --> ec#eval
+ // %3% --> ec#hight
+ // %4% --> ec#width
+ // %5% --> ec#weight
+ // %6% --> statemachine configuration i.e. lifelines state identifier
+ = "node#header = EC#%1%<Ev:%2% , H:%3%>\\n%6%"
// %1% --> lifeline runtime pid
// %2% --> lifeline identifier
// %3% --> state runtime pid
// %3% --> state identifier
- = "lifeline#state = %2%:%4%"
+ + "\nlifeline#state = %2%:%4%"
// %1% --> condition
+ "\npath#condition = PC: %1%"
+ "\npath#timed#condition = PtC: %1%"
- + "\nnode#condition = "//NC: %1%"
- + "\nnode#timed#condition = "//NtC: %1%"
+ + "\nnode#condition = NC: %1%"
+ + "\nnode#timed#condition = NtC: %1%"
// %1% --> machine runtime pid
// %2% --> machine identifier name
// %3% --> port | signal | variable | machine | transition | routine
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowPreferenceConstants.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowPreferenceConstants.java
index 007d262..611ab15 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowPreferenceConstants.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowPreferenceConstants.java
@@ -56,10 +56,14 @@ public interface IWorkflowPreferenceConstants {
/**
* String attribute identifying the location of an external. Default value
* is <code>null</code>. Encoding is tool specific.
- */ ////////////////////////////////////////////////////////////////////////////
- // LAUNCH CONFIGURATION PLUGIN PREFIX ID
+ */
+
+ ////////////////////////////////////////////////////////////////////////////
+ // LAUNCH CONFIGURATION ID
////////////////////////////////////////////////////////////////////////////
+ public static final String PREF_LAUNCH_CONFIGURATION_SELECTION =
+ PLUGIN_PREFERENCE_ID + ".PREF_LAUNCH_CONFIGURATION_SELECTION";
public static final String PREF_EXPERT_MODE =
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/SymbexPreferenceUtil.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/SymbexPreferenceUtil.java
index 16a50d2..dbc93c2 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/SymbexPreferenceUtil.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/SymbexPreferenceUtil.java
@@ -41,6 +41,10 @@ public class SymbexPreferenceUtil {
return Activator.getDefault().getPreferenceStore().getString(name);
}
+ public static void setPreference(String name, String value) {
+ Activator.getDefault().getPreferenceStore().setValue(name, value);
+ }
+
public static void loadGlobals(IPreferenceStore prefs) throws Exception {
fDiversityInstallationLocation = new Path( prefs.getString(
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/DirectorCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/DirectorCustomImpl.java
index 351a8be..6408fda 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/DirectorCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/DirectorCustomImpl.java
@@ -83,8 +83,8 @@ public class DirectorCustomImpl extends DirectorImpl
return( director );
}
-
- public boolean configureProject(ILaunchConfiguration configuration) {
+
+ public static String getModelPath(ILaunchConfiguration configuration) {
String modelPath;
try {
modelPath = configuration.getAttribute(
@@ -95,6 +95,34 @@ public class DirectorCustomImpl extends DirectorImpl
modelPath = null;
}
+
+ return modelPath;
+ }
+
+ public static String getModelFilename(ILaunchConfiguration configuration) {
+ String modelPath = getModelPath( configuration );
+
+ int pos = modelPath.lastIndexOf(IPath.SEPARATOR);
+ if( pos > 0 ) {
+ modelPath = modelPath.substring(pos+1);
+ }
+
+ return modelPath;
+ }
+
+ public static String getModelBasename(ILaunchConfiguration configuration) {
+ String modelFilename = DirectorCustomImpl.getModelFilename( configuration );
+
+ int pos = modelFilename.lastIndexOf('.');
+ if( pos > 0 ) {
+ modelFilename = modelFilename.substring(0, pos);
+ }
+
+ return modelFilename;
+ }
+
+ public boolean configureProject(ILaunchConfiguration configuration) {
+ String modelPath = getModelPath( configuration );
if( (modelPath != null) && (! modelPath.isEmpty()) ) {
Project project = CommonFactory.eINSTANCE.createProject();
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkflowCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkflowCustomImpl.java
index b1d1776..eb68574 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkflowCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkflowCustomImpl.java
@@ -232,7 +232,17 @@ public class WorkflowCustomImpl extends WorkflowImpl
if( symbexMode != null ) {
writer.appendTab2Eol( "symbex 'option' [" );
- writer.appendTab3Eol( "node_condition_enabled = false");
+ writer.appendTab3Eol( "name_id_separator = \"_\" // default \"#\"");
+
+ writer.appendTab3Eol( "newfresh_param_name_pid = false");
+
+ writer.appendTab3Eol( "pretty_printer_var_name = true // default false");
+
+ writer.appendTab3Eol( "time_name_id = '$time'" );
+ writer.appendTab3Eol( "delta_name_id = '$delta'" );
+
+
+ writer.appendTab3Eol( "node_condition_enabled = true // default false");
writer.appendTab3Eol( "separation_of_pc_disjunction = false" );
writer.appendTab3Eol( "check_pathcondition_satisfiability = true" );
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/BasicTraceSerializerWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/BasicTraceSerializerWorkerCustomImpl.java
index a27c089..d3fdda3 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/BasicTraceSerializerWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/BasicTraceSerializerWorkerCustomImpl.java
@@ -318,6 +318,8 @@ public class BasicTraceSerializerWorkerCustomImpl extends BasicTraceSerializerIm
writer2.appendTab2Eol( "info#selection = 'ALL'" );
writer2.appendTab2Eol( "data#selection = 'MODIFIED'" );
+ writer2.appendTab2Eol( "numerizer = 'SOLVER'" ); // ~ | NONE | NEWFRESH
+
writer2.appendTab2( "normalize = " )
.appendEol( isEnabledNormalization() );
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/META-INF/MANIFEST.MF b/execution/org.eclipse.efm.execution.launchconfiguration/META-INF/MANIFEST.MF
index 2b0257f..e14ab87 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/META-INF/MANIFEST.MF
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/META-INF/MANIFEST.MF
@@ -10,10 +10,6 @@ Bundle-Activator: org.eclipse.efm.execution.launchconfiguration.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.debug.core,
- org.eclipse.jdt.launching,
- org.eclipse.jdt.debug,
- org.eclipse.jdt.debug.ui,
org.eclipse.ui.workbench,
org.eclipse.ui.ide,
org.eclipse.ui.navigator,
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/LaunchDelegate.java b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/LaunchDelegate.java
index bbe429b..bfe1e3b 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/LaunchDelegate.java
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/LaunchDelegate.java
@@ -17,6 +17,8 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -38,6 +40,7 @@ import org.eclipse.efm.execution.core.AbstractLaunchDelegate;
import org.eclipse.efm.execution.core.Activator;
import org.eclipse.efm.execution.core.IWorkflowPreferenceConstants;
import org.eclipse.efm.execution.core.SymbexPreferenceUtil;
+import org.eclipse.efm.execution.core.workflow.DirectorCustomImpl;
import org.eclipse.efm.execution.core.workflow.WorkflowCustomImpl;
import org.eclipse.efm.execution.launchconfiguration.ui.views.page.LaunchExecConsoleManager;
import org.eclipse.efm.execution.launchconfiguration.util.BackgroundResourceRefresher;
@@ -49,7 +52,11 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
// private final String PROJECT_FAVM = "project.favm";
- private final String WORKFLOW_SEW = "workflow.sew";
+ private final String BASENAME_SEP = "-";
+
+ private final String WORKFLOW_BASENAME = "workflow";
+
+ private final String WORKFLOW_EXTENSION = ".sew";
private IPath fAvmExecLocation;
@@ -77,6 +84,49 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
fEnabledDebugOrDeveloperMode = false;
}
+
+
+ public static boolean isValidFilename(String text)
+ {
+ final Pattern pattern = Pattern.compile(
+ "# Match a valid Windows filename (unspecified file system). \n" +
+ "^ # Anchor to start of string. \n" +
+ "(?! # Assert filename is not: CON, PRN, \n" +
+ " (?: # AUX, NUL, COM1, COM2, COM3, COM4, \n" +
+ " CON|PRN|AUX|NUL| # COM5, COM6, COM7, COM8, COM9, \n" +
+ " COM[1-9]|LPT[1-9] # LPT1, LPT2, LPT3, LPT4, LPT5, \n" +
+ " ) # LPT6, LPT7, LPT8, and LPT9... \n" +
+ " (?:\\.[^.]*)? # followed by optional extension \n" +
+ " $ # and end of string \n" +
+ ") # End negative lookahead assertion. \n" +
+ "[^<>:\"/\\\\|?*\\x00-\\x1F]* # Zero or more valid filename chars.\n" +
+ "[^<>:\"/\\\\|?*\\x00-\\x1F\\ .] # Last char is not a space or dot. \n" +
+ "$ # Anchor to end of string. ",
+ Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.COMMENTS);
+
+ final Matcher matcher = pattern.matcher(text);
+
+ return matcher.matches();
+ }
+
+ protected IPath getWorkflowPath(ILaunchConfiguration configuration) {
+ final String modelBasename =
+ DirectorCustomImpl.getModelBasename( configuration );
+
+ final String configName = configuration.getName();
+
+ final String filename = WORKFLOW_BASENAME +
+ (configName.isEmpty() ? "" : (BASENAME_SEP + configName)) +
+ (modelBasename.isEmpty() ? "" : (BASENAME_SEP + modelBasename)) +
+ WORKFLOW_EXTENSION;
+
+ if( isValidFilename( filename ) ) {
+ return fWorkingDirectory.append( filename );
+ }
+ else {
+ return fWorkingDirectory.append( WORKFLOW_BASENAME + WORKFLOW_EXTENSION );
+ }
+ }
@Override
public void launch(ILaunchConfiguration configuration,
@@ -105,9 +155,9 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
WorkflowCustomImpl.create(
configuration, fWorkingDirectory);
- workflow.toWriter( fWorkingDirectory.append(WORKFLOW_SEW) );
+ fSewLocation = getWorkflowPath(configuration);
- fSewLocation = fWorkingDirectory.append(WORKFLOW_SEW);
+ workflow.toWriter( fSewLocation );
// if( fEnabledDebugOrDeveloperMode ) {
// WorkflowFAVM aWorkflowFAVM = new WorkflowFAVM();
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/src/plugin2analyse/SWTQualitativeInfo.java b/execution/org.eclipse.efm.execution.launchconfiguration/src/plugin2analyse/SWTQualitativeInfo.java
index b2a1233..84abe54 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/src/plugin2analyse/SWTQualitativeInfo.java
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/src/plugin2analyse/SWTQualitativeInfo.java
@@ -145,7 +145,7 @@ public class SWTQualitativeInfo extends Canvas {
int xVariation1 = (int) (rayon * 0.951); // sinus(72)
int yVariation1 = (int) (rayon * 0.309); // cosinus(72)
e.gc.drawLine(xCentre, yCentre, xCentre-xVariation1, yCentre-yVariation1);
- e.gc.drawString("width", xCentre-xVariation1-50, yCentre-yVariation1-10);
+ e.gc.drawString("width", xCentre-xVariation1-40, yCentre-yVariation1-10);
e.gc.drawLine(xCentre, yCentre, xCentre+xVariation1, yCentre-yVariation1);
e.gc.drawString("context", xCentre+xVariation1+10, yCentre-yVariation1-10);
diff --git a/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/LaunchConfigurationManager.java b/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/LaunchConfigurationManager.java
index e14e18e..f204a65 100644
--- a/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/LaunchConfigurationManager.java
+++ b/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/LaunchConfigurationManager.java
@@ -21,6 +21,8 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationListener;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.efm.execution.core.IWorkflowPreferenceConstants;
+import org.eclipse.efm.execution.core.SymbexPreferenceUtil;
public class LaunchConfigurationManager implements ILaunchConfigurationListener {
@@ -38,7 +40,7 @@ public class LaunchConfigurationManager implements ILaunchConfigurationListener
protected ILaunchConfiguration[] fConfigurations;
protected String[] fNames;
-
+
protected ILaunchConfiguration fSelection;
@@ -74,6 +76,9 @@ public class LaunchConfigurationManager implements ILaunchConfigurationListener
for( int i = 0 ; i < fConfigurations.length ; i++ ) {
fNames[i] = fConfigurations[i].getName();
}
+
+ select( SymbexPreferenceUtil.getStringPreference(
+ IWorkflowPreferenceConstants.PREF_LAUNCH_CONFIGURATION_SELECTION) );
} catch (CoreException e) {
e.printStackTrace();
@@ -117,10 +122,26 @@ public class LaunchConfigurationManager implements ILaunchConfigurationListener
return fSelection;
}
+ public int getSelectionIndex() {
+ for (int index = 0; index < fConfigurations.length; index++) {
+ if( fSelection == fConfigurations[index] ) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
public boolean hasSelection() {
return( fSelection != null );
}
+
+ public void initializeSelection(int defaultIndex) {
+ if( fSelection == null ) {
+ select( defaultIndex );
+ }
+ }
+
public void select(int index) {
if( (index >= 0) && (index < fConfigurations.length) ) {
fSelection = fConfigurations[index];
@@ -130,6 +151,20 @@ public class LaunchConfigurationManager implements ILaunchConfigurationListener
}
}
+ public void select(String configurationName) {
+ if( configurationName != null ) {
+ for (ILaunchConfiguration launchConfiguration : fConfigurations) {
+ if( configurationName.equals( launchConfiguration.getName() ) ) {
+ fSelection = launchConfiguration;
+ break;
+ }
+ }
+ }
+ else {
+ select( 0 );
+ }
+ }
+
public String[] getNames() {
return fNames;
diff --git a/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/SymbexWorkflowView.java b/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/SymbexWorkflowView.java
index d8a20eb..a4a5f44 100644
--- a/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/SymbexWorkflowView.java
+++ b/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/SymbexWorkflowView.java
@@ -51,7 +51,8 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
-public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
+public class SymbexWorkflowView extends AbstractSymbexWorkflowView
+ implements IWorkflowPreferenceConstants {
/**
* The ID of the view as specified by the extension.
@@ -64,7 +65,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
protected Composite tabbedCompositeMaster;
protected CTabFolder fTabFolder;
- protected Combo combo;
+ protected Combo fComboLaunchConfiguration;
protected LaunchConfigurationManager launchConfigurationManager;
@@ -100,11 +101,12 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
FormWidgetToolkit toolkit = getFormWidgetToolkit();
- combo = GenericCompositeCreator.createComposite_combo_text_from_toolkit(
- toolkit, scrollform.getBody(), "Run Configuration :", 2);
+ fComboLaunchConfiguration =
+ GenericCompositeCreator.createComposite_combo_text_from_toolkit(
+ toolkit, scrollform.getBody(), "Run Configuration :", 2);
//new Combo(scrollform.getBody(), SWT.READ_ONLY);
- combo.setItems( launchConfigurationManager.getNames() );
+ fComboLaunchConfiguration.setItems( launchConfigurationManager.getNames() );
//text_model_file_path = GenericCompositeCreator.createComposite_label_text_from_toolkit(
// toolkit, scrollform.getBody(), "Model File :", 2);
@@ -121,10 +123,10 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
//PlatformUI.getWorkbench().getHelpSystem().setHelp(this, "");
- combo.addSelectionListener(new SelectionAdapter() {
+ fComboLaunchConfiguration.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- int index = combo.getSelectionIndex();
+ int index = fComboLaunchConfiguration.getSelectionIndex();
launchConfigurationManager.select(index);
@@ -138,9 +140,9 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
});
if( launchConfigurationManager.isPopulated() ) {
- launchConfigurationManager.select(0);
+ launchConfigurationManager.initializeSelection(0);
- combo.select(0);
+ fComboLaunchConfiguration.select(launchConfigurationManager.getSelectionIndex());
initializeFieldValuesFrom(launchConfigurationManager.getSelection());
}
@@ -155,28 +157,28 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
}
public void refreshLaunchConfigurationsGUI() {
- int cur_index = combo.getSelectionIndex();
+ int cur_index = fComboLaunchConfiguration.getSelectionIndex();
String cur_name = null;
if (cur_index != -1) {
- cur_name = combo.getItem(cur_index);
+ cur_name = fComboLaunchConfiguration.getItem(cur_index);
}
// launchConfigurationManager.refresh();
String[] contents = launchConfigurationManager.getNames();
- combo.setItems(contents);
+ fComboLaunchConfiguration.setItems(contents);
if( (cur_name != null) && Arrays.asList(contents).contains(cur_name) )
{
int new_index = Arrays.asList(contents).indexOf(cur_name);
launchConfigurationManager.select(new_index);
- combo.select(new_index);
+ fComboLaunchConfiguration.select(new_index);
} else if( launchConfigurationManager.isPopulated() ) {
launchConfigurationManager.select(0);
- combo.select(0);
+ fComboLaunchConfiguration.select(0);
} else {
- combo.deselectAll();
+ fComboLaunchConfiguration.deselectAll();
launchConfigurationManager.select(-1);
}
@@ -187,11 +189,11 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
public void launchConfigurationChanged(ILaunchConfiguration configuration, int index) {
if( index >= 0 ) {
- combo.select(index);
+ fComboLaunchConfiguration.select(index);
initializeFieldValuesFrom(configuration);
} else {
- combo.deselectAll();
+ fComboLaunchConfiguration.deselectAll();
}
}
@@ -206,20 +208,17 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
createTestGenerationTabItem(widgetToolkit, confPage);
- if( SymbexPreferenceUtil.getBooleanPreference(
- IWorkflowPreferenceConstants.PREF_DEBUG_OPTIONS) )
+ if( SymbexPreferenceUtil.getBooleanPreference(PREF_DEBUG_OPTIONS) )
{
createDebugTabItem(widgetToolkit, confPage);
}
- if( SymbexPreferenceUtil.getBooleanPreference(
- IWorkflowPreferenceConstants.PREF_EXPERT_MODE) )
+ if( SymbexPreferenceUtil.getBooleanPreference(PREF_EXPERT_MODE) )
{
createExpertTabItem(widgetToolkit, confPage);
}
if ( LaunchDelegate.ENABLED_SYMBEX_DEVELOPER_MODE_OPTION
- && SymbexPreferenceUtil.getBooleanPreference(
- IWorkflowPreferenceConstants.PREF_SYMBEX_DEVELOPER_MODE) )
+ && SymbexPreferenceUtil.getBooleanPreference(PREF_SYMBEX_DEVELOPER_MODE) )
{
createDeveloperTuningTabItem(widgetToolkit, confPage);
}
@@ -448,6 +447,12 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
ILaunchConfigurationWorkingCopy rwConfiguration;
try {
rwConfiguration = configuration.getWorkingCopy();
+
+ // Save Selection in Preferences
+ SymbexPreferenceUtil.setPreference(
+ PREF_LAUNCH_CONFIGURATION_SELECTION,
+ launchConfigurationManager.getSelection().getName());
+
for(AbstractConfigurationPage acm : fConfigurationPages) {
acm.applyUpdatesOnFieldValuesFrom(rwConfiguration);
}
@@ -574,7 +579,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
// ======================================================================================
- private ILaunchConfigurationWorkingCopy fLasLaunchConfigurationWorkingCopy;
+ private ILaunchConfigurationWorkingCopy fLastLaunchConfigurationWorkingCopy;
public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
for(AbstractConfigurationPage acm : fConfigurationPages) {
@@ -595,9 +600,9 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView {
try {
ILaunchConfigurationWorkingCopy newcopy = selectedLC.getWorkingCopy();
- if( (fLasLaunchConfigurationWorkingCopy == null)
- || (! fLasLaunchConfigurationWorkingCopy.contentsEqual(newcopy)) ) {
- fLasLaunchConfigurationWorkingCopy = newcopy;
+ if( (fLastLaunchConfigurationWorkingCopy == null)
+ || (! fLastLaunchConfigurationWorkingCopy.contentsEqual(newcopy)) ) {
+ fLastLaunchConfigurationWorkingCopy = newcopy;
System.err.println("++++---- Biopp");
for(AbstractConfigurationPage acm : fConfigurationPages) {

Back to the top