Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnault Lapitre2018-03-16 21:26:08 +0000
committerArnault Lapitre2018-03-16 21:26:08 +0000
commit265c2c60b2073c9350af50515891c42816de7fa4 (patch)
treebaedb1c5c8b8565203dbc0be3359eb84c96e7e7f
parent76fbefb879d9d66dd8caa96e831f4cf5847fe4f3 (diff)
downloadorg.eclipse.efm-modeling-265c2c60b2073c9350af50515891c42816de7fa4.tar.gz
org.eclipse.efm-modeling-265c2c60b2073c9350af50515891c42816de7fa4.tar.xz
org.eclipse.efm-modeling-265c2c60b2073c9350af50515891c42816de7fa4.zip
Bug 514634 general Improvement
[Update] Refactor all multiline EditText for TraceElement by TableViewer [Update] Save all Symblex-Workflow file in folder ${project_loc}/.sew/ [Update] Refactor Analysis Profile string constant to Enumeration type [Update] Set relative file path attribute to ${workspace_loc} in launch configuration Change-Id: If16b0a09b83996ec8296544297268adf0ea2c11b Signed-off-by: Arnault Lapitre <arnault.lapitre@cea.fr>
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/.classpath2
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/META-INF/MANIFEST.MF3
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationPage.java44
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationProfile.java4
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationSection.java14
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractSectionPart.java92
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/ILaunchConfigurationGUIelement.java12
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/IWidgetToolkit.java125
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/FieldEditor.java8
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementNatureEditingSupport.java153
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementSelectionEditingSupport.java84
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableConfigProvider.java321
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableViewer.java941
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementValueEditingSupport.java89
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/debug/DebugConfigurationPage.java335
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/developer/DeveloperTuningConfigurationPage.java204
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertBehaviorSelectionConfigurationProfile.java73
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertConfigurationPage.java64
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertTransitionCoverageConfigurationProfile.java36
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/nonregression/NonRegressionConfigurationPage.java33
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewAnalysisProfileSection.java112
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewBehaviorSelectionConfigurationProfile.java186
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewConfigurationPage.java87
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewExplorationConfigurationProfile.java61
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTestOfflineConfigurationProfile.java84
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTransitionCoverageConfigurationProfile.java274
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewWorkspaceDataSection.java68
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorConfigurationPage.java36
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorEvaluationLimitsSection.java26
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorGraphSizeLimitsSection.java6
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationBasicTraceConfigurationProfile.java118
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationConfigurationPage.java120
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationTTCNConfigurationProfile.java32
-rw-r--r--execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/util/GenericCompositeCreator.java80
-rw-r--r--execution/org.eclipse.efm.execution.core/resources/ecore/workflow.ecore22
-rw-r--r--execution/org.eclipse.efm.execution.core/resources/ecore/workflow.genmodel19
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/AnalysisProfileKind.java332
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/CommonPackage.java78
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElement.java28
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElementKind.java256
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonFactoryImpl.java24
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonPackageImpl.java51
-rw-r--r--execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/TraceElementImpl.java56
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationConstants.java341
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationSyntax.java37
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/util/WorkflowFileUtils.java256
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/DirectorCustomImpl.java87
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/SupervisorWorkerCustomImpl.java22
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkflowCustomImpl.java36
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkspaceCustomImpl.java9
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/DeveloperTuningOptionCustomImpl.java74
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceElementCustomImpl.java149
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceSpecificationCustomImpl.java160
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/BehaviorCoverageWorkerCustomImpl.java45
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/TransitionCoverageWorkerCustomImpl.java32
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/BasicTraceSerializerWorkerCustomImpl.java69
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/ModelGraphvizSerializerWorkerCustomImpl.java5
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/SymbexGraphvizSerializerWorkerCustomImpl.java136
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/TTCNTraceSerializerWorkerCustomImpl.java31
-rw-r--r--execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/test/OfflineTestWorkerCustomImpl.java37
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/LaunchDelegate.java93
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/AbstractSewLaunchConfigurationTab.java30
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/SymbexRuntimeTab.java11
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SEWConsoleSpiderPage.java4
-rw-r--r--execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SWTSpider.java11
-rw-r--r--execution/org.eclipse.efm.execution.ui.views/META-INF/MANIFEST.MF3
-rw-r--r--execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/AbstractSymbexWorkflowView.java49
-rw-r--r--execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/SymbexWorkflowView.java144
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/clear.gifbin0 -> 545 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/delete.pngbin0 -> 466 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-add.gifbin0 -> 569 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-delete.gifbin0 -> 564 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-edit.gifbin0 -> 577 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-movedown.gifbin0 -> 371 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-moveup.gifbin0 -> 365 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/dup_resource.pngbin0 -> 595 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowDown.gifbin0 -> 332 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowLeft.gifbin0 -> 327 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowRight.gifbin0 -> 541 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowUp.gifbin0 -> 323 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_in.gifbin0 -> 85 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_inout.gifbin0 -> 89 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_out.gifbin0 -> 85 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_return.gifbin0 -> 88 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/add.gif (renamed from gui/org.eclipse.efm.ui/resources/icons/add.gif)bin318 -> 318 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/checked.gifbin0 -> 1627 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/clear.gifbin0 -> 545 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.gifbin0 -> 351 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.pngbin0 -> 582 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/duplicate.pngbin0 -> 663 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/eraser.gifbin0 -> 545 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/info_obj.gifbin0 -> 120 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/list-add.gifbin0 -> 569 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/list-delete.gifbin0 -> 586 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/list-edit.gifbin0 -> 577 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/list-movedown.gifbin0 -> 371 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/list-moveup.gifbin0 -> 365 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/new_customization.pngbin0 -> 492 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/new_separator.gifbin0 -> 199 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/new_stack.gifbin0 -> 203 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/quickassist_obj.gifbin0 -> 225 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/refresh.gifbin0 -> 330 bytes
-rw-r--r--gui/org.eclipse.efm.ui/resources/icons/elcl16/unchecked.gifbin0 -> 1628 bytes
-rw-r--r--gui/org.eclipse.efm.ui/src/org/eclipse/efm/ui/utils/ImageResources.java108
104 files changed, 4824 insertions, 1948 deletions
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/.classpath b/execution/org.eclipse.efm.execution.configuration.common.ui/.classpath
index b862a29..7d64b57 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/.classpath
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
+ <classpathentry excluding="org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableViewer2.java|org/eclipse/efm/execution/configuration/common/ui/util/GenericCompositeCreator.java" kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/META-INF/MANIFEST.MF b/execution/org.eclipse.efm.execution.configuration.common.ui/META-INF/MANIFEST.MF
index f5fa71a..509e07c 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/META-INF/MANIFEST.MF
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.debug.core,
org.eclipse.efm.execution.core,
- org.eclipse.ui.forms
+ org.eclipse.ui.forms,
+ org.eclipse.jface
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.efm.execution.configuration.common.ui.api,
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationPage.java
index 88273f5..708a0b8 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationPage.java
@@ -20,7 +20,6 @@ import java.util.Set;
import org.eclipse.core.runtime.Assert;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.efm.execution.core.AbstractLaunchDelegate;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.efm.execution.core.IWorkflowPreferenceConstants;
@@ -31,8 +30,9 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
-public abstract class AbstractConfigurationPage implements IPropertyChangeListener,
- IWorkflowConfigurationConstants, IWorkflowPreferenceConstants {
+public abstract class AbstractConfigurationPage extends AbstractSectionPart
+ implements IPropertyChangeListener,
+ IWorkflowConfigurationConstants, IWorkflowPreferenceConstants {
private ILaunchConfigurationGUIelement masterGUIelement;
@@ -55,13 +55,6 @@ public abstract class AbstractConfigurationPage implements IPropertyChangeListen
}
- public abstract void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration);
-
- public abstract void initializeFieldValuesFrom(ILaunchConfiguration configuration);
-
- public abstract void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration);
-
-
public AbstractConfigurationPage(ILaunchConfigurationGUIelement masterGUIelement) {
Assert.isNotNull(masterGUIelement);
this.masterGUIelement = masterGUIelement;
@@ -110,11 +103,12 @@ public abstract class AbstractConfigurationPage implements IPropertyChangeListen
}
+ @Override
public Composite getControl() {
return fControl;
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change as Model Analysis Profile changed
//
@@ -130,16 +124,11 @@ public abstract class AbstractConfigurationPage implements IPropertyChangeListen
}
}
- protected void handleConfigurationPropertyChange(PropertyChangeEvent event) {
- //!! Default
- }
-
-
public AbstractConfigurationPage[] getConfigurationPages() {
return masterGUIelement.getConfigurationPages();
}
-
+
// ======================================================================================
// Fields Validation
// ======================================================================================
@@ -163,7 +152,22 @@ public abstract class AbstractConfigurationPage implements IPropertyChangeListen
}
}
- public abstract FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig);
+ public abstract FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig);
+
+ public final FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ if( isValid(launchConfig) ) {
+ return areFieldsValidImpl(launchConfig);
+ }
+ else {
+ return new FieldValidationReturn(false,
+ "Field Editor or Trace TableViewer are invalid");
+ }
+ }
+
+ @Override
+ protected boolean isValidImpl(ILaunchConfiguration launchConfig) {
+ return true;
+ }
// ======================================================================================
@@ -182,6 +186,10 @@ public abstract class AbstractConfigurationPage implements IPropertyChangeListen
Composite parent, IWidgetToolkit widgetToolkit);
+ public void clearErrorMessage() {
+ masterGUIelement.clearErrorMessage();
+ }
+
public void propagateMessage(String message) {
masterGUIelement.setMessage(message);
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationProfile.java
index 75c53a3..802b464 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationProfile.java
@@ -50,11 +50,11 @@ public abstract class AbstractConfigurationProfile extends AbstractSectionPart
abstract protected void createContent(Composite parent, IWidgetToolkit widgetToolkit);
- protected void setWarningMessage(String warningMessage) {
+ public void setWarningMessage(String warningMessage) {
fConfigurationPage.propagateWarningMessage(warningMessage);
}
- protected void setErrorMessage(String errorMessage) {
+ public void setErrorMessage(String errorMessage) {
fConfigurationPage.propagateErrorMessage(errorMessage);
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationSection.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationSection.java
index 47877ec..e59a211 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationSection.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractConfigurationSection.java
@@ -16,6 +16,7 @@ package org.eclipse.efm.execution.configuration.common.ui.api;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.Section;
public abstract class AbstractConfigurationSection extends AbstractSectionPart
@@ -56,6 +57,19 @@ public abstract class AbstractConfigurationSection extends AbstractSectionPart
}
+ /**
+ * Programmatically changes expanded state.
+ *
+ * @param expanded
+ * the new expanded state
+ */
+ public void setExpanded(boolean expanded) {
+ final Composite section = getSection();
+ if( section instanceof ExpandableComposite ) {
+ ((ExpandableComposite) section).setExpanded(expanded);
+ }
+ }
+
/**
* Sets the label control's tool tip text to the argument
*/
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractSectionPart.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractSectionPart.java
index 0e65e86..4e86bf1 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractSectionPart.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/AbstractSectionPart.java
@@ -19,25 +19,28 @@ import java.util.List;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.efm.execution.configuration.common.ui.editors.FieldEditor;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Composite;
public abstract class AbstractSectionPart {
-
+
/**
* The field editors, or <code>null</code> if not created yet.
*/
private List<FieldEditor> fFields = null;
+ private List<TraceElementTableViewer> fTables = null;
+
private Composite fSection;
-
+
private Composite fSectionClient;
-
+
public AbstractSectionPart() {
this.fFields = null;
-
+
this.fSection = null;
this.fSectionClient = null;
}
@@ -47,27 +50,27 @@ public abstract class AbstractSectionPart {
public abstract String getSectionDescription();
-
+
// The Section part
public Composite getSection() {
return fSection;
}
-
+
public void setSection(Composite section) {
fSection = section;
}
-
-
+
+
// The Client of the Section
public Composite getSectionClient() {
return fSectionClient;
}
-
+
public void setSectionClient(Composite sectionClient) {
fSectionClient = sectionClient;
}
-
+
public Composite getControl() {
return fSection;
}
@@ -76,12 +79,12 @@ public abstract class AbstractSectionPart {
///////////////////////////////////////////////////////////////////////////
// Fields Editors API
///////////////////////////////////////////////////////////////////////////
-
+
/**
* Adds the given field editor to this page.
* @param editor the field editor
*/
- protected void addField(FieldEditor editor) {
+ protected void addFieldEditor(FieldEditor editor) {
if (fFields == null) {
fFields = new ArrayList<>();
}
@@ -92,8 +95,31 @@ public abstract class AbstractSectionPart {
return fFields;
}
-
-
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Fields Editors API
+ ///////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Adds the given field editor to this page.
+ * @param editor the field editor
+ */
+ protected void addTableViewer(TraceElementTableViewer tableViewer) {
+ if (fTables == null) {
+ fTables = new ArrayList<>();
+ }
+ fTables.add(tableViewer);
+ }
+
+ public List<TraceElementTableViewer> getTableViewers() {
+ return fTables;
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // ILaunchConfiguration API
+ ///////////////////////////////////////////////////////////////////////////
+
abstract protected void setDefaultsImpl(
ILaunchConfigurationWorkingCopy configuration);
@@ -104,11 +130,17 @@ public abstract class AbstractSectionPart {
fieldEditor.setDefaults(configuration);
}
}
-
+
+ if( fTables != null ) {
+ for (TraceElementTableViewer tableEditor : fTables) {
+ tableEditor.setDefaults(configuration);
+ }
+ }
+
setDefaultsImpl(configuration);
}
-
+
abstract protected void initializeFromImpl(ILaunchConfiguration configuration);
public final void initializeFrom(ILaunchConfiguration configuration) {
@@ -117,11 +149,17 @@ public abstract class AbstractSectionPart {
fieldEditor.initializeFrom(configuration);
}
}
-
+
+ if( fTables != null ) {
+ for (TraceElementTableViewer tableEditor : fTables) {
+ tableEditor.initializeFrom(configuration);
+ }
+ }
+
initializeFromImpl( configuration );
}
-
+
abstract protected void performApplyImpl(
ILaunchConfigurationWorkingCopy configuration);
@@ -132,7 +170,13 @@ public abstract class AbstractSectionPart {
fieldEditor.performApply(configuration);
}
}
-
+
+ if( fTables != null ) {
+ for (TraceElementTableViewer tableEditor : fTables) {
+ tableEditor.performApply(configuration);
+ }
+ }
+
performApplyImpl(configuration);
}
@@ -148,6 +192,14 @@ public abstract class AbstractSectionPart {
}
}
}
+
+ if( fTables != null ) {
+ for (TraceElementTableViewer tableEditor : fTables) {
+ if( ! tableEditor.isValid(launchConfig) ) {
+ return false;
+ }
+ }
+ }
return true;
}
return false;
@@ -158,7 +210,7 @@ public abstract class AbstractSectionPart {
// Property Change
//
public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
- //!! Default
+ //!! Default
}
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/ILaunchConfigurationGUIelement.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/ILaunchConfigurationGUIelement.java
index ff0db23..9ddc68f 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/ILaunchConfigurationGUIelement.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/ILaunchConfigurationGUIelement.java
@@ -11,6 +11,8 @@
package org.eclipse.efm.execution.configuration.common.ui.api;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
public interface ILaunchConfigurationGUIelement {
///////////////////////////////////////////////////////////////////////////
@@ -18,7 +20,7 @@ public interface ILaunchConfigurationGUIelement {
///////////////////////////////////////////////////////////////////////////
public IWidgetToolkit getWidgetToolkit();
-
+
public AbstractConfigurationPage[] getConfigurationPages();
@@ -32,8 +34,16 @@ public interface ILaunchConfigurationGUIelement {
public void setErrorMessage(String errormessage);
+ public void clearErrorMessage();
+
public void updateGUI();
public void scheduleUpdateJob();
+ ///////////////////////////////////////////////////////////////////////////
+ // Property Change
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event);
+
+
+
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/IWidgetToolkit.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/IWidgetToolkit.java
index d21bfb1..efbbe85 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/IWidgetToolkit.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/api/IWidgetToolkit.java
@@ -14,13 +14,16 @@
package org.eclipse.efm.execution.configuration.common.ui.api;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.custom.ViewForm;
import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -43,8 +46,8 @@ public interface IWidgetToolkit {
* @param visible visible the new visibility state
*/
abstract public void setVisibleAndEnabled(Composite aComposite, boolean visible);
-
- public default void propagateVisibility(Composite aComposite, boolean visible) {
+
+ public default void propagateVisibility(Composite aComposite, boolean visible) {
aComposite.setVisible(visible);
Object gd = aComposite.getLayoutData();
@@ -56,7 +59,7 @@ public interface IWidgetToolkit {
//
}
}
-
+
/**
* Creates a section as a part of the form.
@@ -201,6 +204,33 @@ public interface IWidgetToolkit {
return composite;
}
+ /**
+ * Creates a Composite widget
+ * @param parent the parent composite to add this composite to
+ * @param style the style for the composite
+ * @param font the font to set on the control
+ * @param columns the number of columns within the composite
+ * @param hspan the horizontal span the composite should take up on the parent
+ * @param fill the style for how this composite should fill into its parent
+ * @param marginwidth the width of the margin to place on the sides of the composite (default is 5, specified by GridLayout)
+ * @param marginheight the height of the margin to place o the top and bottom of the composite
+ * @return the new composite
+ */
+ public default Composite createComposite(Composite parent, int style, Font font,
+ int columns, int hspan, int fill, int marginwidth, int marginheight)
+ {
+ Composite composite = newComposite(parent, style);
+ GridLayout layout = new GridLayout(columns, false);
+ layout.marginWidth = marginwidth;
+ layout.marginHeight = marginheight;
+ composite.setLayout(layout);
+ composite.setFont(font);
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ composite.setLayoutData(gd);
+ return composite;
+ }
+
/**
* Creates a ScrolledComposite
@@ -229,6 +259,20 @@ public interface IWidgetToolkit {
}
+ /**
+ * Creates a ViewForm Composite
+ * @param parent the parent to add the composite to
+ * @return a new ScrolledComposite with a style
+ */
+ public default ViewForm createViewForm(Composite parent, int style) {
+ ViewForm viewForm = new ViewForm(parent, SWT.FLAT | SWT.BORDER);
+
+ viewForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ return viewForm;
+ }
+
+
/**
* Creates a group that uses the parent's style
@@ -261,7 +305,7 @@ public interface IWidgetToolkit {
Composite parent, String text, int columns, int hspan, int fill) {
Group group = newGroup(parent, parent.getStyle());
group.setLayout(new GridLayout(columns, false));
-
+
if( text != null ) {
group.setText(text);
}
@@ -332,11 +376,18 @@ public interface IWidgetToolkit {
* label and/or image.
* @param parent parent control
* @param text button label or <code>null</code>
+ * @param image image of <code>null</code>
* @return a new push button
*/
- public default Button createPushButton(Composite parent, String text) {
- Button button = newButton(parent, text, SWT.PUSH);
+ public default Button createPushButton(Composite parent, String text, Image image) {
+ Button button = new Button(parent, SWT.PUSH);
button.setFont(parent.getFont());
+ if (image != null) {
+ button.setImage(image);
+ }
+ if (text != null) {
+ button.setText(text);
+ }
GridData gd = new GridData();
button.setLayoutData(gd);
setButtonDimensionHint(button);
@@ -375,6 +426,21 @@ public interface IWidgetToolkit {
return combo;
}
+
+ public default Combo createLabelledCombo(
+ Composite parentComposite, String labeltext, int colnum) {
+ Composite composite = createComposite(
+ parentComposite, 2, 1, GridData.FILL_HORIZONTAL);
+
+ Label lbl = createLabel(composite, labeltext, 1);
+ lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+
+ Combo combo = newCombo(composite, SWT.READ_ONLY);
+ combo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ return combo;
+ }
+
/**
* Creates a new label widget
* @param parent the parent composite to add this label widget to
@@ -405,7 +471,7 @@ public interface IWidgetToolkit {
public default Label createLabel(Composite parent, String text, int hspan) {
Label label = newLabel(parent, text);
label.setFont(parent.getFont());
-
+
if( text != null ) {
label.setText(text);
}
@@ -432,16 +498,30 @@ public interface IWidgetToolkit {
* @param parent the parent composite to add this text widget to
* @param style the style bits for the text widget
* @param hspan the horizontal span to take up on the parent composite
+ * @param fill the fill style of the composite {@link GridData}
+ * @return the new text widget
+ */
+ public default Text createText(
+ Composite parent, int style, int hspan, int fill) {
+ Text t = newText(parent, null, style);
+
+ t.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ t.setLayoutData(gd);
+ return t;
+ }
+
+ /**
+ * Creates a new text widget
+ * @param parent the parent composite to add this text widget to
+ * @param style the style bits for the text widget
+ * @param hspan the horizontal span to take up on the parent composite
* @return the new text widget
* @since 3.3
*/
public default Text createText(Composite parent, int style, int hspan) {
- Text text = newText(parent, null, style);
- text.setFont(parent.getFont());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- text.setLayoutData(gd);
- return text;
+ return createText(parent, style, hspan, GridData.FILL_HORIZONTAL);
}
@@ -452,13 +532,20 @@ public interface IWidgetToolkit {
* @return the new text widget
*/
public default Text createSingleText(Composite parent, int hspan) {
- Text t = newText(parent, null, SWT.SINGLE | SWT.BORDER);
+ return createText(parent,
+ SWT.SINGLE | SWT.BORDER, hspan, GridData.FILL_HORIZONTAL);
+ }
- t.setFont(parent.getFont());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- t.setLayoutData(gd);
- return t;
+ /**
+ * fillToolBar
+ * @param manager
+ * @param acts
+ */
+ public default void fillToolBar(IToolBarManager manager, Action[] acts) {
+ for(Action action: acts) {
+ manager.add(action);
+ }
}
+
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/FieldEditor.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/FieldEditor.java
index aa4ebfe..9beb17e 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/FieldEditor.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/FieldEditor.java
@@ -142,7 +142,7 @@ public abstract class FieldEditor {
*/
protected void clearErrorMessage() {
if (fConfigurationPage != null) {
- fConfigurationPage.propagateErrorMessage(null);
+ fConfigurationPage.clearErrorMessage();
}
}
@@ -421,7 +421,7 @@ public abstract class FieldEditor {
Assert.isNotNull(labelText);
this.labelText = labelText;
-
+
// @NOT SYSTEMATIC, used with parsimony
// setPropertyChangeListener( configurationPage );
}
@@ -630,7 +630,7 @@ public abstract class FieldEditor {
public final void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
setDefaultsImpl(configuration);
-
+
refreshValidState();
}
@@ -638,7 +638,7 @@ public abstract class FieldEditor {
public final void initializeFrom(ILaunchConfiguration configuration) {
initializeFromImpl(configuration);
-
+
refreshValidState();
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementNatureEditingSupport.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementNatureEditingSupport.java
new file mode 100644
index 0000000..7caac9b
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementNatureEditingSupport.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.efm.execution.configuration.common.ui.editors.table;
+
+import java.util.ArrayList;
+
+import org.eclipse.efm.execution.core.workflow.common.TraceElement;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.TableItem;
+
+public class TraceElementNatureEditingSupport extends EditingSupport {
+
+ private final TraceElementTableViewer fTraceElementTableViewer;
+
+ private final TableViewer fTableViewer;
+
+ private final TraceElementTableConfigProvider fTableConfig;
+
+ private final boolean isUniqueNatureSet;
+
+ private final ComboBoxCellEditor fCellEditor;
+
+ private ArrayList<TraceElementKind> fUsedTraceNatures;
+ private ArrayList<TraceElementKind> fUnusedTraceNatures;
+
+ private TraceElementKind[] fValidTraceNatures;
+ private String[] fValidNatures;
+
+
+ public TraceElementNatureEditingSupport(TraceElementTableViewer traceElementTableViewer) {
+ super(traceElementTableViewer.getTableViewer());
+
+ this.fTraceElementTableViewer = traceElementTableViewer;
+
+ this.fTableViewer = traceElementTableViewer.getTableViewer();
+
+ this.fTableConfig = fTraceElementTableViewer.getTableConfig();
+
+ isUniqueNatureSet = this.fTableConfig.UNIQUE_NATUTRE_SET;
+
+ fValidTraceNatures = fTableConfig.VALID_TRACE_NATURES;
+ fValidNatures = fTableConfig.VALID_NATURES;
+
+ this.fCellEditor = new ComboBoxCellEditor(
+ fTableViewer.getTable(), fValidNatures, SWT.READ_ONLY);
+
+ fUsedTraceNatures = new ArrayList<TraceElementKind>();
+ fUnusedTraceNatures = new ArrayList<TraceElementKind>();
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ TraceElement traceElement = (TraceElement) element;
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ return null;
+ default:
+ if( isUniqueNatureSet ) {
+ updateValidNatures();
+ fCellEditor.setItems( fValidNatures );
+ }
+
+ return fCellEditor;
+ }
+ }
+
+
+ private void updateValidNatures() {
+ fUsedTraceNatures.clear();
+ for( TableItem tableItem : fTableViewer.getTable().getItems() ) {
+ if( tableItem.getData() instanceof TraceElement ) {
+ fUsedTraceNatures.add(
+ ((TraceElement) tableItem.getData()).getNature());
+ }
+ }
+
+ fUnusedTraceNatures.clear();
+
+ for (int offset = 0; offset < fTableConfig.VALID_NATURES.length; offset++) {
+ fUnusedTraceNatures.add( fTableConfig.VALID_TRACE_NATURES[offset] );
+ }
+
+ fUnusedTraceNatures.removeAll( fUsedTraceNatures );
+
+ fValidTraceNatures = new TraceElementKind[ fUnusedTraceNatures.size() ];
+ fValidNatures = new String[ fUnusedTraceNatures.size() ];
+
+ for( int offset = (fValidNatures.length - 1) ; offset >= 0 ; --offset) {
+ fValidTraceNatures[offset] = fUnusedTraceNatures.get( offset );
+ fValidNatures[offset] = fValidTraceNatures[offset].getLiteral();
+ }
+ }
+
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ TraceElementKind nature = ((TraceElement) element).getNature();
+
+ for (int offset = 0; offset < fValidNatures.length; offset++) {
+ if( fValidNatures[offset].equals(nature) ) {
+ return offset;
+ }
+ }
+
+ return 0;
+ }
+
+ @Override
+ protected void setValue(Object element, Object userInputValue) {
+ int offset = (Integer) userInputValue;
+ if( (offset < 0) || (offset >= fValidNatures.length) ) {
+ offset = 0;
+ }
+
+ TraceElement traceElement = (TraceElement) element;
+
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ break;
+ case UNDEFINED:
+ traceElement.setValue(
+ fValidNatures[ offset ] + "_new" );
+
+ fTraceElementTableViewer.addNewElementItemForDoubleClick();
+
+ //!NO BREAK!
+ default:
+ traceElement.setNature( fValidTraceNatures[ offset ] );
+ break;
+ }
+
+ fTableViewer.update(element, null);
+ }
+
+}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementSelectionEditingSupport.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementSelectionEditingSupport.java
new file mode 100644
index 0000000..4424379
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementSelectionEditingSupport.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.efm.execution.configuration.common.ui.editors.table;
+
+import org.eclipse.efm.execution.core.workflow.common.TraceElement;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.CheckboxCellEditor;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+
+public class TraceElementSelectionEditingSupport extends EditingSupport {
+
+ private final TraceElementTableViewer fTraceElementTableViewer;
+
+ private final TableViewer fTableViewer;
+
+ private final CellEditor fCellEditor;
+
+ public TraceElementSelectionEditingSupport(TraceElementTableViewer traceElementTableViewer) {
+ super(traceElementTableViewer.getTableViewer());
+
+ this.fTraceElementTableViewer = traceElementTableViewer;
+
+ this.fTableViewer = traceElementTableViewer.getTableViewer();
+
+ this.fCellEditor = new CheckboxCellEditor(
+ fTableViewer.getTable(), SWT.CHECK | SWT.READ_ONLY);
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ TraceElement traceElement = (TraceElement) element;
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ return null;
+ default:
+ return fCellEditor;
+ }
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ return ((TraceElement) element).isSelected();
+ }
+
+ @Override
+ protected void setValue(Object element, Object userInputValue) {
+ TraceElement traceElement = (TraceElement) element;
+
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ break;
+ case UNDEFINED:
+ traceElement.setNature(
+ fTraceElementTableViewer.getTableConfig().DEFAULT_TRACE_NATURE );
+ traceElement.setValue(
+ fTraceElementTableViewer.getTableConfig().DEFAULT_TRACE_NATURE.getLiteral()
+ + "_new" );
+
+ fTraceElementTableViewer.addNewElementItemForDoubleClick();
+ break;
+ default:
+ traceElement.setSelected((Boolean) userInputValue);
+ break;
+ }
+
+ fTableViewer.update(element, null);
+ }
+
+}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableConfigProvider.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableConfigProvider.java
new file mode 100644
index 0000000..8864cd8
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableConfigProvider.java
@@ -0,0 +1,321 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.efm.execution.configuration.common.ui.editors.table;
+
+import java.util.List;
+
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+
+public class TraceElementTableConfigProvider {
+
+ public final String STORE_KEY;
+
+ public final List<String> DEFAULT_ATTRIBUTE_VALUE;
+
+ public final String TITLE;
+
+ public final String TOOLTIP_TEXT;
+
+ public final boolean CHECKED_BOX_FOR_COLUMN_ZERO;
+
+ public final String SELECTION_TITLE = " ";
+
+ public final boolean UNIQUE_NATUTRE_SET;
+ public final String NATURE_TITLE;
+ public final String VALUE_TITLE;
+
+ public final int SELECTION_WIDTH = 20;
+ public final int NATURE_WIDTH;
+ public final int VALUE_WIDTH;
+
+ public final TraceElementKind[] VALID_TRACE_NATURES;
+
+ public final TraceElementKind DEFAULT_TRACE_NATURE;
+
+ public final String[] VALID_NATURES;
+
+ public TraceElementTableConfigProvider(
+ String storeKey, List<String> defaultAttributeValue,
+ String title, String toolTipText, boolean checkedBoxForColumnZero,
+ boolean isNatureUniqueSet, String natureTitle, int natureWidth,
+ String valueTitle, int valueWidth, TraceElementKind[] validTraces,
+ TraceElementKind deafaultTrace) {
+
+ STORE_KEY = storeKey;
+ DEFAULT_ATTRIBUTE_VALUE = defaultAttributeValue;
+
+ TITLE = title;
+
+ TOOLTIP_TEXT = toolTipText;
+
+ CHECKED_BOX_FOR_COLUMN_ZERO = checkedBoxForColumnZero;
+
+ UNIQUE_NATUTRE_SET = isNatureUniqueSet;
+ NATURE_TITLE = natureTitle;
+ VALUE_TITLE = valueTitle;
+
+ NATURE_WIDTH = natureWidth;
+ VALUE_WIDTH = valueWidth;
+
+ VALID_TRACE_NATURES = validTraces;
+
+ VALID_NATURES = new String[ validTraces.length ];
+ for (int offset = 0; offset < validTraces.length; offset++) {
+ VALID_NATURES[offset] = validTraces[offset].getLiteral();
+ }
+
+ DEFAULT_TRACE_NATURE = deafaultTrace;
+ }
+
+ public TraceElementTableConfigProvider(String storeKey,
+ List<String> defaultAttributeValue, String title, String toolTipText,
+ boolean checkedBoxForColumnZero, String natureTitle, int natureWidth,
+ String valueTitle, int valueWidth, TraceElementKind[] validTraces,
+ TraceElementKind deafaultTrace)
+ {
+ this(storeKey, defaultAttributeValue, title, toolTipText,
+ checkedBoxForColumnZero, false, natureTitle, natureWidth,
+ valueTitle, valueWidth, validTraces, TraceElementKind.TRANSITION);
+ }
+
+
+ public TraceElementTableConfigProvider(String storeKey,
+ List<String> defaultAttributeValue, String title, String toolTipText,
+ boolean checkedBoxForColumnZero, String natureTitle, int natureWidth,
+ String valueTitle, int valueWidth, TraceElementKind[] validTraces)
+ {
+ this(storeKey, defaultAttributeValue, title, toolTipText,
+ checkedBoxForColumnZero, false, natureTitle, natureWidth,
+ valueTitle, valueWidth, validTraces, TraceElementKind.TRANSITION);
+ }
+
+
+ public static final TraceElementKind[] TRANSITION_TRACE_ELEMENT =
+ new TraceElementKind[] {
+ TraceElementKind.TRANSITION
+ };
+
+
+ public static final TraceElementKind[] BEHAVIOR_SELECTION_TRACE_ELEMENT =
+ new TraceElementKind[] {
+ TraceElementKind.TRANSITION,
+
+ TraceElementKind.INPUT,
+ TraceElementKind.OUTPUT,
+
+ TraceElementKind.MACHINE,
+ TraceElementKind.STATE,
+ TraceElementKind.STATEMACHINE,
+
+// TraceElementKind.ASSIGN,
+//
+//! TraceElementKind.DELTA,
+//! TraceElementKind.TIME,
+//
+//! TraceElementKind.VARIABLE,
+ TraceElementKind.NEWFRESH,
+
+ TraceElementKind.COM,
+ TraceElementKind.INOUT,
+
+ TraceElementKind.INPUT_ENV,
+ TraceElementKind.OUTPUT_ENV,
+ TraceElementKind.INPUT_RDV,
+ TraceElementKind.OUTPUT_RDV,
+// TraceElementKind.INPUT_BUFFER,
+// TraceElementKind.OUTPUT_BUFFER,
+// TraceElementKind.INPUT_VAR,
+// TraceElementKind.OUTPUT_VAR,
+
+// TraceElementKind.PORT,
+// TraceElementKind.SIGNAL,
+// TraceElementKind.MESSAGE,
+// TraceElementKind.CHANNEL,
+// TraceElementKind.BUFFER,
+//
+//! TraceElementKind.RUNNABLE,
+// TraceElementKind.ROUTINE,
+// TraceElementKind.SYSTEM,
+//
+//! TraceElementKind.CONDITION,
+//! TraceElementKind.DECISION,
+//! TraceElementKind.FORMULA,
+//
+// TraceElementKind.PATH_CONDITION,
+// TraceElementKind.PATH_CONDITION_LEAF,
+//
+// TraceElementKind.PATH_TIMED_CONDITION,
+// TraceElementKind.PATH_TIMED_CONDITION_LEAF,
+//
+// TraceElementKind.NODE_CONDITION,
+// TraceElementKind.NODE_TIMED_CONDITION,
+// TraceElementKind.NODE_TIMED_CONDITION_LEAF,
+//
+// TraceElementKind.LIFELINE,
+//
+// TraceElementKind.NODE_DATA,
+// TraceElementKind.NODE_INFO,
+//! TraceElementKind.NODE_TRACE_RUN,
+// TraceElementKind.NODE_TRACE_IO,
+ };
+
+
+ public static final TraceElementKind[] GRAPHVIZ_TRACE_ELEMENT =
+ new TraceElementKind[] {
+ TraceElementKind.TRANSITION,
+
+ TraceElementKind.INPUT,
+ TraceElementKind.OUTPUT,
+
+ TraceElementKind.MACHINE,
+ TraceElementKind.STATE,
+ TraceElementKind.STATEMACHINE,
+
+ TraceElementKind.ASSIGN,
+
+ TraceElementKind.DELTA,
+ TraceElementKind.TIME,
+
+ TraceElementKind.VARIABLE,
+ TraceElementKind.NEWFRESH,
+
+ TraceElementKind.COM,
+ TraceElementKind.INOUT,
+
+ TraceElementKind.INPUT_ENV,
+ TraceElementKind.OUTPUT_ENV,
+ TraceElementKind.INPUT_RDV,
+ TraceElementKind.OUTPUT_RDV,
+// TraceElementKind.INPUT_BUFFER,
+// TraceElementKind.OUTPUT_BUFFER,
+// TraceElementKind.INPUT_VAR,
+// TraceElementKind.OUTPUT_VAR,
+
+// TraceElementKind.PORT,
+// TraceElementKind.SIGNAL,
+// TraceElementKind.MESSAGE,
+// TraceElementKind.CHANNEL,
+ TraceElementKind.BUFFER,
+//
+//! TraceElementKind.RUNNABLE,
+ TraceElementKind.ROUTINE,
+// TraceElementKind.SYSTEM,
+
+ TraceElementKind.CONDITION,
+ TraceElementKind.DECISION,
+ TraceElementKind.FORMULA,
+
+ TraceElementKind.PATH_CONDITION,
+ TraceElementKind.PATH_CONDITION_LEAF,
+
+ TraceElementKind.PATH_TIMED_CONDITION,
+ TraceElementKind.PATH_TIMED_CONDITION_LEAF,
+
+ TraceElementKind.NODE_CONDITION,
+ TraceElementKind.NODE_TIMED_CONDITION,
+ TraceElementKind.NODE_TIMED_CONDITION_LEAF,
+
+// TraceElementKind.LIFELINE,
+
+// TraceElementKind.NODE_DATA,
+//! TraceElementKind.NODE_INFO,
+// TraceElementKind.NODE_TRACE_RUN,
+// TraceElementKind.NODE_TRACE_IO,
+
+ TraceElementKind.STEP_HEADER,
+ TraceElementKind.STEP_BEGIN,
+ TraceElementKind.STEP_END
+ };
+
+
+ public static final TraceElementKind[] FORMAT_ELEMENT =
+ new TraceElementKind[] {
+// TraceElementKind.UNDEFINED,
+ TraceElementKind.CONDITION,
+ TraceElementKind.DECISION,
+ TraceElementKind.FORMULA,
+ TraceElementKind.PATH_CONDITION,
+ TraceElementKind.PATH_CONDITION_LEAF,
+ TraceElementKind.PATH_TIMED_CONDITION,
+ TraceElementKind.PATH_TIMED_CONDITION_LEAF,
+ TraceElementKind.NODE_CONDITION,
+ TraceElementKind.NODE_CONDITION_LEAF,
+ TraceElementKind.NODE_TIMED_CONDITION,
+ TraceElementKind.NODE_TIMED_CONDITION_LEAF,
+ TraceElementKind.ASSIGN,
+ TraceElementKind.DELTA,
+ TraceElementKind.TIME,
+ TraceElementKind.VARIABLE,
+ TraceElementKind.NEWFRESH,
+ TraceElementKind.COM,
+ TraceElementKind.INOUT,
+ TraceElementKind.INPUT,
+ TraceElementKind.OUTPUT,
+ TraceElementKind.INPUT_ENV,
+ TraceElementKind.OUTPUT_ENV,
+ TraceElementKind.INPUT_RDV,
+ TraceElementKind.OUTPUT_RDV,
+ TraceElementKind.INPUT_BUFFER,
+ TraceElementKind.OUTPUT_BUFFER,
+ TraceElementKind.INPUT_VAR,
+ TraceElementKind.OUTPUT_VAR,
+ TraceElementKind.PORT,
+ TraceElementKind.SIGNAL,
+ TraceElementKind.MESSAGE,
+ TraceElementKind.CHANNEL,
+ TraceElementKind.BUFFER,
+ TraceElementKind.RUNNABLE,
+ TraceElementKind.ROUTINE,
+ TraceElementKind.TRANSITION,
+ TraceElementKind.MACHINE,
+ TraceElementKind.STATE,
+ TraceElementKind.STATEMACHINE,
+ TraceElementKind.SYSTEM,
+ TraceElementKind.FILE_HEADER,
+ TraceElementKind.FILE_BEGIN,
+ TraceElementKind.FILE_END,
+ TraceElementKind.TESTCASE_HEADER,
+ TraceElementKind.TESTCASE_BEGIN,
+ TraceElementKind.TESTCASE_END,
+ TraceElementKind.INIT_HEADER,
+ TraceElementKind.INIT_BEGIN,
+ TraceElementKind.INIT_END,
+ TraceElementKind.STEP_HEADER,
+ TraceElementKind.STEP_BEGIN,
+ TraceElementKind.STEP_END,
+ TraceElementKind.COMMENT,
+ TraceElementKind.SEPARATOR,
+ TraceElementKind.NEWLINE,
+ TraceElementKind.NEXT,
+ TraceElementKind.LIFELINE,
+ TraceElementKind.LIFELINE_HEADER,
+ TraceElementKind.LIFELINE_BEGIN,
+ TraceElementKind.LIFELINE_END,
+ TraceElementKind.LIFELINE_ID,
+ TraceElementKind.LIFELINE_STATE,
+// TraceElementKind.RAW_ATTRIBUTE,
+ TraceElementKind.NODE_HEADER,
+ TraceElementKind.NODE_DATA,
+ TraceElementKind.NODE_INFO,
+ TraceElementKind.NODE_TRACE_RUN,
+ TraceElementKind.NODE_TRACE_IO,
+ TraceElementKind.VALUE_PARAMETER_BEGIN,
+ TraceElementKind.VALUE_PARAMETER_SEPARATOR,
+ TraceElementKind.VALUE_PARAMETER_END,
+ TraceElementKind.VALUE_ARRAY_BEGIN,
+ TraceElementKind.VALUE_ARRAY_SEPARATOR,
+ TraceElementKind.VALUE_ARRAY_END,
+ TraceElementKind.VALUE_STRUCT_BEGIN,
+ TraceElementKind.VALUE_STRUCT_SEPARATOR,
+ TraceElementKind.VALUE_STRUCT_END
+ };
+
+}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableViewer.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableViewer.java
new file mode 100644
index 0000000..d08f365
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementTableViewer.java
@@ -0,0 +1,941 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.efm.execution.configuration.common.ui.editors.table;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Predicate;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationProfile;
+import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
+import org.eclipse.efm.execution.core.workflow.common.TraceElement;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementCustomImpl;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
+import org.eclipse.efm.ui.utils.ImageResources;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.ToolBar;
+
+public class TraceElementTableViewer {
+
+ final private Image IMG_CHECKED =
+ ImageResources.getImage(ImageResources.IMAGE__CHECKED_ICON);
+
+ final private Image IMG_UNCHECKED =
+ ImageResources.getImage(ImageResources.IMAGE__UNCHECKED_ICON);
+
+ final private Image IMG_ADD =
+ ImageResources.getImage(ImageResources.IMAGE__ADD_ELCL16_ICON);
+
+// final private Image IMG_INFO =
+// ImageResources.getImage(ImageResources.IMAGE__INFO_ELCL16_ICON);
+
+ final private Image IMG_QUICKASSIST =
+ ImageResources.getImage(ImageResources.IMAGE__QUICKASSIST_ELCL16_ICON);
+
+ private Composite fTableComposite;
+
+ private TableViewer fTableViewer;
+
+ private final TraceElementTableConfigProvider fTableConfig;
+
+ private int SELECTION_COLUMN_INDEX;
+ private int NATURE_COLUMN_INDEX;
+ private int VALUE_COLUMN_INDEX;
+
+// TableColumnLayout fTableColumnLayout;
+
+ protected Action fAddAction;
+ protected Action fCopyAction;
+ protected Action fEditAction;
+ protected Action fRemoveAction;
+ protected Action fClearAction;
+ protected Action fMovedDownAction;
+ protected Action fMovedUpAction;
+
+
+ protected final AbstractConfigurationProfile fConfigurationProfile;
+
+
+ public TraceElementTableViewer(AbstractConfigurationProfile configurationProfile,
+ Composite parent, int hspan, IWidgetToolkit widgetToolkit,
+ final TraceElementTableConfigProvider tableConfig) {
+
+ this.fConfigurationProfile = configurationProfile;
+
+ this.fTableConfig = tableConfig;
+
+ createControl(parent, hspan, widgetToolkit);
+ }
+
+ public Composite getControl() {
+ return fTableComposite;
+ }
+
+ public TableViewer getTableViewer() {
+ return fTableViewer;
+ }
+
+ public TraceElementTableConfigProvider getTableConfig() {
+ return fTableConfig;
+ }
+
+ public void setInput(TraceElement[] traceElements)
+ {
+ fTableViewer.setInput(traceElements);
+
+ addNewElementItemForDoubleClick();
+ }
+
+ public void setFocus() {
+ fTableViewer.getControl().setFocus();
+ }
+
+
+ public void removeAll() {
+ fTableViewer.getTable().removeAll();
+ }
+
+
+
+ public List<TraceElement> getTraceElements() {
+ ArrayList<TraceElement> traceElements = new ArrayList<TraceElement>();
+
+ for( TableItem tableItem : fTableViewer.getTable().getItems() ) {
+ if( tableItem.getData() instanceof TraceElement ) {
+ final TraceElement traceElement = (TraceElement) tableItem.getData();
+ if( traceElement.getNature() != TraceElementKind.UNDEFINED ) {
+ traceElements.add(traceElement);
+ }
+ }
+ }
+
+ return traceElements;
+ }
+
+ /**
+ * Create the TableViewer Control
+ * @param parent
+ * @param widgetToolkit
+ */
+ protected void createControl(
+ Composite parent, int hspan, IWidgetToolkit widgetToolkit) {
+ Font font = parent.getFont();
+
+ // Create table composite
+ fTableComposite = widgetToolkit.createComposite(
+ parent, font, 1, hspan, GridData.FILL_BOTH, 0, 0);
+
+ ViewForm viewForm = widgetToolkit.createViewForm(
+ fTableComposite, SWT.FLAT | SWT.BORDER);
+
+ viewForm.setToolTipText( fTableConfig.TOOLTIP_TEXT );
+
+ Composite labelContainer = widgetToolkit.createComposite(
+ viewForm, font, 1, 1, GridData.FILL_BOTH, 5, 5);
+ widgetToolkit.createLabel(labelContainer, fTableConfig.TITLE, 1);
+ viewForm.setTopLeft(labelContainer);
+
+ ToolBarManager toolBarManager= new ToolBarManager(SWT.FLAT);
+ ToolBar toolBar = toolBarManager.createControl(viewForm);
+ toolBar.setBackground(parent.getBackground());
+ viewForm.setTopRight(toolBar);
+
+ createToolbarActions(toolBarManager);
+
+ Composite viewFormContents = widgetToolkit.createComposite(
+ viewForm, SWT.FLAT, font, 1, 1, GridData.FILL_BOTH, 5, 5);
+
+ createTableViewer(viewFormContents, widgetToolkit);
+
+ viewForm.setContent(viewFormContents);
+ }
+
+
+ /**
+ * Creates all of the actions for the toolbar
+ */
+ protected void createToolbarActions(ToolBarManager tmanager) {
+ tmanager.add(getAddAction());
+ tmanager.add(getCopyAction());
+ tmanager.add(getEditAction());
+ tmanager.add(new Separator());
+ tmanager.add(getRemoveAction());
+ tmanager.add(getClearAction());
+ tmanager.add(new Separator());
+ tmanager.add(getMovedUpAction());
+ tmanager.add(getMovedDownAction());
+ tmanager.update(true);
+ }
+
+
+ protected void createTableViewer(
+ Composite tableContainer, IWidgetToolkit widgetToolkit) {
+
+// fTableColumnLayout = new TableColumnLayout(true);
+// tableComposite.setLayout(fTableColumnLayout);
+
+ // Create table
+ fTableViewer = new TableViewer(tableContainer, SWT.BORDER |
+ SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
+
+//!! addMoveableRowSupport();
+
+ // create Columns
+ createColumns(tableContainer, tableContainer.getFont());
+
+ final Table table = fTableViewer.getTable();
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ int desiredHeight = table.getItemHeight() * 5 + table.getHeaderHeight();
+// if (tableContainer.getLayout() == null) { // <---
+ table.setSize(200,desiredHeight);
+// } else {
+// table.setLayoutData(new GridData(200, desiredHeight)); // assumes GridLayout
+// }
+
+
+ // make the selection available to other views
+// getSite().setSelectionProvider(fTableViewer);
+ // set the sorter for the table
+
+ // define layout for the TableViewer
+ GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1);
+ fTableViewer.getControl().setLayoutData(gridData);
+
+ fTableViewer.getControl().setToolTipText(fTableConfig.TOOLTIP_TEXT);
+
+// // Set providers
+ fTableViewer.setContentProvider(new ArrayContentProvider());
+// fTableViewer.setLabelProvider(new TraceElementLabelProvider());
+
+// fTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+// @Override
+// public void doubleClick(DoubleClickEvent event) {
+// handleDoubleClickEvent(event);
+// }
+// });
+
+
+//!! // Double click for edit TraceElement value column
+// TableViewerFocusCellManager focusCellManager =
+// new TableViewerFocusCellManager(fTableViewer,
+// new FocusCellOwnerDrawHighlighter(fTableViewer));
+//
+// ColumnViewerEditorActivationStrategy activationSupport =
+// new ColumnViewerEditorActivationStrategy(fTableViewer) {
+// @Override
+// protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
+// final EventObject source = event.sourceEvent;
+// // Enable editor only with mouse double click for value column
+// if( event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION ) {
+// if( (source instanceof MouseEvent) && (((MouseEvent)source).button == 3) ) {
+// return false;
+// }
+//
+// return true;
+// }
+// else if( (source instanceof MouseEvent) && (((MouseEvent)source).button != 3)
+// && (! isSelectedColumn(source, VALUE_COLUMN_INDEX)) ) {
+// return true;
+// }
+// return false;
+// }
+// };
+//
+// TableViewerEditor.create(fTableViewer, focusCellManager, activationSupport,
+// ColumnViewerEditor.TABBING_HORIZONTAL |
+// ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
+// ColumnViewerEditor.TABBING_VERTICAL |
+// ColumnViewerEditor.KEYBOARD_ACTIVATION);
+ }
+
+
+// private boolean isSelectedColumn(EventObject event, int column) {
+// if( event instanceof MouseEvent ) {
+// final MouseEvent mouseEvent = (MouseEvent) event;
+// final Table table = fTableViewer.getTable();
+// final Point point = new Point(mouseEvent.x, mouseEvent.y);
+//
+// final TableItem item = table.getItem(point);
+// if( item == null ) {
+// return false;
+// }
+// for( int offset = 0; offset < table.getColumnCount(); ++offset ) {
+// final Rectangle rect = item.getBounds(offset);
+// if( rect.contains(point) ) {
+//// System.out.println("Item row " + table.indexOf(item) + " - colum " + offset);
+// return( column == offset );
+// }
+// }
+// }
+// return false;
+// }
+
+
+ // create the columns for the table
+ private void createColumns(final Composite tableComposite, Font font) {
+ SELECTION_COLUMN_INDEX = -1;
+ NATURE_COLUMN_INDEX = 0;
+ VALUE_COLUMN_INDEX = 1;
+
+ if( fTableConfig.CHECKED_BOX_FOR_COLUMN_ZERO ) {
+ SELECTION_COLUMN_INDEX = 0;
+ NATURE_COLUMN_INDEX = 1;
+ VALUE_COLUMN_INDEX = 2;
+
+ // column for the TraceElement Selection
+ TableViewerColumn viewerColumn = createTableViewerColumn(
+ fTableConfig.SELECTION_TITLE, fTableConfig.SELECTION_WIDTH,
+ false, SELECTION_COLUMN_INDEX);
+
+ viewerColumn.setEditingSupport(
+ new TraceElementSelectionEditingSupport(this));
+
+ viewerColumn.setLabelProvider( new ColumnLabelProvider() {
+ @Override
+ public String getText(Object element) {
+ return null;
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ TraceElement traceElement = (TraceElement) element;
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ return IMG_QUICKASSIST;
+ case UNDEFINED:
+ return IMG_ADD;
+
+ default:
+ if( traceElement.isSelected() ) {
+ return IMG_CHECKED;
+ }
+ else {
+ return IMG_UNCHECKED;
+ }
+ }
+ }
+ });
+ }
+
+
+ // first column is for the TraceElement Nature
+ TableViewerColumn viewerColumn =
+ createTableViewerColumn(fTableConfig.NATURE_TITLE,
+ fTableConfig.NATURE_WIDTH, true, NATURE_COLUMN_INDEX);
+
+ viewerColumn.setEditingSupport(
+ new TraceElementNatureEditingSupport(this));
+
+ viewerColumn.setLabelProvider( new ColumnLabelProvider() {
+ @Override
+ public String getText(Object element) {
+ TraceElement traceElement = (TraceElement) element;
+ switch( traceElement.getNature() ) {
+ case UNDEFINED:
+ return "Set nature to";
+
+ default:
+ return traceElement.getNature().getLiteral();
+ }
+ }
+ });
+
+
+ // second column is for the TraceElement Value
+ viewerColumn = createTableViewerColumn(fTableConfig.VALUE_TITLE,
+ fTableConfig.VALUE_WIDTH, true, VALUE_COLUMN_INDEX);
+
+ viewerColumn.setEditingSupport(new TraceElementValueEditingSupport(this));
+
+ viewerColumn.setLabelProvider(new StyledCellLabelProvider() {
+ @Override
+ public void update(ViewerCell cell) {
+ TraceElement traceElement = (TraceElement) (cell.getElement());
+ cell.setText(traceElement.getValue().toString());
+// StyleRange myStyledRange =
+// new StyleRange(16, 2, null,
+// Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
+// StyleRange[] range = { myStyledRange };
+// cell.setStyleRanges(range);
+ super.update(cell);
+ }
+ });
+
+// viewerColumn.setLabelProvider(new ColumnLabelProvider() {
+// @Override
+// public String getText(Object element) {
+// TraceElement traceElement = (TraceElement) element;
+// return traceElement.getValue().toString();
+// }
+// });
+
+
+ // third column is for the selection facilities
+// viewerColumn = createTableViewerColumn(" ", 20, true, columnOffset + 2);
+//
+// viewerColumn.setLabelProvider( new ColumnLabelProvider() {
+// @Override
+// public String getText(Object element) {
+// return null;
+// }
+// });
+ }
+
+
+ private TableViewerColumn createTableViewerColumn(
+ String title, int bound, boolean resizable, final int colNumber) {
+ final TableViewerColumn viewerColumn =
+ new TableViewerColumn(fTableViewer, SWT.NONE);
+
+ final TableColumn column = viewerColumn.getColumn();
+
+ column.setText(title);
+ column.setWidth(bound);
+
+// fTableColumnLayout.setColumnData(column, new ColumnWeightData(100, bound));
+
+ column.setWidth(bound);
+ column.setResizable(resizable);
+ column.setMoveable(false);
+ return viewerColumn;
+ }
+
+
+ public void addNewElementItemForDoubleClick() {
+ fTableViewer.add(new TraceElementCustomImpl(
+ TraceElementKind.UNDEFINED, "Add new element"));
+ }
+
+ private void addNewfreshElementItem(TraceElement newTraceElement) {
+ TraceElementKind nature = fTableConfig.DEFAULT_TRACE_NATURE;
+
+ TableItem[] tableItems = fTableViewer.getTable().getItems();
+ for( int index = tableItems.length - 1 ; index >= 0 ; --index ) {
+ final TraceElement traceElement =
+ (TraceElement) tableItems[index].getData();
+
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ case UNDEFINED:
+ break;
+
+ default:
+ nature = traceElement.getNature();
+ index = -1;
+ break;
+ }
+ }
+
+ newTraceElement.setNature(nature);
+ newTraceElement.setValue(nature.getLiteral() + "_new");
+
+ addNewElementItemForDoubleClick();
+
+ fTableViewer.update(newTraceElement, null);
+ }
+
+
+// private void handleDoubleClickEvent(DoubleClickEvent event) {
+// if( event.getSelection().isEmpty() ) {
+// addNewElementItemForDoubleClick();
+// }
+// else {
+// if( event.getSelection() instanceof IStructuredSelection ) {
+// Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
+// if( selection instanceof TraceElement ) {
+// TraceElement selTraceElement = (TraceElement) selection;
+// if( selTraceElement.getNature() == TraceElementKind.UNDEFINED ) {
+// addNewfreshElementItem(selTraceElement);
+// }
+// }
+// }
+//
+//// TableItem[] selection = fTableViewer.getTable().getSelection();
+//// for( TableItem item : selection ) {
+//// fTableViewer.add( item.getData() );
+////
+//// System.out.println("DoubleClick: " + item.getData());
+//// }
+// }
+// }
+
+// private void addMoveableRowSupport() {
+// Transfer[] transferTypes = new Transfer[] { LocalSelectionTransfer.getTransfer() };
+//
+// fTableViewer.addDragSupport(DND.DROP_MOVE | DND.DROP_COPY,
+// transferTypes , new DragSourceAdapter() {
+// @Override
+// public void dragSetData(DragSourceEvent event) {
+// // Get the selected items in the drag source
+// if(transferTypes[0].isSupportedType(event.dataType) ) {
+// TableItem[] selection = fTableViewer.getTable().getSelection();
+// for( TableItem item : selection ) {
+// System.out.println("drag: " + item.getData());
+//
+// event.data = item.getData();
+// }
+// }
+// }
+// });
+//
+// fTableViewer.addDropSupport(DND.DROP_MOVE | DND.DROP_COPY,
+// transferTypes , new ViewerDropAdapter(fTableViewer) {
+// @Override
+// public boolean validateDrop(Object target, int operation, TransferData transferType) {
+// return (target instanceof TraceElement);
+// }
+//
+// @Override
+// public void drop(DropTargetEvent event) {
+// int location = this.determineLocation(event);
+// TraceElement target = (TraceElement) determineTarget(event);
+// String translatedLocation = "";
+// switch (location){
+// case 1 :
+// translatedLocation = "Dropped before the target: ";
+// break;
+// case 2 :
+// translatedLocation = "Dropped after the target: ";
+// break;
+// case 3 :
+// translatedLocation = "Dropped on the target: ";
+// break;
+// case 4 :
+// translatedLocation = "Dropped into nothing: ";
+// break;
+// }
+// System.out.print(translatedLocation);
+// System.out.println("the drop was done on the element: " + target );
+// super.drop(event);
+// }
+//
+//
+// @Override
+// public boolean performDrop(Object data) {
+// TableItem[] selection = fTableViewer.getTable().getSelection();
+// for( TableItem item : selection ) {
+// fTableViewer.add( item.getData() );
+//
+// System.out.println("drop: " + item.getData());
+// }
+//
+// return false;
+// }
+// });
+//
+// }
+
+ /**
+ * Responds to a list event action in the TraceElement table
+ */
+ protected Action getAddAction() {
+ if( fAddAction == null ) {
+ fAddAction = new Action() {
+ @Override
+ public void run() {
+ handleAddAction();
+ }
+ };
+
+ fAddAction.setText("Add");
+ fAddAction.setToolTipText("Add new element");
+ fAddAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_ADD_ELCL16_ICON));
+ fAddAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_ADD_DLCL16_ICON));
+ }
+
+ return fAddAction;
+ }
+
+ protected void handleAddAction() {
+ int selectionIndex = fTableViewer.getTable().getSelectionIndex();
+
+ if( selectionIndex >= 0 ) {
+ TraceElement selTraceElement =
+ (TraceElement) fTableViewer.getTable().getItem(selectionIndex).getData();
+
+ if( selTraceElement.getNature() != TraceElementKind.UNDEFINED ) {
+ selTraceElement = null;
+ for( TableItem item : fTableViewer.getTable().getItems() ) {
+ if( ((TraceElement) item.getData()).getNature() == TraceElementKind.UNDEFINED ) {
+ selTraceElement = (TraceElement) item.getData();
+ }
+ }
+ }
+ if( selTraceElement != null ) {
+ addNewfreshElementItem(selTraceElement);
+ }
+ else {
+ fTableViewer.add(new TraceElementCustomImpl(
+ TraceElementKind.UNDEFINED, "Add new element"));
+ }
+ }
+ }
+
+
+ protected Action getCopyAction() {
+ if( fCopyAction == null ) {
+ fCopyAction = new Action() {
+ @Override
+ public void run() {
+ handleCopyAction();
+ }
+ };
+
+ fCopyAction.setText("Copy");
+ fCopyAction.setToolTipText("Copy selected elements");
+ fCopyAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__COPY_ELCL16_ICON));
+ fCopyAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__COPY_ELCL16_ICON));
+ }
+
+ return fCopyAction;
+ }
+
+
+ protected void handleCopyAction() {
+ int selectionIndex = fTableViewer.getTable().getSelectionIndex();
+// System.out.println( "Add:>selectionIndex: " + selectionIndex );
+
+ if( selectionIndex >= 0 ) {
+ TraceElement selTraceElement =
+ (TraceElement) fTableViewer.getTable().getItem(selectionIndex).getData();
+
+ if( selTraceElement.getNature() == TraceElementKind.UNDEFINED ) {
+ addNewfreshElementItem(selTraceElement);
+ }
+ else {
+ for( TableItem selection : fTableViewer.getTable().getSelection() ) {
+ selTraceElement = (TraceElement) selection.getData();
+
+ fTableViewer.insert(
+ new TraceElementCustomImpl(selTraceElement),
+ (selectionIndex + 1));
+ }
+
+ }
+ }
+ }
+
+
+ protected Action getEditAction() {
+ if( fEditAction == null ) {
+ fEditAction = new Action() {
+ @Override
+ public void run() {
+ handleEditAction();
+ }
+ };
+
+ fEditAction.setText("Edit");
+ fEditAction.setToolTipText("Edit new element");
+ fEditAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_EDIT_ELCL16_ICON));
+ fEditAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_EDIT_DLCL16_ICON));
+
+ fEditAction.setEnabled(true);
+ }
+
+ return fEditAction;
+ }
+
+ protected void handleEditAction() {
+ int selectionIndex = fTableViewer.getTable().getSelectionIndex();
+
+ if( selectionIndex >= 0 ) {
+ TraceElement selTraceElement =
+ (TraceElement) fTableViewer.getTable().getItem(selectionIndex).getData();
+
+ if( selTraceElement.getNature() != TraceElementKind.UNDEFINED ) {
+ fTableViewer.editElement(selTraceElement, VALUE_COLUMN_INDEX);
+ }
+ }
+ }
+
+
+ protected Action getRemoveAction() {
+ if( fRemoveAction == null ) {
+ fRemoveAction = new Action() {
+ @Override
+ public void run() {
+ handleRemoveAction();
+ }
+ };
+
+ fRemoveAction.setText("Remove");
+ fRemoveAction.setToolTipText("Remove selected elements");
+ fRemoveAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_DELETE_ELCL16_ICON));
+ fRemoveAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_DELETE_DLCL16_ICON));
+ }
+
+ return fRemoveAction;
+ }
+
+ protected void handleRemoveAction() {
+ int selectionIndex = fTableViewer.getTable().getSelectionIndex();
+
+ if( selectionIndex >= 0 ) {
+ for( TableItem selection : fTableViewer.getTable().getSelection() ) {
+ fTableViewer.remove( selection.getData() );
+ }
+ }
+ }
+
+ protected Action getClearAction() {
+ if( fClearAction == null ) {
+ fClearAction = new Action() {
+ @Override
+ public void run() {
+ handleClearAction();
+ }
+ };
+
+ fClearAction.setText("RemoveAll");
+ fClearAction.setToolTipText("Remove all elements");
+ fClearAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__DELETE_ELCL16_ICON));
+ fClearAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__DELETE_DLCL16_ICON));
+ }
+
+ return fClearAction;
+ }
+
+ protected void handleClearAction() {
+// for( TableItem item : fTableViewer.getTable().getItems() ) {
+// fTableViewer.remove( item.getData() );
+// }
+ fTableViewer.getTable().removeAll();
+ addNewElementItemForDoubleClick();
+ }
+
+
+ protected Action getMovedUpAction() {
+ if( fMovedUpAction == null ) {
+ fMovedUpAction = new Action() {
+ @Override
+ public void run() {
+ handleMovedUpAction();
+ }
+ };
+
+ fMovedUpAction.setText("MovedUp");
+ fMovedUpAction.setToolTipText("MovedUp selected element");
+ fMovedUpAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_MOVE_UP_ELCL16_ICON));
+ fMovedUpAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_MOVE_UP_DLCL16_ICON));
+ }
+
+ return fMovedUpAction;
+ }
+
+ protected void handleMovedUpAction() {
+ int selectionIndex = fTableViewer.getTable().getSelectionIndex();
+// System.out.println( "MovedUp:>selectionIndex: " + selectionIndex );
+
+ if( selectionIndex > 0 ) {
+ TraceElement selTraceElement =
+ (TraceElement) fTableViewer.getTable().getItem(selectionIndex).getData();
+
+ fTableViewer.remove(selTraceElement);
+ fTableViewer.insert(selTraceElement, (selectionIndex - 1));
+
+ fTableViewer.getTable().setSelection(selectionIndex - 1);
+ }
+ }
+
+
+ protected Action getMovedDownAction() {
+ if( fMovedDownAction == null ) {
+ fMovedDownAction = new Action() {
+ @Override
+ public void run() {
+ handleMovedDownAction();
+ }
+ };
+
+ fMovedDownAction.setText("MovedDown");
+ fMovedDownAction.setToolTipText("MovedDown selected element");
+ fMovedDownAction.setImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_MOVE_DOWN_ELCL16_ICON));
+ fMovedDownAction.setDisabledImageDescriptor(
+ ImageResources.getImageDescriptor(
+ ImageResources.IMAGE__LIST_MOVE_DOWN_DLCL16_ICON));
+ }
+
+ return fMovedDownAction;
+ }
+
+ protected void handleMovedDownAction() {
+ int selectionIndex = fTableViewer.getTable().getSelectionIndex();
+
+ if( selectionIndex >= 0 ) {
+ TraceElement selTraceElement =
+ (TraceElement) fTableViewer.getTable().getItem(selectionIndex).getData();
+
+ if( (selTraceElement.getNature() != TraceElementKind.UNDEFINED)
+ && (selectionIndex < (fTableViewer.getTable().getItemCount() - 2)) ) {
+
+ fTableViewer.remove(selTraceElement);
+ fTableViewer.insert(selTraceElement, (selectionIndex + 1));
+
+ fTableViewer.getTable().setSelection(selectionIndex + 1);
+ }
+ }
+ }
+
+
+ /**
+ * Diversity Field Editor Configuration API
+ * @param configuration
+ */
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(
+ fTableConfig.STORE_KEY, fTableConfig.DEFAULT_ATTRIBUTE_VALUE);
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ TraceSpecificationCustomImpl traceSpecification =
+ TraceSpecificationCustomImpl.create("trace",
+ configuration, fTableConfig.STORE_KEY,
+ fTableConfig.DEFAULT_ATTRIBUTE_VALUE,
+ TraceElementKind.UNDEFINED);
+
+ Predicate<TraceElement> tracePredicate =
+ te -> (te.getNature() == TraceElementKind.UNDEFINED);
+
+ traceSpecification.getElement().removeIf(tracePredicate);
+
+ TraceElement[] traceElements = new TraceElement[0];
+
+ traceElements = new TraceElement[ traceSpecification.getElement().size() ];
+
+ traceSpecification.getElement().toArray(traceElements);
+
+ setInput(traceElements);
+ }
+
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ final TraceSpecificationCustomImpl traceSpecification =
+ new TraceSpecificationCustomImpl( getTraceElements() );
+
+// System.out.println( fTableConfig.STORE_KEY );
+// System.out.println( fTableConfig.TITLE );
+// System.out.println( traceSpecification.toString() );
+// System.out.println();
+
+ configuration.setAttribute(
+ fTableConfig.STORE_KEY, traceSpecification.toSEW());
+
+ }
+
+ public boolean isValid(ILaunchConfiguration configuration) {
+ // Trace Sequence Validation
+// String[] tabString = new String[0];
+//// fBehaviorSpecificationStringField.getStringValue().split(";\n");
+//
+// String kind;
+// int pos;
+//
+// for(String eltString : tabString) {
+// eltString = eltString.trim();
+//
+// if( eltString.length() == 0 ) {
+// fConfigurationProfile.setErrorMessage("You must select at least one element");
+// return false;
+// }
+// else if( eltString.startsWith("//") ) {
+// //!! TIPS
+// }
+// else if( (pos = eltString.indexOf('=')) > 0 ) {
+// kind = eltString.substring(0, pos).trim();
+//// object = eltString.substring(pos+1).trim();
+//
+// if( kind.equals( "transition" ) ) {
+// // Check if the object is a transition and exists !
+// }
+// else if( kind.equals( "state" ) ) {
+// // Check if the object is a state and exists !
+// }
+//
+// else if( kind.equals( "input" ) ) {
+// // Check if the object is an input port/signal and exists !
+// }
+// else if( kind.equals( "output" ) ) {
+// // Check if the object is an output port/signal and exists !
+// }
+//
+// else if( kind.equals( "inout" ) ) {
+// // Check if the object is an inout port/signal and exists !
+// }
+// else if( kind.equals( "com" ) ) {
+// // Check if the object is a communicated port/signal and exists !
+// }
+//
+// else {
+// fConfigurationProfile.setErrorMessage(
+// "The element \"" + eltString + "\" is not a valid element");
+//
+// return false;
+// }
+// }
+// else {
+// fConfigurationProfile.setErrorMessage(
+// "The element \"" + eltString + "\" is not a valid element");
+// return false;
+// }
+// }
+
+ return true;
+ }
+
+}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementValueEditingSupport.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementValueEditingSupport.java
new file mode 100644
index 0000000..6e5e7ab
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/editors/table/TraceElementValueEditingSupport.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.efm.execution.configuration.common.ui.editors.table;
+
+import org.eclipse.efm.execution.core.workflow.common.TraceElement;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+
+public class TraceElementValueEditingSupport extends EditingSupport {
+
+ private final TraceElementTableViewer fTraceElementTableViewer;
+
+ private final TableViewer fTableViewer;
+
+ private final CellEditor fCellEditor;
+
+ public TraceElementValueEditingSupport(TraceElementTableViewer traceElementTableViewer) {
+ super(traceElementTableViewer.getTableViewer());
+
+ this.fTraceElementTableViewer = traceElementTableViewer;
+
+ this.fTableViewer = traceElementTableViewer.getTableViewer();
+
+ this.fCellEditor = new TextCellEditor(fTableViewer.getTable());
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ TraceElement traceElement = (TraceElement) element;
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ return null;
+ default:
+ return fCellEditor;
+ }
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ return ((TraceElement) element).getValue();
+ }
+
+ @Override
+ protected void setValue(Object element, Object userInputValue) {
+ TraceElement traceElement = (TraceElement) element;
+
+ switch( traceElement.getNature() ) {
+ case TIPS:
+ break;
+ case UNDEFINED:
+ traceElement.setNature(
+ fTraceElementTableViewer.getTableConfig().DEFAULT_TRACE_NATURE );
+
+ fTraceElementTableViewer.addNewElementItemForDoubleClick();
+
+ //!NO BREAK!
+ default:
+ final String newValue = String.valueOf(userInputValue);
+
+ if( (traceElement.getValue() != userInputValue)
+ && (! traceElement.getValue().equals(newValue)) )
+ {
+ traceElement.setValue(String.valueOf(userInputValue));
+
+ if( newValue.isEmpty() ) {
+ traceElement.setValue( traceElement.getNature().getLiteral() + "_new" );
+ }
+ fTableViewer.update(element, null);
+ }
+ break;
+ }
+ }
+
+}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/debug/DebugConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/debug/DebugConfigurationPage.java
index a5a590c..b329b44 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/debug/DebugConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/debug/DebugConfigurationPage.java
@@ -20,17 +20,21 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.ILaunchConfigurationGUIelement;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
-import org.eclipse.efm.execution.configuration.common.ui.editors.StringFieldEditor;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableConfigProvider;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
import org.eclipse.efm.execution.core.AbstractLaunchDelegate;
import org.eclipse.efm.execution.core.IWorkflowPreferenceConstants;
import org.eclipse.efm.execution.core.SymbexPreferenceUtil;
import org.eclipse.efm.execution.core.workflow.common.ConsoleVerbosityKind;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
@@ -46,61 +50,104 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
ConsoleVerbosityKind.MAXIMUM.getLiteral()
};
-// Arrays.stream(ConsoleVerbosityKind.values()).map(
-// ConsoleVerbosityKind::getLiteral).toArray(String[]::new);
+// Arrays.stream(ConsoleVerbosityKind.values()).map(
+// ConsoleVerbosityKind::getLiteral).toArray(String[]::new);
private Combo fConsoleLevelCombo = null;
private ConsoleVerbosityKind fConsoleLevel = ConsoleVerbosityKind.MINIMUM;
// First Symbex Workflow Page
private BooleanFieldEditor fFirstParsedModelTextualEnabledBooleanField;
-// private StringFieldEditor fFirstparsedModelTextualFileNameStringField;
-
private BooleanFieldEditor fFirstParsedModelGraphizEnabledBooleanField;
-// private StringFieldEditor fFirstParsedModelGraphizFileNameStringField;
-
private BooleanFieldEditor fFirstCompiledModelTextualEnabledBooleanField;
-// private StringFieldEditor fFirstCompiledModelTextualFileNameStringField;
+
private boolean fEnabledSymbexDeveloperMode;
private BooleanFieldEditor fFirstSymbexOutputTextualEnabledBooleanField;
-// private StringFieldEditor fFirstSymbexOutputTextualFileNameStringField;
-
private BooleanFieldEditor fFirstSymbexOutputGraphizEnabledBooleanField;
-// private StringFieldEditor fFirstSymbexOutputGraphizFileNameStringField;
- private Group fGroupFirstSymbexOutputTrace;
- private Group fGroupFirstSymbexOutputFormat;
- private StringFieldEditor fFirstSymbexOutputGraphizTraceStringField;
- private StringFieldEditor fFirstSymbexOutputGraphizFormatStringField;
-
+
+ private TraceElementTableViewer fFirstSymbexOutputGraphizTraceTableViewer;
+
+ private TraceElementTableConfigProvider getFirstSymbexOutputGraphizTraceTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ "&Trace Filter", "", true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.GRAPHVIZ_TRACE_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
+
+
+ private TraceElementTableViewer fFirstSymbexOutputGraphizFormatTableViewer;
+
+ private TraceElementTableConfigProvider getFirstSymbexOutputGraphizFormatTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ "&Format", "", false, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(32),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.FORMAT_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
// Second Symbex Workflow Page
private Group fGroupSecondStageSymbexWorkflow;
-// private BooleanFieldEditor fSecondParsedModelGraphizEnabledBooleanField;
-//// private StringFieldEditor fSecondParsedModelGraphizFileNameStringField;
+// private BooleanFieldEditor fSecondParsedModelGraphizEnabledBooleanField;
+//// private StringFieldEditor fSecondParsedModelGraphizFileNameStringField;
//
-// private BooleanFieldEditor fSecondParsedModelTextualEnabledBooleanField;
-//// private StringFieldEditor fSecondparsedModelTextualFileNameStringField;
+// private BooleanFieldEditor fSecondParsedModelTextualEnabledBooleanField;
+//// private StringFieldEditor fSecondparsedModelTextualFileNameStringField;
//
-// private BooleanFieldEditor fSecondCompiledModelTextualEnabledBooleanField;
-//// private StringFieldEditor fSecondCompiledModelTextualFileNameStringField;
+// private BooleanFieldEditor fSecondCompiledModelTextualEnabledBooleanField;
+//// private StringFieldEditor fSecondCompiledModelTextualFileNameStringField;
private Group fGroupSymbexOutputGeneratedTraces;
-
+
private BooleanFieldEditor fSecondSymbexOutputTextualEnabledBooleanField;
-// private StringFieldEditor fSecondSymbexOutputTextualFileNameStringField;
private BooleanFieldEditor fSecondSymbexOutputGraphizEnabledBooleanField;
-// private StringFieldEditor fSecondSymbexOutputGraphizFileNameStringField;
- private Group fGroupSecondSymbexOutputTrace;
- private Group fGroupSecondSymbexOutputFormat;
- private StringFieldEditor fSecondSymbexOutputGraphizTraceStringField;
- private StringFieldEditor fSecondSymbexOutputGraphizFormatStringField;
-
-
+ private TraceElementTableViewer fSecondSymbexOutputGraphizTraceTableViewer;
+
+ private TraceElementTableConfigProvider getSecondSymbexOutputGraphizTraceTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ "&Extension Trace Filter", "", true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.GRAPHVIZ_TRACE_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
+
+
+ private TraceElementTableViewer fSecondSymbexOutputGraphizFormatTableViewer;
+
+ private TraceElementTableConfigProvider getSecondSymbexOutputGraphizFormatTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ "&Extension Format", "", false, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(24),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.FORMAT_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
+
+
public DebugConfigurationPage(ILaunchConfigurationGUIelement masterGUIelement) {
super(masterGUIelement);
@@ -113,6 +160,20 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
}
}
+
+ @Override
+ public String getSectionTitle() {
+ return "Debug";
+ }
+
+
+ @Override
+ public String getSectionDescription() {
+ return "Generation of Textual or Graphviz file format for debugging purpose";
+ }
+
+
+
// ======================================================================================
// Miscellaneous handling
// ======================================================================================
@@ -209,16 +270,19 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
fFirstParsedModelTextualEnabledBooleanField = new BooleanFieldEditor(
this, ATTR_ENABLED_FIRST_PARSED_MODEL_TEXTUAL_GENERATION,
"&Parsed Model as Textual Representation", comp, false);
+ addFieldEditor(fFirstParsedModelTextualEnabledBooleanField);
fFirstParsedModelGraphizEnabledBooleanField = new BooleanFieldEditor(
this, ATTR_ENABLED_FIRST_PARSED_MODEL_GRAPHVIZ_GENERATION,
"&Parsed Model as <Graphiz> Representation", comp, false);
+ addFieldEditor(fFirstParsedModelGraphizEnabledBooleanField);
if( fEnabledSymbexDeveloperMode ) {
fFirstCompiledModelTextualEnabledBooleanField =
new BooleanFieldEditor(this,
ATTR_ENABLED_FIRST_COMPILED_MODEL_TEXTUAL_GENERATION,
"&Compiled Model as Textual Representation", comp, false);
+ addFieldEditor(fFirstCompiledModelTextualEnabledBooleanField);
}
}
@@ -233,6 +297,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
fFirstSymbexOutputTextualEnabledBooleanField = new BooleanFieldEditor(
this, ATTR_ENABLED_FIRST_SYMBEX_OUTPUT_TEXTUAL_GENERATION,
"&Basic Textual Representation", comp, false);
+ addFieldEditor(fFirstSymbexOutputTextualEnabledBooleanField);
group = widgetToolkit.createGroup(comp,
@@ -254,29 +319,23 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
getBooleanValue() );
}
});
+ addFieldEditor(fFirstSymbexOutputGraphizEnabledBooleanField);
- fGroupFirstSymbexOutputTrace = widgetToolkit.createGroup(
- comp, "&Trace ", 1, 2, GridData.FILL_BOTH);
- fFirstSymbexOutputGraphizTraceStringField = new StringFieldEditor(
- this, ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
- "", fGroupFirstSymbexOutputTrace,
- DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
+ fFirstSymbexOutputGraphizTraceTableViewer =
+ new TraceElementTableViewer(null, comp, 1, widgetToolkit,
+ getFirstSymbexOutputGraphizTraceTableConfig(parent.getFont()));
+ addTableViewer(fFirstSymbexOutputGraphizTraceTableViewer);
- fGroupFirstSymbexOutputFormat = widgetToolkit.createGroup(
- comp, "&Format ", 1, 2, GridData.FILL_BOTH);
- fFirstSymbexOutputGraphizFormatStringField = new StringFieldEditor(
- this, ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
- "", fGroupFirstSymbexOutputFormat,
- DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
+ fFirstSymbexOutputGraphizFormatTableViewer =
+ new TraceElementTableViewer(null, comp, 1, widgetToolkit,
+ getFirstSymbexOutputGraphizFormatTableConfig(parent.getFont()));
+ addTableViewer(fFirstSymbexOutputGraphizFormatTableViewer);
}
private void setEnableFirstExecutionPage(boolean checked) {
- propagateVisibility(fGroupFirstSymbexOutputTrace, checked);
-
- propagateVisibility(fGroupFirstSymbexOutputFormat, checked);
+ propagateVisibility(fFirstSymbexOutputGraphizTraceTableViewer.getControl(), checked);
+ propagateVisibility(fFirstSymbexOutputGraphizFormatTableViewer.getControl(), checked);
}
@@ -284,35 +343,38 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
fGroupSecondStageSymbexWorkflow = widgetToolkit.createGroup(parent,
"Second Stage Symbex Workflow Page", 1, 1, GridData.FILL_HORIZONTAL);
-// createSecondInputModelGraphicComponent(group);
+// createSecondInputModelGraphicComponent(group);
createSecondSymbexOutputComponent(fGroupSecondStageSymbexWorkflow, widgetToolkit);
}
-// private void createSecondInputModelGraphicComponent(Composite parent) {
-// Group group = SWTFactory.createGroup(parent,
-// "Input Model Generated Traces",
-// 1, 1, GridData.FILL_HORIZONTAL);
+// private void createSecondInputModelGraphicComponent(Composite parent) {
+// Group group = SWTFactory.createGroup(parent,
+// "Input Model Generated Traces",
+// 1, 1, GridData.FILL_HORIZONTAL);
//
-// Composite comp = SWTFactory.createComposite(
-// group, 1, 1, GridData.FILL_HORIZONTAL);
+// Composite comp = SWTFactory.createComposite(
+// group, 1, 1, GridData.FILL_HORIZONTAL);
//
-// fSecondParsedModelTextualEnabledBooleanField = new BooleanFieldEditor(
-// this, ATTR_ENABLED_SECOND_PARSED_MODEL_TEXTUAL_GENERATION,
-// "&Parsed Model as Textual Representation", comp, false);
+// fSecondParsedModelTextualEnabledBooleanField = new BooleanFieldEditor(
+// this, ATTR_ENABLED_SECOND_PARSED_MODEL_TEXTUAL_GENERATION,
+// "&Parsed Model as Textual Representation", comp, false);
+// addFieldEditor(fSecondParsedModelTextualEnabledBooleanField);
//
-// fSecondParsedModelGraphizEnabledBooleanField = new BooleanFieldEditor(
-// this, ATTR_ENABLED_SECOND_PARSED_MODEL_GRAPHVIZ_GENERATION,
-// "&Parsed Model as <Graphiz> Representation", comp, false);
+// fSecondParsedModelGraphizEnabledBooleanField = new BooleanFieldEditor(
+// this, ATTR_ENABLED_SECOND_PARSED_MODEL_GRAPHVIZ_GENERATION,
+// "&Parsed Model as <Graphiz> Representation", comp, false);
+// addFieldEditor(fSecondParsedModelGraphizEnabledBooleanField);
//
-// if( fEnabledSymbexDeveloperMode ) {
-// fSecondCompiledModelTextualEnabledBooleanField =
+// if( fEnabledSymbexDeveloperMode ) {
+// fSecondCompiledModelTextualEnabledBooleanField =
// new BooleanFieldEditor(this,
-// ATTR_ENABLED_SECOND_COMPILED_MODEL_TEXTUAL_GENERATION,
-// "&Compiled Model as Textual Representation", comp, false);
-// }
+// ATTR_ENABLED_SECOND_COMPILED_MODEL_TEXTUAL_GENERATION,
+// "&Compiled Model as Textual Representation", comp, false);
+// addFieldEditor(fSecondCompiledModelTextualEnabledBooleanField);
// }
+// }
private void createSecondSymbexOutputComponent(Composite parent, IWidgetToolkit widgetToolkit) {
fGroupSymbexOutputGeneratedTraces = widgetToolkit.createGroup(parent,
@@ -325,6 +387,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
fSecondSymbexOutputTextualEnabledBooleanField = new BooleanFieldEditor(
this, ATTR_ENABLED_SECOND_SYMBEX_OUTPUT_TEXTUAL_GENERATION,
"&Basic Textual Representation", comp, false);
+ addFieldEditor(fSecondSymbexOutputTextualEnabledBooleanField);
Group group = widgetToolkit.createGroup(comp,
@@ -346,29 +409,28 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
getBooleanValue() );
}
});
+ addFieldEditor(fSecondSymbexOutputGraphizEnabledBooleanField);
- fGroupSecondSymbexOutputTrace = widgetToolkit.createGroup(
- comp, "&Trace ", 1, 2, GridData.FILL_BOTH);
- fSecondSymbexOutputGraphizTraceStringField = new StringFieldEditor(
- this, ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
- "", fGroupSecondSymbexOutputTrace,
- DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
-
- fGroupSecondSymbexOutputFormat = widgetToolkit.createGroup(
- comp, "&Format ", 1, 2, GridData.FILL_BOTH);
- fSecondSymbexOutputGraphizFormatStringField = new StringFieldEditor(
- this, ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
- "", fGroupSecondSymbexOutputFormat,
- DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
+ fSecondSymbexOutputGraphizTraceTableViewer =
+ new TraceElementTableViewer(null, comp, 1, widgetToolkit,
+ getSecondSymbexOutputGraphizTraceTableConfig(parent.getFont()));
+ addTableViewer(fSecondSymbexOutputGraphizTraceTableViewer);
+
+ fSecondSymbexOutputGraphizFormatTableViewer =
+ new TraceElementTableViewer(null, comp, 1, widgetToolkit,
+ getSecondSymbexOutputGraphizFormatTableConfig(parent.getFont()));
+ addTableViewer(fSecondSymbexOutputGraphizFormatTableViewer);
}
private void setEnableSecondExecutionPage(boolean checked) {
- propagateVisibility(fGroupSecondSymbexOutputTrace, checked);
-
- propagateVisibility(fGroupSecondSymbexOutputFormat, checked);
+ propagateVisibility(
+ fSecondSymbexOutputGraphizTraceTableViewer.getControl(),
+ checked);
+
+ propagateVisibility(
+ fSecondSymbexOutputGraphizFormatTableViewer.getControl(),
+ checked);
}
// ======================================================================================
@@ -376,7 +438,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_CONSOLE_LOG_VERBOSE_LEVEL, "MINIMUM");
@@ -389,7 +451,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
ATTR_FIRST_PARSED_MODEL_TEXTUAL_FILENAME,
"model_parsed.xlia");
-// fFirstParsedModelGraphizEnabledBooleanField.setDefaults(configuration);
+// fFirstParsedModelGraphizEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_FIRST_PARSED_MODEL_GRAPHVIZ_GENERATION, false);
@@ -398,7 +460,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
"model_parsed_graph.gv");
if( fEnabledSymbexDeveloperMode ) {
-// fFirstCompiledModelTextualEnabledBooleanField.setDefaults(configuration);
+// fFirstCompiledModelTextualEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_FIRST_COMPILED_MODEL_TEXTUAL_GENERATION, false);
@@ -407,7 +469,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
"phase1_compiled_model.fexe");
}
-// fFirstSymbexOutputTextualEnabledBooleanField.setDefaults(configuration);
+// fFirstSymbexOutputTextualEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_FIRST_SYMBEX_OUTPUT_TEXTUAL_GENERATION, false);
@@ -415,7 +477,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
ATTR_FIRST_SYMBEX_OUTPUT_TEXTUAL_FILENAME,
DEFAULT_FIRST_SYMBEX_OUTPUT_TEXTUAL_FILENAME);
-// fFirstSymbexOutputGraphizEnabledBooleanField.setDefaults(configuration);
+// fFirstSymbexOutputGraphizEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_GENERATION, false);
@@ -423,35 +485,33 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FILENAME,
DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FILENAME);
-// fFirstSymbexOutputGraphizTraceStringField.setDefaults(configuration);
configuration.setAttribute(
ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC);
-// fFirstSymbexOutputGraphizFormatStringField.setDefaults(configuration);
configuration.setAttribute(
ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC);
// Second Symbex Workflow Page
-// fSecondParsedModelTextualEnabledBooleanField.setDefaults(configuration);
-// configuration.setAttribute(
-// ATTR_ENABLED_SECOND_PARSED_MODEL_TEXTUAL_GENERATION, false);
+// fSecondParsedModelTextualEnabledBooleanField.setDefaults(configuration);
+// configuration.setAttribute(
+// ATTR_ENABLED_SECOND_PARSED_MODEL_TEXTUAL_GENERATION, false);
configuration.setAttribute(
ATTR_SECOND_PARSED_MODEL_TEXTUAL_FILENAME,
"phase2_parsed_model.xlia");
-// fSecondParsedModelGraphizEnabledBooleanField.setDefaults(configuration);
-// configuration.setAttribute(
-// ATTR_ENABLED_SECOND_PARSED_MODEL_GRAPHVIZ_GENERATION, false);
+// fSecondParsedModelGraphizEnabledBooleanField.setDefaults(configuration);
+// configuration.setAttribute(
+// ATTR_ENABLED_SECOND_PARSED_MODEL_GRAPHVIZ_GENERATION, false);
configuration.setAttribute(
ATTR_SECOND_PARSED_MODEL_GRAPHVIZ_FILENAME,
"phase2_parsed_model.gv");
if( fEnabledSymbexDeveloperMode ) {
-// fSecondCompiledModelTextualEnabledBooleanField.setDefaults(configuration);
+// fSecondCompiledModelTextualEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_SECOND_COMPILED_MODEL_TEXTUAL_GENERATION, false);
@@ -460,7 +520,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
"phase2_compiled_model.fexe");
}
-// fSecondSymbexOutputTextualEnabledBooleanField.setDefaults(configuration);
+// fSecondSymbexOutputTextualEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_SECOND_SYMBEX_OUTPUT_TEXTUAL_GENERATION, false);
@@ -468,7 +528,7 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
ATTR_SECOND_SYMBEX_OUTPUT_TEXTUAL_FILENAME,
DEFAULT_SECOND_SYMBEX_OUTPUT_TEXTUAL_FILENAME);
-// fSecondSymbexOutputGraphizEnabledBooleanField.setDefaults(configuration);
+// fSecondSymbexOutputGraphizEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(
ATTR_ENABLED_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_GENERATION, false);
@@ -476,19 +536,19 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FILENAME,
DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FILENAME);
-// fSecondSymbexOutputGraphizTraceStringField.setDefaults(configuration);
+// fSecondSymbexOutputGraphizTraceStringField.setDefaults(configuration);
configuration.setAttribute(
ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC);
-// fSecondSymbexOutputGraphizFormatStringField.setDefaults(configuration);
+// fSecondSymbexOutputGraphizFormatStringField.setDefaults(configuration);
configuration.setAttribute(
ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC);
}
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
try {
fConsoleLevel = ConsoleVerbosityKind.get(
configuration.getAttribute(ATTR_CONSOLE_LOG_VERBOSE_LEVEL,
@@ -505,38 +565,12 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
}
initializeConsoleLevel();
- fFirstParsedModelTextualEnabledBooleanField.initializeFrom(configuration);
- fFirstParsedModelGraphizEnabledBooleanField.initializeFrom(configuration);
- if( fEnabledSymbexDeveloperMode ) {
- fFirstCompiledModelTextualEnabledBooleanField.initializeFrom(configuration);
- }
-
- fFirstSymbexOutputTextualEnabledBooleanField.initializeFrom(configuration);
- fFirstSymbexOutputGraphizEnabledBooleanField.initializeFrom(configuration);
- fFirstSymbexOutputGraphizTraceStringField.initializeFrom(configuration);
-
- fFirstSymbexOutputGraphizFormatStringField.initializeFrom(configuration);
-
-
-// fSecondParsedModelTextualEnabledBooleanField.initializeFrom(configuration);
-// fSecondParsedModelGraphizEnabledBooleanField.initializeFrom(configuration);
-// if( fEnabledSymbexDeveloperMode ) {
-// fSecondCompiledModelTextualEnabledBooleanField.initializeFrom(configuration);
-// }
-
- fSecondSymbexOutputTextualEnabledBooleanField.initializeFrom(configuration);
- fSecondSymbexOutputGraphizEnabledBooleanField.initializeFrom(configuration);
- fSecondSymbexOutputGraphizTraceStringField.initializeFrom(configuration);
-
- fSecondSymbexOutputGraphizFormatStringField.initializeFrom(configuration);
-
-
setEnableFirstExecutionPage(
fFirstSymbexOutputGraphizEnabledBooleanField.getBooleanValue() );
setEnableSecondExecutionPage(
fSecondSymbexOutputGraphizEnabledBooleanField.getBooleanValue() );
-
+
try {
propagateVisibility(fGroupSecondStageSymbexWorkflow,
configuration.getAttribute(ATTR_ENABLED_TRACE_EXTENSION, false));
@@ -568,36 +602,10 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration) {
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_CONSOLE_LOG_VERBOSE_LEVEL, fConsoleLevel.getLiteral());
- fFirstParsedModelTextualEnabledBooleanField.performApply(configuration);
- fFirstParsedModelGraphizEnabledBooleanField.performApply(configuration);
- if( fEnabledSymbexDeveloperMode ) {
- fFirstCompiledModelTextualEnabledBooleanField.performApply(configuration);
- }
-
- fFirstSymbexOutputTextualEnabledBooleanField.performApply(configuration);
- fFirstSymbexOutputGraphizEnabledBooleanField.performApply(configuration);
- fFirstSymbexOutputGraphizTraceStringField.performApply(configuration);
-
- fFirstSymbexOutputGraphizFormatStringField.performApply(configuration);
-
-
-// fSecondParsedModelTextualEnabledBooleanField.performApply(configuration);
-// fSecondParsedModelGraphizEnabledBooleanField.performApply(configuration);
-// if( fEnabledSymbexDeveloperMode ) {
-// fSecondCompiledModelTextualEnabledBooleanField.performApply(configuration);
-// }
-
- fSecondSymbexOutputTextualEnabledBooleanField.performApply(configuration);
- fSecondSymbexOutputGraphizEnabledBooleanField.performApply(configuration);
- fSecondSymbexOutputGraphizTraceStringField.performApply(configuration);
-
- fSecondSymbexOutputGraphizFormatStringField.performApply(configuration);
-
-
setEnableFirstExecutionPage(
fFirstSymbexOutputGraphizEnabledBooleanField.getBooleanValue() );
@@ -611,32 +619,31 @@ public class DebugConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
return new FieldValidationReturn(true, null);
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@Override
- protected void handleConfigurationPropertyChange(PropertyChangeEvent event) {
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
switch( event.getProperty() ) {
case ATTR_ENABLED_TRACE_EXTENSION:
// fGroupSecondStageSymbexWorkflow.setEnabled( (Boolean)( event.getNewValue() ) );
-
+
propagateVisibility(fGroupSecondStageSymbexWorkflow,
(Boolean)( event.getNewValue() ) );
-
+
// propagateVisibility(fGroupSymbexOutputGeneratedTraces,
// (Boolean)( event.getNewValue() ) );
break;
-
+
default:
break;
}
}
-
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/developer/DeveloperTuningConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/developer/DeveloperTuningConfigurationPage.java
index 6a9bc63..19577e0 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/developer/DeveloperTuningConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/developer/DeveloperTuningConfigurationPage.java
@@ -127,10 +127,21 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
private BooleanFieldEditor fNothingEnabledBooleanField;
private BooleanFieldEditor fGodModeEnabledBooleanField;
+
public DeveloperTuningConfigurationPage(ILaunchConfigurationGUIelement masterGUIelement) {
super(masterGUIelement);
}
+ @Override
+ public String getSectionTitle() {
+ return "Developer Tuning";
+ }
+
+ @Override
+ public String getSectionDescription() {
+ return "Developer Tuning page";
+ }
+
// ======================================================================================
// Miscellaneous Handling
@@ -218,7 +229,6 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fDeveloperModeEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_DEVELOPER_TUNING, "&Developer Mode", comp, false);
-
fDeveloperModeEnabledBooleanField.addSelectionListener(
new SelectionAdapter() {
@Override
@@ -227,6 +237,7 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fDeveloperModeEnabledBooleanField.getBooleanValue() );
}
});
+ addFieldEditor(fDeveloperModeEnabledBooleanField);
comp = widgetToolkit.createComposite(
parent, 1, 5, GridData.FILL_HORIZONTAL);
@@ -234,10 +245,12 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fLogFileNameStringField = new StringFieldEditor(this,
ATTR_DEVELOPER_TUNING_LOG_FILENAME, "&Log File :",comp,
DEFAULT_DEVELOPER_TUNING_LOG_FILENAME);
+ addFieldEditor(fLogFileNameStringField);
fDebugTraceFileNameStringField = new StringFieldEditor(this,
ATTR_DEVELOPER_TUNING_DEBUG_FILENAME, "&Debug File :", comp,
DEFAULT_DEVELOPER_TUNING_DEBUG_FILENAME);
+ addFieldEditor(fDebugTraceFileNameStringField);
fDebugTraceLevelLabel = widgetToolkit.createLabel(comp, "&Debug Level :", 1);
@@ -262,27 +275,35 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fParsingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PARSING, "&PARSING", comp, false);
+ addFieldEditor(fParsingEnabledBooleanField);
fConfigureEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_CONFIGURING, "CONFIGURING", comp, false);
+ addFieldEditor(fConfigureEnabledBooleanField);
fCompilingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_COMPILING, "COMPILING", comp, false);
+ addFieldEditor(fCompilingEnabledBooleanField);
fLoadingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_LOADING, "LOADING", comp, false);
+ addFieldEditor(fLoadingEnabledBooleanField);
fComputingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_COMPUTING, "COMPUTING", comp, false);
+ addFieldEditor(fComputingEnabledBooleanField);
fReportingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_REPORTING, "REPORTING", comp, false);
+ addFieldEditor(fReportingEnabledBooleanField);
fSolverEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_SOLVING, "SOLVING [SAT,SMT] ", comp, false);
+ addFieldEditor(fSolverEnabledBooleanField);
fProfilingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PROFILING, "PROFILING", comp, false);
+ addFieldEditor(fProfilingEnabledBooleanField);
// Process Stage: Processing, Filtering, ...
@@ -295,31 +316,39 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fSymbexProcessEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_ALL_PROCESS_STAGE,
"ALL_PROCESS_STAGE", comp, false);
+ addFieldEditor(fSymbexProcessEnabledBooleanField);
fPreProcessingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PRE_PROCESSING,
"PRE_PROCESSING", comp, false);
+ addFieldEditor(fPreProcessingEnabledBooleanField);
fPostProcessingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_POST_PROCESSING,
"POST_PROCESSING", comp, false);
+ addFieldEditor(fPostProcessingEnabledBooleanField);
fProcessingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PROCESSING, "PROCESSING", comp, false);
+ addFieldEditor(fProcessingEnabledBooleanField);
fPreFilteringEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PRE_FILTERING,
"PRE_FILTERING", comp, false);
+ addFieldEditor(fPreFilteringEnabledBooleanField);
fPostFilteringEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_POST_FILTERING,
"POST_FILTERING", comp, false);
+ addFieldEditor(fPostFilteringEnabledBooleanField);
fFilteringEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_FILTERING, "FILTERING", comp, false);
+ addFieldEditor(fFilteringEnabledBooleanField);
fQueueEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_QUEUE, "SYMBEX QUEUE", comp, false);
+ addFieldEditor(fQueueEnabledBooleanField);
// Statement Evaluation
@@ -331,30 +360,38 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fProgramEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PROGRAM, "PROGRAM", comp, false);
+ addFieldEditor(fProgramEnabledBooleanField);
fStatementEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_STATEMENT, "STATEMENT", comp, false);
+ addFieldEditor(fStatementEnabledBooleanField);
fStatementAssignEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_STATEMENT_ASSIGNMENT,
"ASSIGNMENT", comp, false);
+ addFieldEditor(fStatementAssignEnabledBooleanField);
fStatementCommunicationEnabledBooleanField = new BooleanFieldEditor(
this, ATTR_ENABLED_TRACE_STATEMENT_COMMUNICATION,
"COMMUNICATION", comp, false);
+ addFieldEditor(fStatementCommunicationEnabledBooleanField);
fStatementDecisionEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_STATEMENT_TEST_DECISION,
"TEST DECISION", comp, false);
+ addFieldEditor(fStatementDecisionEnabledBooleanField);
fStatementBytecodeEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_BYTECODE, "BYTECODE", comp, false);
+ addFieldEditor(fStatementBytecodeEnabledBooleanField);
fDataEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_DATA, "DATA", comp, false);
+ addFieldEditor(fDataEnabledBooleanField);
fTraceEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_TRACE, "TRACE [POINT]", comp, false);
+ addFieldEditor(fTraceEnabledBooleanField);
// Element: Property, Signal...
@@ -366,21 +403,27 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fVariableEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_VARIABLE, "VARIABLE", comp, false);
+ addFieldEditor(fVariableEnabledBooleanField);
fBufferEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_BUFFER, "BUFFER", comp, false);
+ addFieldEditor(fBufferEnabledBooleanField);
fPortEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_PORT, "PORT", comp, false);
+ addFieldEditor(fPortEnabledBooleanField);
fSignalEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_SIGNAL, "SIGNAL", comp, false);
+ addFieldEditor(fSignalEnabledBooleanField);
fConnexionEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_CONNEXION, "CONNEXION", comp, false);
+ addFieldEditor(fConnexionEnabledBooleanField);
fTimeEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_TIME, "TIME", comp, false);
+ addFieldEditor(fTimeEnabledBooleanField);
// Executable Component...
@@ -392,21 +435,27 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fExecutableEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_EXECUTABLE, "EXECUTABLE", comp, false);
+ addFieldEditor(fExecutableEnabledBooleanField);
fActivityEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_ACTIVITY, "ACTIVITY", comp, false);
+ addFieldEditor(fActivityEnabledBooleanField);
fRoutineEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_ROUTINE, "ROUTINE", comp, false);
+ addFieldEditor(fRoutineEnabledBooleanField);
fTransitionEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_TRANSITION, "TRANSITION", comp, false);
+ addFieldEditor(fTransitionEnabledBooleanField);
fMachineEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_MACHINE, "MACHINE", comp, false);
+ addFieldEditor(fMachineEnabledBooleanField);
fStatemachineEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_STATEMACHINE, "STATEMACHINE", comp, false);
+ addFieldEditor(fStatemachineEnabledBooleanField);
// Others: [Qualified]NameID, RefCount, ...
@@ -419,24 +468,30 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fNameIdEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_NAME_ID, "NAME_ID", comp, false);
+ addFieldEditor(fNameIdEnabledBooleanField);
fQualifiedNameIdEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_QUALIFIED_NAME_ID,
"QUALIFIED_NAME_ID", comp, false);
+ addFieldEditor(fQualifiedNameIdEnabledBooleanField);
fFullyQualifiedNameIdEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_FULLY_QUALIFIED_NAME_ID,
"FULLY_QUALIFIED_NAME_ID", comp, false);
+ addFieldEditor(fFullyQualifiedNameIdEnabledBooleanField);
fRedundanceEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_REDUNDANCE, "REDUNDANCE", comp, false);
+ addFieldEditor(fRedundanceEnabledBooleanField);
fReferenceCountingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_REFERENCE_COUNTING,
"REFERENCE_COUNTING", comp, false);
+ addFieldEditor(fReferenceCountingEnabledBooleanField);
fNothingEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_NOTHING, "NOTHING", comp, false);
+ addFieldEditor(fNothingEnabledBooleanField);
// God Mode
comp = widgetToolkit.createComposite(
@@ -444,6 +499,7 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
fGodModeEnabledBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_TRACE_GOD_MODE, "GOD_MODE", comp, false);
+ addFieldEditor(fGodModeEnabledBooleanField);
}
// ======================================================================================
@@ -452,7 +508,7 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
// fDeveloperModeEnabledBooleanField.setDefaults(configuration);
configuration.setAttribute(ATTR_ENABLED_DEVELOPER_TUNING, false);
@@ -612,11 +668,7 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
}
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
- fDeveloperModeEnabledBooleanField.initializeFrom(configuration);
- fLogFileNameStringField.initializeFrom(configuration);
- fDebugTraceFileNameStringField.initializeFrom(configuration);
-
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
try {
fDebugTraceLevel = DebuglevelKind.get(
configuration.getAttribute(
@@ -634,71 +686,6 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
}
initializeTraceLevel();
-
- fParsingEnabledBooleanField.initializeFrom(configuration);
- fConfigureEnabledBooleanField.initializeFrom(configuration);
- fCompilingEnabledBooleanField.initializeFrom(configuration);
-
- fLoadingEnabledBooleanField.initializeFrom(configuration);
- fComputingEnabledBooleanField.initializeFrom(configuration);
- fReportingEnabledBooleanField.initializeFrom(configuration);
-
- fSolverEnabledBooleanField.initializeFrom(configuration);
- fProfilingEnabledBooleanField.initializeFrom(configuration);
-
- // Process Stage: Processing, Filtering, ...
- fSymbexProcessEnabledBooleanField.initializeFrom(configuration);
-
- fPreProcessingEnabledBooleanField.initializeFrom(configuration);
- fPostProcessingEnabledBooleanField.initializeFrom(configuration);
- fProcessingEnabledBooleanField.initializeFrom(configuration);
-
- fPreFilteringEnabledBooleanField.initializeFrom(configuration);
- fPostFilteringEnabledBooleanField.initializeFrom(configuration);
- fFilteringEnabledBooleanField.initializeFrom(configuration);
-
- fQueueEnabledBooleanField.initializeFrom(configuration);
-
-
- // Statement Evaluation
- fProgramEnabledBooleanField.initializeFrom(configuration);
- fStatementEnabledBooleanField.initializeFrom(configuration);
- fStatementAssignEnabledBooleanField.initializeFrom(configuration);
- fStatementCommunicationEnabledBooleanField.initializeFrom(configuration);
- fStatementDecisionEnabledBooleanField.initializeFrom(configuration);
- fStatementBytecodeEnabledBooleanField.initializeFrom(configuration);
-
- fDataEnabledBooleanField.initializeFrom(configuration);
- fTraceEnabledBooleanField.initializeFrom(configuration);
-
- // Element: Property, Signal...
- fVariableEnabledBooleanField.initializeFrom(configuration);
- fBufferEnabledBooleanField.initializeFrom(configuration);
- fPortEnabledBooleanField.initializeFrom(configuration);
- fSignalEnabledBooleanField.initializeFrom(configuration);
- fConnexionEnabledBooleanField.initializeFrom(configuration);
- fTimeEnabledBooleanField.initializeFrom(configuration);
-
- // Executable Component...
- fExecutableEnabledBooleanField.initializeFrom(configuration);
- fActivityEnabledBooleanField.initializeFrom(configuration);
- fRoutineEnabledBooleanField.initializeFrom(configuration);
- fTransitionEnabledBooleanField.initializeFrom(configuration);
- fMachineEnabledBooleanField.initializeFrom(configuration);
- fStatemachineEnabledBooleanField.initializeFrom(configuration);
-
- // Others: [Qualified]NameID, RefCount, ...
- fNameIdEnabledBooleanField.initializeFrom(configuration);
- fQualifiedNameIdEnabledBooleanField.initializeFrom(configuration);
- fFullyQualifiedNameIdEnabledBooleanField.initializeFrom(configuration);
-
- fRedundanceEnabledBooleanField.initializeFrom(configuration);
- fReferenceCountingEnabledBooleanField.initializeFrom(configuration);
-
- // God Mode
- fNothingEnabledBooleanField.initializeFrom(configuration);
- fGodModeEnabledBooleanField.initializeFrom(configuration);
-
setEnableDeveloperTuningOptionsPage(
fDeveloperModeEnabledBooleanField.getBooleanValue() );
}
@@ -732,79 +719,10 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
}
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration) {
- fDeveloperModeEnabledBooleanField.performApply(configuration);
-
- fLogFileNameStringField.performApply(configuration);
- fDebugTraceFileNameStringField.performApply(configuration);
-
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_DEVELOPER_TUNING_DEBUG_LEVEL,
fDebugTraceLevel.getLiteral());
-
- // General Context
- fParsingEnabledBooleanField.performApply(configuration);
- fConfigureEnabledBooleanField.performApply(configuration);
- fCompilingEnabledBooleanField.performApply(configuration);
-
- fLoadingEnabledBooleanField.performApply(configuration);
- fComputingEnabledBooleanField.performApply(configuration);
- fReportingEnabledBooleanField.performApply(configuration);
-
- fSolverEnabledBooleanField.performApply(configuration);
- fProfilingEnabledBooleanField.performApply(configuration);
-
- // Process Stage: Processing, Filtering, ...
- fSymbexProcessEnabledBooleanField.performApply(configuration);
-
- fPreProcessingEnabledBooleanField.performApply(configuration);
- fPostProcessingEnabledBooleanField.performApply(configuration);
- fProcessingEnabledBooleanField.performApply(configuration);
-
- fPreFilteringEnabledBooleanField.performApply(configuration);
- fPostFilteringEnabledBooleanField.performApply(configuration);
- fFilteringEnabledBooleanField.performApply(configuration);
-
- fQueueEnabledBooleanField.performApply(configuration);
-
- // Statement Evaluation
- fProgramEnabledBooleanField.performApply(configuration);
- fStatementEnabledBooleanField.performApply(configuration);
- fStatementAssignEnabledBooleanField.performApply(configuration);
- fStatementCommunicationEnabledBooleanField.performApply(configuration);
- fStatementDecisionEnabledBooleanField.performApply(configuration);
- fStatementBytecodeEnabledBooleanField.performApply(configuration);
-
- fDataEnabledBooleanField.performApply(configuration);
- fTraceEnabledBooleanField.performApply(configuration);
-
- // Element: Property, Signal...
- fVariableEnabledBooleanField.performApply(configuration);
- fBufferEnabledBooleanField.performApply(configuration);
- fPortEnabledBooleanField.performApply(configuration);
- fSignalEnabledBooleanField.performApply(configuration);
- fConnexionEnabledBooleanField.performApply(configuration);
- fTimeEnabledBooleanField.performApply(configuration);
-
- // Executable Component...
- fExecutableEnabledBooleanField.performApply(configuration);
- fActivityEnabledBooleanField.performApply(configuration);
- fRoutineEnabledBooleanField.performApply(configuration);
- fTransitionEnabledBooleanField.performApply(configuration);
- fMachineEnabledBooleanField.performApply(configuration);
- fStatemachineEnabledBooleanField.performApply(configuration);
-
- // Others: [Qualified]NameID, RefCount, ...
- fNameIdEnabledBooleanField.performApply(configuration);
- fQualifiedNameIdEnabledBooleanField.performApply(configuration);
- fFullyQualifiedNameIdEnabledBooleanField.performApply(configuration);
-
- fRedundanceEnabledBooleanField.performApply(configuration);
- fReferenceCountingEnabledBooleanField.performApply(configuration);
-
- // God Mode
- fNothingEnabledBooleanField.performApply(configuration);
- fGodModeEnabledBooleanField.performApply(configuration);
}
// ======================================================================================
@@ -812,7 +730,7 @@ public class DeveloperTuningConfigurationPage extends AbstractConfigurationPage
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
return new FieldValidationReturn(true, null);
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertBehaviorSelectionConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertBehaviorSelectionConfigurationProfile.java
index d720b0f..3af8ece 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertBehaviorSelectionConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertBehaviorSelectionConfigurationProfile.java
@@ -55,7 +55,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
return "Behavior Selection, heuristic (expert) configuration section";
}
-
+
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit) {
// SWTFactory.createGroup(parent,
@@ -72,11 +72,11 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
"&Begin Step", comp1, 0);
fHoJBeginStep.setToolTipText("Number of \"cumulated\" steps "
+ "before begining the research of the behavior");
- addField( fHoJBeginStep );
-
+ addFieldEditor( fHoJBeginStep );
+
Group groupCommon = widgetToolkit.createGroup(groupHoJProperty,
"&Common", 3, 2, GridData.FILL_HORIZONTAL);
-
+
FieldEditor fieldEditor;
Composite compCommon = widgetToolkit.createComposite(
@@ -85,7 +85,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
ATTR_BEHAVIOR_SELECTION_HOJ_HEURISTIC,
"&Heuristic", compCommon, true);
fieldEditor.setToolTipText("Activate the use of heuristics");
- addField( fieldEditor );
+ addFieldEditor( fieldEditor );
compCommon = widgetToolkit.createComposite(
groupCommon, 1, 1, GridData.FILL_HORIZONTAL);
@@ -93,7 +93,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
ATTR_BEHAVIOR_SELECTION_HOJ_STOP, "&Stop", compCommon, true);
fieldEditor.setToolTipText("Stop the symbolic excution "
+ "as soon as the behavior is covered");
- addField( fieldEditor );
+ addFieldEditor( fieldEditor );
compCommon = widgetToolkit.createComposite(
groupCommon, 1, 1, GridData.FILL_HORIZONTAL);
@@ -101,7 +101,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
ATTR_BEHAVIOR_SELECTION_HOJ_SLICE, "&Slice", compCommon, true);
fieldEditor.setToolTipText("Pruning the symbolic execution graph "
+ "at the end of the analysis");
- addField( fieldEditor );
+ addFieldEditor( fieldEditor );
Group groupScope = widgetToolkit.createGroup(groupHoJProperty,
@@ -110,42 +110,43 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
Composite comp = widgetToolkit.createComposite(
groupScope, 1, 1, GridData.FILL_HORIZONTAL);
- addField( new BooleanFieldEditor(
+ addFieldEditor( new BooleanFieldEditor(
fConfigurationPage, ATTR_BEHAVIOR_SELECTION_HOJ_SEARCH_SCOPE_LOCALLY,
"&Search Locally scope instead Globally", comp, false) );
- Group groupScheduler = widgetToolkit.createGroup(groupHoJProperty,
- "&Trace Sequence", 2, 2, GridData.FILL_HORIZONTAL);
- Composite compScheduler = widgetToolkit.createComposite(
- groupScheduler, 1, 1, GridData.FILL_HORIZONTAL);
- fieldEditor = new BooleanFieldEditor(fConfigurationPage,
- ATTR_BEHAVIOR_SELECTION_HOJ_SCHEDULER_ORDERED,
- "&Ordered", compScheduler, true);
- fieldEditor.setToolTipText("Search ordered traces");
- addField( fieldEditor );
-
- compScheduler = widgetToolkit.createComposite(
- groupScheduler, 1, 1, GridData.FILL_HORIZONTAL);
- fieldEditor = new BooleanFieldEditor(fConfigurationPage,
- ATTR_BEHAVIOR_SELECTION_HOJ_HIT_CONSECUTIVE,
- "&Consecutive", compScheduler, false);
- fieldEditor.setToolTipText(
- "Search ordered traces with consecutive observables");
- addField( fieldEditor );
+// Group groupTraceSequenceOption = widgetToolkit.createGroup(groupHoJProperty,
+// "&Trace Sequence ", 2, 2, GridData.FILL_HORIZONTAL);
+//
+// Composite compScheduler = widgetToolkit.createComposite(
+// groupTraceSequenceOption, 1, 1, GridData.FILL_HORIZONTAL);
+// fieldEditor = new BooleanFieldEditor(fConfigurationPage,
+// ATTR_BEHAVIOR_SELECTION_HOJ_SCHEDULER_ORDERED,
+// "&Ordered", compScheduler, true);
+// fieldEditor.setToolTipText("Search ordered traces");
+// addField( fieldEditor );
+//
+// compScheduler = widgetToolkit.createComposite(
+// groupTraceSequenceOption, 1, 1, GridData.FILL_HORIZONTAL);
+// fieldEditor = new BooleanFieldEditor(fConfigurationPage,
+// ATTR_BEHAVIOR_SELECTION_HOJ_HIT_CONSECUTIVE,
+// "&Consecutive", compScheduler, false);
+// fieldEditor.setToolTipText(
+// "Search ordered traces with consecutive observables");
+// addField( fieldEditor );
Group groupOption = widgetToolkit.createGroup(groupHoJProperty,
- "&Options", 4, 2, GridData.FILL_HORIZONTAL);
+ "&Options", 3, 2, GridData.FILL_HORIZONTAL);
Composite compOption = widgetToolkit.createComposite(
groupOption, 1, 1, GridData.FILL_HORIZONTAL);
- fieldEditor = new BooleanFieldEditor(fConfigurationPage,
- ATTR_BEHAVIOR_SELECTION_HOJ_HIT_FOLDING,
- "&Folding", compOption, true);
- fieldEditor.setToolTipText(
- "Enabled verification of multiple trace properties per Symbex State");
- addField( fieldEditor );
+// fieldEditor = new BooleanFieldEditor(fConfigurationPage,
+// ATTR_BEHAVIOR_SELECTION_HOJ_HIT_FOLDING,
+// "&Folding", compOption, true);
+// fieldEditor.setToolTipText(
+// "Enabled verification of multiple trace properties per Symbex State");
+// addFieldEditor( fieldEditor );
compOption = widgetToolkit.createComposite(
groupOption, 1, 1, GridData.FILL_HORIZONTAL);
@@ -154,7 +155,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
"&Lucky", compOption, false);
fieldEditor.setToolTipText(
"Search one trace in a lucky way - no backtracking");
- addField( fieldEditor );
+ addFieldEditor( fieldEditor );
compOption = widgetToolkit.createComposite(
groupOption, 1, 1, GridData.FILL_HORIZONTAL);
@@ -162,7 +163,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
ATTR_BEHAVIOR_SELECTION_HOJ_HIT_MAX,
"&Maximun Trace", compOption, false);
fieldEditor.setToolTipText("Search a maximun trace");
- addField( fieldEditor );
+ addFieldEditor( fieldEditor );
compOption = widgetToolkit.createComposite(
groupOption, 1, 1, GridData.FILL_HORIZONTAL);
@@ -171,7 +172,7 @@ public class ExpertBehaviorSelectionConfigurationProfile extends AbstractConfigu
"&Jump Slice", compOption, false);
fieldEditor.setToolTipText(
"Pruning intermediate at the end of hit or jump");
- addField( fieldEditor );
+ addFieldEditor( fieldEditor );
// Group groupHoJHeuristic = widgetToolkit.createGroup(parent,
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertConfigurationPage.java
index fc2c6cb..ac0da1e 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertConfigurationPage.java
@@ -20,6 +20,7 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationProfile;
import org.eclipse.efm.execution.configuration.common.ui.api.ILaunchConfigurationGUIelement;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StackLayout;
@@ -40,6 +41,7 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
// TRANSITION COVERAGE
ExpertTransitionCoverageConfigurationProfile fTransitionCoveragePage;
+
public ExpertConfigurationPage(ILaunchConfigurationGUIelement masterGUIelement) {
super(masterGUIelement);
// BEHAVIOR SELECTION : HIT OR JUMP
@@ -49,6 +51,16 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
fTransitionCoveragePage = new ExpertTransitionCoverageConfigurationProfile(this);
}
+ @Override
+ public String getSectionTitle() {
+ return "Expert";
+ }
+
+ @Override
+ public String getSectionDescription() {
+ return "Expert Page";
+ }
+
// ======================================================================================
// Graphical Components Creation Methods
@@ -66,7 +78,7 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
// EXPLORATION PAGE
createExplorationPage(fCompositeStack, widgetToolkit);
-
+
fStackLayout.topControl = groupExplorationPage;
fCompositeStack.layout();
@@ -79,8 +91,12 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
private void setEnableGroupExplorationPage(ILaunchConfiguration configuration) {
try {
- String modelAnalysisProfile = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE, "");
+ final String strAnalysisProfile = configuration.getAttribute(
+ ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
+ AnalysisProfileKind.ANALYSIS_UNDEFINED_PROFILE.getLiteral());
+
+ final AnalysisProfileKind modelAnalysisProfile =
+ AnalysisProfileKind.get(strAnalysisProfile);
setVisibleProfilePage( modelAnalysisProfile );
}
@@ -88,23 +104,23 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
e.printStackTrace();
}
}
-
+
public void setVisibleProfilePage(AbstractConfigurationProfile aProfilePage) {
fStackLayout.topControl = aProfilePage.getSection();
fCompositeStack.layout();
}
- public void setVisibleProfilePage(String analysisProfile) {
+ public void setVisibleProfilePage(AnalysisProfileKind analysisProfile) {
switch ( analysisProfile ) {
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION:
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE:
setVisibleProfilePage( fTransitionCoveragePage );
break;
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR:
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE:
setVisibleProfilePage( fBehaviorSelectionPage );
break;
-
- case ANALYSIS_PROFILE_MODEL_TEST_OFFLINE:
- case ANALYSIS_PROFILE_MODEL_EXPLORATION:
+
+ case ANALYSIS_TEST_OFFLINE_PROFILE:
+ case ANALYSIS_EXPLORATION_PROFILE:
default:
fStackLayout.topControl = groupExplorationPage;
fCompositeStack.layout();
@@ -130,7 +146,7 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
// BEHAVIOR SELECTION : HIT OR JUMP
fBehaviorSelectionPage.setDefaults(configuration);
@@ -140,7 +156,7 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
setEnableGroupExplorationPage(configuration);
// BEHAVIOR SELECTION : HIT OR JUMP
@@ -152,7 +168,7 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration) {
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
// BEHAVIOR SELECTION : HIT OR JUMP
fBehaviorSelectionPage.performApply(configuration);
@@ -165,39 +181,39 @@ public class ExpertConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
// BEHAVIOR SELECTION : HIT OR JUMP
if( ! fBehaviorSelectionPage.isValid(launchConfig) ) {
return new FieldValidationReturn(false, null);
}
-
+
// TRANSITION COVERAGE
if( ! fTransitionCoveragePage.isValid(launchConfig) ) {
return new FieldValidationReturn(false, null);
}
-
+
return new FieldValidationReturn(true, null);
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@Override
- protected void handleConfigurationPropertyChange(PropertyChangeEvent event) {
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
switch( event.getProperty() ) {
case ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE: {
- setVisibleProfilePage( event.getNewValue().toString() );
+ setVisibleProfilePage( (AnalysisProfileKind) event.getNewValue() );
break;
}
default:
break;
}
-
- fBehaviorSelectionPage.handleConfigurationPropertyChange(event);
-
- fTransitionCoveragePage.handleConfigurationPropertyChange(event);
+
+ fBehaviorSelectionPage.handleConfigurationPropertyChange(event);
+
+ fTransitionCoveragePage.handleConfigurationPropertyChange(event);
}
-
+
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertTransitionCoverageConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertTransitionCoverageConfigurationProfile.java
index 0815ffe..8470832 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertTransitionCoverageConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/expert/ExpertTransitionCoverageConfigurationProfile.java
@@ -183,7 +183,7 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
fTCBeginStep.setToolTipText("Number of \"cumulated\" steps "
+ "before begining the verification cover");
fTCBeginStep.setEnabled(false);
- addField(fTCBeginStep);
+ addFieldEditor(fTCBeginStep);
Group groupCommon = widgetToolkit.createGroup(groupTCProperty,
"&Common Coverage Configuration",
@@ -195,7 +195,7 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
ATTR_TRANSITION_COVERAGE_HEURISTIC,
"&Heuristic", compCommon, true);
fTCHeuristic.setToolTipText("Activate the use of heuristics");
- addField(fTCHeuristic);
+ addFieldEditor(fTCHeuristic);
compCommon = widgetToolkit.createComposite(
groupCommon, 1, 1, GridData.FILL_HORIZONTAL);
@@ -203,7 +203,7 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
ATTR_TRANSITION_COVERAGE_STOP, "&Stop", compCommon, true);
fTCStop.setToolTipText("Stop the symbolic excution "
+ "as soon as the coverage is completed");
- addField(fTCStop);
+ addFieldEditor(fTCStop);
compCommon = widgetToolkit.createComposite(
groupCommon, 1, 1, GridData.FILL_HORIZONTAL);
@@ -211,7 +211,7 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
ATTR_TRANSITION_COVERAGE_SLICE, "&Slice", compCommon, true);
fTCSlice.setToolTipText("Pruning symbolic execution "
+ "graph at the end of the analysis");
- addField(fTCSlice);
+ addFieldEditor(fTCSlice);
compCommon = widgetToolkit.createComposite(
groupCommon, 1, 1, GridData.FILL_HORIZONTAL);
@@ -220,7 +220,7 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
"&Minimize", compCommon, true);
fTCMinimize.setToolTipText(
"Stop the symbolic execution at the earliest");
- addField(fTCMinimize);
+ addFieldEditor(fTCMinimize);
Composite comp3 = widgetToolkit.createComposite(
@@ -252,7 +252,7 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
ATTR_TRANSITION_COVERAGE_HEURISTIC_TRIALS, "&Trials :", comp, -1);
fTCHeuristicTrials.widthInChars = 10;
//fTCHeuristicTrials.setTextLimit(20);
- addField(fTCHeuristicTrials);
+ addFieldEditor(fTCHeuristicTrials);
group = widgetToolkit.createGroup(groupTCHeuristic,
@@ -265,13 +265,13 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
ATTR_TRANSITION_COVERAGE_OBJECTIVE_RATE, "&Rate :", comp, 100);
//fTCObjectiveRate.widthInChars = 3;
fTCObjectiveRate.setTextLimit(3);
- addField(fTCObjectiveRate);
+ addFieldEditor(fTCObjectiveRate);
fTCObjectiveRest = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_OBJECTIVE_REST, "&Rest :", comp, 0);
//fTCObjectiveRest.widthInChars = 3;
fTCObjectiveRest.setTextLimit(3);
- addField(fTCObjectiveRest);
+ addFieldEditor(fTCObjectiveRest);
group = widgetToolkit.createGroup(groupTCHeuristic,
@@ -282,11 +282,11 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
fTCCoverageHeight = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_LOOKAHEAD_DEPTH, "&Depth :", comp, 7);
- addField(fTCCoverageHeight);
+ addFieldEditor(fTCCoverageHeight);
fTCCoverageHeightReachedLimit = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_LOOKAHEAD_WIDTH, "&Width :", comp, 42);
- addField(fTCCoverageHeightReachedLimit);
+ addFieldEditor(fTCCoverageHeightReachedLimit);
Group groupStrategy = widgetToolkit.createGroup(groupTCHeuristic,
@@ -308,12 +308,12 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
fTCHitStronglyRandom = new BooleanFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_HIT_STRONGLY_RANDOM,
"&Hit Random", comp, false);
- addField(fTCHitStronglyRandom);
+ addFieldEditor(fTCHitStronglyRandom);
fTCHitStronglyCount = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_HIT_STRONGLY_COUNT,
"&Hit Count :", compGroup, 1);
- addField(fTCHitStronglyCount);
+ addFieldEditor(fTCHitStronglyCount);
group = widgetToolkit.createGroup(groupStrategy,
@@ -329,12 +329,12 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
fTCHitWeaklyRandom = new BooleanFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_HIT_WEAKLY_RANDOM,
"&Hit Random", comp, false);
- addField(fTCHitWeaklyRandom);
+ addFieldEditor(fTCHitWeaklyRandom);
fTCHitWeaklyCount = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_HIT_WEAKLY_COUNT,
"&Hit Count :", compGroup, 1);
- addField(fTCHitWeaklyCount);
+ addFieldEditor(fTCHitWeaklyCount);
group = widgetToolkit.createGroup(groupStrategy,
@@ -350,12 +350,12 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
fTCHitOtherRandom = new BooleanFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_HIT_OTHER_RANDOM,
"&Hit Random", comp, false);
- addField(fTCHitOtherRandom);
+ addFieldEditor(fTCHitOtherRandom);
fTCHitOtherCount = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_HIT_OTHER_COUNT,
"&Hit Count :", compGroup, 1);
- addField(fTCHitOtherCount);
+ addFieldEditor(fTCHitOtherCount);
groupTCHeuristic = widgetToolkit.createGroup(
@@ -378,12 +378,12 @@ public class ExpertTransitionCoverageConfigurationProfile extends AbstractConfig
fTCDirectiveTraceCountLimit = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_DIRECTIVE_TRACE_COUNT_LIMIT,
"&Count :", comp, 8);
- addField(fTCDirectiveTraceCountLimit);
+ addFieldEditor(fTCDirectiveTraceCountLimit);
fTCDirectiveTraceSizeLimit = new IntegerFieldEditor(fConfigurationPage,
ATTR_TRANSITION_COVERAGE_DIRECTIVE_TRACE_SIZE_LIMIT,
"&Size :", comp, 8);
- addField(fTCDirectiveTraceSizeLimit);
+ addFieldEditor(fTCDirectiveTraceSizeLimit);
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/nonregression/NonRegressionConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/nonregression/NonRegressionConfigurationPage.java
index bec2320..00fe468 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/nonregression/NonRegressionConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/nonregression/NonRegressionConfigurationPage.java
@@ -90,6 +90,17 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
super(masterGUIelement);
}
+ @Override
+ public String getSectionTitle() {
+ return "NonRegression";
+ }
+
+ @Override
+ public String getSectionDescription() {
+ return "NonRegression";
+ }
+
+
private class TabListener extends SelectionAdapter implements ModifyListener {
/* (non-Javadoc)
@@ -197,6 +208,7 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
fNonRegressionBooleanField = new BooleanFieldEditor(this,
ATTR_ENABLED_NON_REGRESSION,
"&Non Regression Execution", comp, false);
+ addFieldEditor(fNonRegressionBooleanField);
}
private void createModelFileSelectionComponent(
@@ -224,7 +236,7 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
ld.marginHeight = 1;
ld.marginWidth = 0;
- fModelWorkspaceBrowse = widgetToolkit.createPushButton(bcomp, "&Workspace...");
+ fModelWorkspaceBrowse = widgetToolkit.createPushButton(bcomp, "&Workspace...", null);
fModelWorkspaceBrowse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -595,12 +607,13 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_SPECIFICATION_PROJECT_NAME, "<project location>");
configuration.setAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION, "<model file location>");
+ ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
+ DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
configuration.setAttribute(
ATTR_BASIC_TRANSITION_BUTTON, "All");
@@ -610,16 +623,14 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
}
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
try {
- fNonRegressionBooleanField.initializeFrom(configuration);
-
fProjectName = configuration.getAttribute(
ATTR_SPECIFICATION_PROJECT_NAME, "");
specMainFileLocation = configuration.getAttribute(
ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
- "<model file location>");
+ DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
fModelPathText.setText(specMainFileLocation);
if( ! fModelPathText.getText().equals(currentModelPath) ) {
currentModelPath = fModelPathText.getText();
@@ -661,9 +672,7 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
}
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration) {
- fNonRegressionBooleanField.performApply(configuration);
-
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_SPECIFICATION_PROJECT_NAME, fProjectName);
@@ -686,13 +695,13 @@ public class NonRegressionConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
if( fNonRegressionCaseButton.equals("Details") &&
( selectedTransitions.size() == 0 ) ) {
return new FieldValidationReturn(false,
"You must select at least one transition");
}
-
+
return new FieldValidationReturn(true, null);
}
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewAnalysisProfileSection.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewAnalysisProfileSection.java
index 15d1c95..b371133 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewAnalysisProfileSection.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewAnalysisProfileSection.java
@@ -18,6 +18,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationPage;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationSection;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.ui.utils.ImageResources;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
@@ -37,33 +38,34 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
protected CTabItem fTransitionCoverageTabItem;
protected CTabItem fBehaviorSelectionTabItem;
-
+
protected CTabItem fTestOfflineTabItem;
protected CTabItem fModelAnalysisProfileSelectionTabItem;
-
+
public OverviewExplorationConfigurationProfile fExplorationPage;
public OverviewTransitionCoverageConfigurationProfile fTransitionCoveragePage;
public OverviewBehaviorSelectionConfigurationProfile fBehaviorSelectionPage;
-
+
public OverviewTestOfflineConfigurationProfile fTestOfflinePage;
/////////////////////////////////////
// ANALYSIS SELECTION
/////////////////////////////////////
- private String fModelAnalysisProfile = ANALYSIS_PROFILE_MODEL_EXPLORATION;
+ private AnalysisProfileKind fModelAnalysisProfile =
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
public OverviewAnalysisProfileSection(AbstractConfigurationPage configurationPage)
{
super(configurationPage);
-
+
fExplorationPage =
new OverviewExplorationConfigurationProfile(configurationPage);
-
+
fTransitionCoveragePage =
new OverviewTransitionCoverageConfigurationProfile(configurationPage, this);
@@ -80,7 +82,7 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
}
-
+
@Override
public String getSectionTitle() {
return "Analysis Profile";
@@ -91,14 +93,13 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
return "Select the analysis profile of the model by selecting a tab";
}
-
+
public boolean isTransitionCoverage() {
- return( fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION) );
+ return( fModelAnalysisProfile ==
+ AnalysisProfileKind.ANALYSIS_TRANSITION_COVERAGE_PROFILE );
}
-
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit)
{
@@ -129,7 +130,7 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
@Override
public void widgetSelected(SelectionEvent e) {
handleModelAnalysisProfileSelectionChange();
-
+
fConfigurationPage.propertyChange(
new PropertyChangeEvent(this,
ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
@@ -144,11 +145,12 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
private void createExplorationTabItem(IWidgetToolkit widgetToolkit)
{
fExplorationTabItem = new CTabItem(fTabFolder, SWT.NONE );
- fExplorationTabItem.setText(ANALYSIS_PROFILE_MODEL_EXPLORATION);
+ fExplorationTabItem.setText(
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE.getLiteral());
ScrolledComposite scrolledComposite =
widgetToolkit.createScrolledComposite(fTabFolder);
-
+
fExplorationPage.createControl(scrolledComposite, widgetToolkit);
Composite control = fExplorationPage.getControl();
@@ -164,7 +166,8 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
private void createTransitionCoverageTabItem(IWidgetToolkit widgetToolkit)
{
fTransitionCoverageTabItem = new CTabItem(fTabFolder, SWT.NONE );
- fTransitionCoverageTabItem.setText(ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION);
+ fTransitionCoverageTabItem.setText(
+ AnalysisProfileKind.ANALYSIS_TRANSITION_COVERAGE_PROFILE.getLiteral());
ScrolledComposite scrolledComposite =
widgetToolkit.createScrolledComposite(fTabFolder);
@@ -184,7 +187,8 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
private void createBehaviorSelectionTabItem(IWidgetToolkit widgetToolkit)
{
fBehaviorSelectionTabItem = new CTabItem(fTabFolder, SWT.NONE );
- fBehaviorSelectionTabItem.setText(ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR);
+ fBehaviorSelectionTabItem.setText(
+ AnalysisProfileKind.ANALYSIS_BEHAVIOR_SELECTION_PROFILE.getLiteral());
ScrolledComposite scrolledComposite =
@@ -205,7 +209,8 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
private void createTestOfflineTabItem(IWidgetToolkit widgetToolkit)
{
fTestOfflineTabItem = new CTabItem(fTabFolder, SWT.NONE );
- fTestOfflineTabItem.setText(ANALYSIS_PROFILE_MODEL_TEST_OFFLINE);
+ fTestOfflineTabItem.setText(
+ AnalysisProfileKind.ANALYSIS_TEST_OFFLINE_PROFILE.getLiteral());
ScrolledComposite scrolledComposite =
@@ -224,25 +229,25 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
}
- public void setVisibleModelAnalysisProfilePage(String profile) {
+ public void setVisibleModelAnalysisProfilePage(AnalysisProfileKind profile) {
switch ( profile ) {
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION:
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE:
fTabFolder.setSelection( fTransitionCoverageTabItem );
break;
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR:
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE:
fTabFolder.setSelection( fBehaviorSelectionTabItem );
break;
- case ANALYSIS_PROFILE_MODEL_TEST_OFFLINE:
+ case ANALYSIS_TEST_OFFLINE_PROFILE:
fTabFolder.setSelection( (fTestOfflineTabItem != null) ?
fTestOfflineTabItem : fExplorationTabItem );
break;
- case ANALYSIS_PROFILE_MODEL_EXPLORATION:
+ case ANALYSIS_EXPLORATION_PROFILE:
default:
fTabFolder.setSelection( fExplorationTabItem );
break;
}
-
+
handleModelAnalysisProfileSelectionChange();
}
@@ -253,25 +258,26 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
if( fModelAnalysisProfileSelectionTabItem != null ) {
fModelAnalysisProfileSelectionTabItem.setImage(null);
}
-
+
fModelAnalysisProfileSelectionTabItem =
fTabFolder.getItem( fTabFolder.getSelectionIndex() );
- fModelAnalysisProfile = fModelAnalysisProfileSelectionTabItem.getText();
-
+ fModelAnalysisProfile = AnalysisProfileKind.get(
+ fModelAnalysisProfileSelectionTabItem.getText());
+
fModelAnalysisProfileSelectionTabItem.setImage(
- ImageResources.getImageDescriptor(
- ImageResources.IMAGE__VALIDATE_ICON).createImage());
+ ImageResources.getImage(ImageResources.IMAGE__VALIDATE_ICON));
}
///////////////////////////////////////////////////////////////////////////
// Fields Editors API
///////////////////////////////////////////////////////////////////////////
-
+
+ @Override
public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
- ANALYSIS_PROFILE_MODEL_EXPLORATION);
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE.getLiteral());
// MODEL EXPLORATION
fExplorationPage.setDefaults(configuration);
@@ -288,16 +294,24 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
}
}
+ @Override
public void initializeFromImpl(ILaunchConfiguration configuration) {
try {
- fModelAnalysisProfile = configuration.getAttribute(
+ final String strModelAnalysisProfile = configuration.getAttribute(
ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
- ANALYSIS_PROFILE_MODEL_EXPLORATION);
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE.getLiteral());
+
+ fConfigurationPage.propertyChange(
+ new PropertyChangeEvent(this,
+ ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
+ fModelAnalysisProfile, fModelAnalysisProfile) );
+
+ fModelAnalysisProfile = AnalysisProfileKind.get(strModelAnalysisProfile);
}
catch (CoreException e) {
e.printStackTrace();
-
- fModelAnalysisProfile = ANALYSIS_PROFILE_MODEL_EXPLORATION;
+
+ fModelAnalysisProfile = AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
}
setVisibleModelAnalysisProfilePage( fModelAnalysisProfile );
@@ -321,11 +335,13 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
}
+ @Override
public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
- ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE, fModelAnalysisProfile);
+ ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
+ fModelAnalysisProfile.getLiteral());
//System.err.println("+++++" + fModelAnalysisProfile);
-
+
// MODEL EXPLORATION
fExplorationPage.performApply(configuration);
@@ -348,7 +364,7 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
@Override
protected boolean isValidImpl(ILaunchConfiguration launchConfig) {
switch( fModelAnalysisProfile ) {
- case ANALYSIS_PROFILE_MODEL_EXPLORATION: {
+ case ANALYSIS_EXPLORATION_PROFILE: {
// MODEL EXPLORATION ANALYSIS
if( ! fExplorationPage.isValid(launchConfig) )
{
@@ -358,7 +374,7 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
break;
}
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR: {
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE: {
// BEHAVIOR SELECTION ANALYSIS
if( ! fBehaviorSelectionPage.isValid(launchConfig) )
{
@@ -367,7 +383,7 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
break;
}
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION: {
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE: {
// TRANSITION COVERAGE ANALYSIS
if( ! fTransitionCoveragePage.isValid(launchConfig) )
{
@@ -377,7 +393,7 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
break;
}
- case ANALYSIS_PROFILE_MODEL_TEST_OFFLINE: {
+ case ANALYSIS_TEST_OFFLINE_PROFILE: {
// TEST OFFLINE // INCUBATION MODE
if( fTestOfflinePage != null ) {
if( ! fTestOfflinePage.isValid(launchConfig) )
@@ -395,21 +411,21 @@ public class OverviewAnalysisProfileSection extends AbstractConfigurationSection
return true;
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@Override
public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
- fExplorationPage.handleConfigurationPropertyChange(event);
-
- fTransitionCoveragePage.handleConfigurationPropertyChange(event);
-
- fBehaviorSelectionPage.handleConfigurationPropertyChange(event);
-
+ fExplorationPage.handleConfigurationPropertyChange(event);
+
+ fTransitionCoveragePage.handleConfigurationPropertyChange(event);
+
+ fBehaviorSelectionPage.handleConfigurationPropertyChange(event);
+
if( fTestOfflinePage != null ) {
- fTestOfflinePage.handleConfigurationPropertyChange(event);
+ fTestOfflinePage.handleConfigurationPropertyChange(event);
}
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewBehaviorSelectionConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewBehaviorSelectionConfigurationProfile.java
index 1fbd320..101a665 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewBehaviorSelectionConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewBehaviorSelectionConfigurationProfile.java
@@ -17,38 +17,42 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationPage;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationProfile;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
+import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
import org.eclipse.efm.execution.configuration.common.ui.editors.IntegerFieldEditor;
-import org.eclipse.efm.execution.configuration.common.ui.editors.StringFieldEditor;
-import org.eclipse.swt.SWT;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableConfigProvider;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
public class OverviewBehaviorSelectionConfigurationProfile extends AbstractConfigurationProfile {
- private Group groupSelectionHeuristic;
-
+ private TraceElementTableViewer fTraceElementTableViewer;
+
+ private Group groupTraceSequenceOption;
+
+ private Group groupOptionSelectionHeuristic;
+
private Group groupExplorationHeuristic;
private IntegerFieldEditor fHoJLocalHeight;
private IntegerFieldEditor fHoJTrialLimit;
-
+
private Group groupHitOrJumpHeuristic;
private IntegerFieldEditor fHoJHitCount;
private IntegerFieldEditor fHoJJumpCount;
- private Group groupTraceSequence;
-
- private StringFieldEditor fBehaviorSpecificationStringField;
-
-
/**
* Constructor
* @param parentTab
*/
- public OverviewBehaviorSelectionConfigurationProfile(AbstractConfigurationPage configurationPage) {
+ public OverviewBehaviorSelectionConfigurationProfile(
+ AbstractConfigurationPage configurationPage) {
super(configurationPage);
}
@@ -63,40 +67,69 @@ public class OverviewBehaviorSelectionConfigurationProfile extends AbstractConfi
return "Behavior Selection, configuration section";
}
-
+
+ private TraceElementTableConfigProvider getTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_BEHAVIOR_ANALYSIS_ELEMENT_NAME_LIST, BEHAVIOR_INITIAL_SAMPLE,
+ "&Trace Sequence", BEHAVIOR_DESCRIPTION, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.BEHAVIOR_SELECTION_TRACE_ELEMENT,
+ TraceElementKind.TRANSITION);
+ }
+
+
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit) {
parent.setToolTipText(BEHAVIOR_DESCRIPTION);
Composite container = widgetToolkit.createComposite(
- parent, 1, 1, GridData.FILL_HORIZONTAL);
-
+ parent, 2, 1, GridData.FILL_HORIZONTAL);
+
// Trace Sequence
- groupTraceSequence = widgetToolkit.createGroup(
- container, "&Trace Sequence ", 1, 1, GridData.FILL_HORIZONTAL);
+ fTraceElementTableViewer = new TraceElementTableViewer(this,
+ container, 1, widgetToolkit, getTableConfig(parent.getFont()));
+
+ // Options & Selection Heuristic
+ groupOptionSelectionHeuristic = widgetToolkit.createGroup(container,
+ "&Options && Selection Heuristic ", 1, 1, GridData.FILL_BOTH);
+
+ // Sequence Options
+ groupTraceSequenceOption = widgetToolkit.createGroup(groupOptionSelectionHeuristic,
+ "&Sequence Option ", 1, 1, GridData.FILL_BOTH);
+
+ Composite compOptions = widgetToolkit.createComposite(
+ groupTraceSequenceOption, 1, 1, GridData.FILL_HORIZONTAL);
+ BooleanFieldEditor fieldEditor = new BooleanFieldEditor(fConfigurationPage,
+ ATTR_BEHAVIOR_SELECTION_HOJ_SCHEDULER_ORDERED,
+ "&Ordered", compOptions, true);
+ fieldEditor.setToolTipText("Search ordered traces");
+ addFieldEditor( fieldEditor );
+
+ compOptions = widgetToolkit.createComposite(
+ groupTraceSequenceOption, 1, 1, GridData.FILL_HORIZONTAL);
+ fieldEditor = new BooleanFieldEditor(fConfigurationPage,
+ ATTR_BEHAVIOR_SELECTION_HOJ_HIT_CONSECUTIVE,
+ "&Consecutive", compOptions, false);
+ fieldEditor.setToolTipText(
+ "Search ordered traces with consecutive observables");
+ addFieldEditor( fieldEditor );
+
+ fieldEditor = new BooleanFieldEditor(fConfigurationPage,
+ ATTR_BEHAVIOR_SELECTION_HOJ_HIT_FOLDING,
+ "&Folding", compOptions, true);
+ fieldEditor.setToolTipText(
+ "Enabled verification of multiple trace properties per Symbex State");
+ addFieldEditor( fieldEditor );
+
- Composite comp = widgetToolkit.createComposite(
- groupTraceSequence, 1, 1, GridData.FILL_HORIZONTAL);
-
- fBehaviorSpecificationStringField = new StringFieldEditor(fConfigurationPage,
- ATTR_BEHAVIOR_ANALYSIS_ELEMENT_NAME_LIST, "",
- comp, BEHAVIOR_DESCRIPTION, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- fBehaviorSpecificationStringField.setToolTipText(BEHAVIOR_DESCRIPTION);
- addField(fBehaviorSpecificationStringField);
-
-
- // Selection Heuristic
- groupSelectionHeuristic = widgetToolkit.createGroup(container,
- "&Exploration && Selection Heuristic ", 2, 1, GridData.FILL_HORIZONTAL);
-
-// comp = widgetToolkit.createComposite(
-// groupSelectionHeuristic, 1, 1, GridData.FILL_HORIZONTAL);
-
// Exploration Heuristic
- groupExplorationHeuristic = widgetToolkit.createGroup(groupSelectionHeuristic,
- "&Local Exploration Limit ", 1, 1, GridData.FILL_HORIZONTAL);
+ groupExplorationHeuristic = widgetToolkit.createGroup(groupOptionSelectionHeuristic,
+ "&Local Exploration Limit ", 1, 1, GridData.FILL_BOTH);
- comp = widgetToolkit.createComposite(
+ Composite comp = widgetToolkit.createComposite(
groupExplorationHeuristic, 1, 1, GridData.FILL_HORIZONTAL);
// Local exploration height before the next selection by HIT or JUMP
@@ -105,7 +138,7 @@ public class OverviewBehaviorSelectionConfigurationProfile extends AbstractConfi
"&Height :", comp, 6);
fHoJLocalHeight.setToolTipText(
"Local exploration height before the next selection by HIT or JUMP");
- addField( fHoJLocalHeight );
+ addFieldEditor( fHoJLocalHeight );
// Local exploration trials number
fHoJTrialLimit = new IntegerFieldEditor(fConfigurationPage,
@@ -113,31 +146,31 @@ public class OverviewBehaviorSelectionConfigurationProfile extends AbstractConfi
"&Trials :", comp, -1);
fHoJTrialLimit.setToolTipText(
"Local exploration trials number for the Trace Sequence Coverage");
- addField( fHoJTrialLimit );
+ addFieldEditor( fHoJTrialLimit );
// HIT or JUMP Heuristic
- groupHitOrJumpHeuristic = widgetToolkit.createGroup(groupSelectionHeuristic,
- "&Hit or Jump Selection Count ", 1, 1, GridData.FILL_HORIZONTAL);
+ groupHitOrJumpHeuristic = widgetToolkit.createGroup(groupOptionSelectionHeuristic,
+ "&Hit or Jump Selection Count ", 1, 1, GridData.FILL_BOTH);
comp = widgetToolkit.createComposite(
groupHitOrJumpHeuristic, 1, 1, GridData.FILL_HORIZONTAL);
-
-
+
+
// Number of paths to choose from HIT
fHoJHitCount = new IntegerFieldEditor(fConfigurationPage,
ATTR_BEHAVIOR_SELECTION_HOJ_HIT_COUNT,
"&Hit :", comp, 1);
fHoJHitCount.setToolTipText(
"Number of paths to choose when HIT (i.e. new properties have been covered)");
- addField( fHoJHitCount );
-
+ addFieldEditor( fHoJHitCount );
+
// Number of paths to choose from JUMP
fHoJJumpCount = new IntegerFieldEditor(fConfigurationPage,
ATTR_BEHAVIOR_SELECTION_HOJ_JUMP_COUNT,
"&Jump :", comp, 1);
fHoJJumpCount.setToolTipText(
"Number of paths to choose when JUMP (i.e. no new property covered)");
- addField( fHoJJumpCount );
+ addFieldEditor( fHoJJumpCount );
}
@@ -159,16 +192,20 @@ public class OverviewBehaviorSelectionConfigurationProfile extends AbstractConfi
@Override
protected void initializeFromImpl(ILaunchConfiguration configuration) {
- //!! NOTHING
+ fTraceElementTableViewer.initializeFrom( configuration );
}
@Override
protected void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
- //!! NOTHING
+ fTraceElementTableViewer.performApply( configuration );
}
@Override
protected boolean isValidImpl(ILaunchConfiguration launchConfig) {
+ if( !fTraceElementTableViewer.isValid( launchConfig ) ) {
+ return false;
+ }
+
// Exploration Heuristic Validation
if( ! fHoJLocalHeight.isValid() ) {
setErrorMessage("Jump Height is not a valid integer");
@@ -187,61 +224,6 @@ public class OverviewBehaviorSelectionConfigurationProfile extends AbstractConfi
return false;
}
- // Trace Sequence Validation
- String[] tabString = fBehaviorSpecificationStringField
- .getStringValue().split(";\n");
-
- String kind;
- int pos;
-
- for(String eltString : tabString) {
- eltString = eltString.trim();
-
- if( eltString.length() == 0 ) {
- setErrorMessage("You must select at least one element");
- return false;
- }
- else if( eltString.startsWith("//") ) {
- //!! COMMENT
- }
- else if( (pos = eltString.indexOf('=')) > 0 ) {
- kind = eltString.substring(0, pos).trim();
-// object = eltString.substring(pos+1).trim();
-
- if( kind.equals( "transition" ) ) {
- // Check if the object is a transition and exists !
- }
- else if( kind.equals( "state" ) ) {
- // Check if the object is a state and exists !
- }
-
- else if( kind.equals( "input" ) ) {
- // Check if the object is an input port/signal and exists !
- }
- else if( kind.equals( "output" ) ) {
- // Check if the object is an output port/signal and exists !
- }
-
- else if( kind.equals( "inout" ) ) {
- // Check if the object is an inout port/signal and exists !
- }
- else if( kind.equals( "com" ) ) {
- // Check if the object is a communicated port/signal and exists !
- }
-
- else {
- setErrorMessage("The element \"" +
- eltString + "\" is not a valid element");
- return false;
- }
- }
- else {
- setErrorMessage("The element \"" +
- eltString + "\" is not a valid element");
- return false;
- }
- }
-
return true;
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewConfigurationPage.java
index 3870799..027329e 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewConfigurationPage.java
@@ -22,7 +22,7 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationPage;
import org.eclipse.efm.execution.configuration.common.ui.api.ILaunchConfigurationGUIelement;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
-import org.eclipse.efm.execution.configuration.common.ui.util.GenericCompositeCreator;
+import org.eclipse.efm.execution.core.util.WorkflowFileUtils;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.util.PropertyChangeEvent;
@@ -69,10 +69,22 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
public OverviewConfigurationPage(ILaunchConfigurationGUIelement masterGUIelement) {
super(masterGUIelement);
-
+
fAnalysisProfileSection = new OverviewAnalysisProfileSection(this);
-
+
fOverviewWorkspaceDataSection = new OverviewWorkspaceDataSection(this);
+
+ fOverviewWorkspaceDataSection.setExpanded(false);
+ }
+
+ @Override
+ public String getSectionTitle() {
+ return "Overview";
+ }
+
+ @Override
+ public String getSectionDescription() {
+ return "Overview";
}
@@ -84,9 +96,13 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
public void modifyText(ModifyEvent evt) {
propagateUpdateJobScheduling();
+ final String absolutePath =
+ WorkflowFileUtils.makeAbsoluteLocation(
+ fModelPathText.getText());
+
propertyChange( new PropertyChangeEvent(this,
ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
- fModelPathText.getText(), fModelPathText.getText()) );
+ absolutePath, absolutePath) );
}
};
@@ -129,7 +145,9 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
Composite comp = widgetToolkit.createComposite(group, 3, 1, GridData.FILL_HORIZONTAL);
- fModelPathText = widgetToolkit.createSingleText(comp, 1);
+ fModelPathText = widgetToolkit.createText(comp,
+ SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL,
+ 1, GridData.FILL_HORIZONTAL);
fModelPathText.getAccessible().addAccessibleListener(
new AccessibleAdapter() {
@Override
@@ -138,7 +156,7 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
}
} );
- fModelWorkspaceBrowse = widgetToolkit.createPushButton(comp, "&Workspace...");
+ fModelWorkspaceBrowse = widgetToolkit.createPushButton(comp, "&Workspace...", null);
fModelPathText.addModifyListener(fBasicModifyListener);
@@ -163,8 +181,11 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
if(resource != null) {
fProjectName = resource.getProject().getName();
- String specFile = resource.getLocation().toString();
- fModelPathText.setText(specFile);
+ fModelPathText.setText(
+ WorkflowFileUtils.makeRelativeLocation(
+ resource.getLocation()));
+ fModelPathText.setToolTipText(
+ resource.getLocation().toString());
fOverviewWorkspaceDataSection.updateWorkspaceRootPath(resource);
}
@@ -178,7 +199,7 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
protected void createWorkspaceComponent(Composite parent, IWidgetToolkit widgetToolkit) {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
Action[] toputinbar = getActionsByStringKey(new String[]{"action_apply_changes"});
- GenericCompositeCreator.fillToolBar(toolBarManager, toputinbar);
+ widgetToolkit.fillToolBar(toolBarManager, toputinbar);
fOverviewWorkspaceDataSection.createControl(parent, toolBarManager, widgetToolkit);
}
@@ -186,8 +207,8 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
protected void createAnalyseProfileComponent(Composite parent, IWidgetToolkit widgetToolkit) {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
Action[] toputinbar = getActionsByStringKey(new String[]{"action_apply_changes"});
- GenericCompositeCreator.fillToolBar(toolBarManager, toputinbar);
-
+ widgetToolkit.fillToolBar(toolBarManager, toputinbar);
+
fAnalysisProfileSection.createControl(parent, toolBarManager, widgetToolkit);
}
@@ -197,7 +218,7 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_SPECIFICATION_PROJECT_NAME, "<project-name>");
@@ -205,7 +226,7 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
configuration.setAttribute(
ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
-
+
// WORKSPACE DATA
fOverviewWorkspaceDataSection.setDefaults(configuration);
@@ -214,20 +235,24 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
}
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
try {
fProjectName = configuration.getAttribute(
ATTR_SPECIFICATION_PROJECT_NAME, "");
-
- String specMainFileLocation = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
- DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
+
+ String specMainFileLocation =
+ WorkflowFileUtils.getRelativeLocation(configuration,
+ ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
+ DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
fModelPathText.setText( specMainFileLocation );
+
+ fModelPathText.setToolTipText(
+ WorkflowFileUtils.makeAbsoluteLocation(specMainFileLocation));
}
catch (CoreException e) {
e.printStackTrace();
}
-
+
// WORKSPACE DATA
fOverviewWorkspaceDataSection.initializeFrom(configuration);
@@ -237,13 +262,12 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration) {
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_SPECIFICATION_PROJECT_NAME, fProjectName);
- configuration.setAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
- fModelPathText.getText());
+ WorkflowFileUtils.setRelativeLocation(configuration,
+ ATTR_SPECIFICATION_MODEL_FILE_LOCATION, fModelPathText.getText());
// WORKSPACE DATA
fOverviewWorkspaceDataSection.performApply(configuration);
@@ -257,10 +281,11 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
String messageToSend = null;
- String filePath = fModelPathText.getText();
+ String filePath = WorkflowFileUtils.makeAbsoluteLocation(
+ fModelPathText.getText() );
if( (filePath == null) || filePath.isEmpty() ) {
messageToSend = "The resource model file path is empty (or null)";
}
@@ -283,15 +308,17 @@ public class OverviewConfigurationPage extends AbstractConfigurationPage {
return new FieldValidationReturn(isValid, messageToSend);
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@Override
- protected void handleConfigurationPropertyChange(PropertyChangeEvent event) {
- fOverviewWorkspaceDataSection.handleConfigurationPropertyChange(event);
-
- fAnalysisProfileSection.handleConfigurationPropertyChange(event);
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
+ fOverviewWorkspaceDataSection.handleConfigurationPropertyChange(event);
+
+ fAnalysisProfileSection.handleConfigurationPropertyChange(event);
+
+ getMasterGUIelement().handleConfigurationPropertyChange(event);
}
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewExplorationConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewExplorationConfigurationProfile.java
index 4754689..771c255 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewExplorationConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewExplorationConfigurationProfile.java
@@ -19,6 +19,7 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationProfile;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
//import org.eclipse.efm.execution.configuration.common.ui.page.supervisor.SupervisorEvaluationLimitsSection;
//import org.eclipse.efm.execution.configuration.common.ui.page.supervisor.SupervisorGraphSizeLimitsSection;
import org.eclipse.efm.execution.core.workflow.common.GraphExplorationStrategyKind;
@@ -41,10 +42,10 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
private GraphExplorationStrategyKind fAnalyzeStrategy =
GraphExplorationStrategyKind.BREADTH_FIRST_SEARCH;
-
-
+
+
// private SupervisorGraphSizeLimitsSection fGraphSizeLimitsSection;
-//
+//
// private SupervisorEvaluationLimitsSection fEvaluationLimitsSection;
@@ -52,16 +53,16 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
private BooleanFieldEditor fApplyInclusionBooleanField;
private Composite fLoopDetectionTrivialComposite;
-
+
/**
* Constructor
* @param parentTab
*/
public OverviewExplorationConfigurationProfile(AbstractConfigurationPage configurationPage) {
super(configurationPage);
-
+
// fGraphSizeLimitsSection = new SupervisorGraphSizeLimitsSection(configurationPage);
-//
+//
// fEvaluationLimitsSection = new SupervisorEvaluationLimitsSection(configurationPage);
}
@@ -77,7 +78,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
+ "set a limitation in Supervisor Tab";
}
-
+
private final class TabListener extends SelectionAdapter {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -135,7 +136,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
}
-
+
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit)
{
@@ -144,7 +145,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
createControlInclusionCriterion(parent, widgetToolkit);
// fGraphSizeLimitsSection.createControl(parent, widgetToolkit);
-//
+//
// fEvaluationLimitsSection.createControl(parent, widgetToolkit);
}
@@ -161,9 +162,9 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
new BooleanFieldEditor(this.fConfigurationPage,
ATTR_ENABLED_REDUNDANCY_INCLUSION_CRITERION,
"&Apply Inclusion", comp, false);
- addField(fApplyInclusionBooleanField);
+ addFieldEditor(fApplyInclusionBooleanField);
+
-
fLoopDetectionTrivialComposite = widgetToolkit.createComposite(
fGroupInclusionCriterion, 2, 1, GridData.FILL_HORIZONTAL);
@@ -172,8 +173,8 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
ATTR_ENABLED_REDUNDANCY_LOOP_DETECTION_TRIVIAL,
"&Loop Detection Trivial",
fLoopDetectionTrivialComposite, false);
- addField(loopDetectionTrivialBooleanField);
-
+ addFieldEditor(loopDetectionTrivialBooleanField);
+
fApplyInclusionBooleanField.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -182,7 +183,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
});
}
-
+
private void handleEnablingRedundancyDetection() {
fConfigurationPage.setVisibleAndEnabled(fLoopDetectionTrivialComposite,
! fApplyInclusionBooleanField.getBooleanValue());
@@ -221,9 +222,9 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
configuration.setAttribute(ATTR_ENABLED_REDUNDANCY_INCLUSION_CRITERION, false);
configuration.setAttribute(ATTR_ENABLED_REDUNDANCY_LOOP_DETECTION_TRIVIAL, true);
-
+
// fGraphSizeLimitsSection.setDefaults(configuration);
-//
+//
// fEvaluationLimitsSection.setDefaults(configuration);
}
@@ -233,7 +234,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
// Case Analyze Strategy
//
GraphExplorationStrategyKind oldAnalyzeStrategy = fAnalyzeStrategy;
-
+
try {
fAnalyzeStrategy = GraphExplorationStrategyKind.get(
configuration.getAttribute(ATTR_SPECIFICATION_ANALYZE_STRATEGY,
@@ -249,15 +250,15 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
}
// fGraphSizeLimitsSection.initializeFrom(configuration);
-//
+//
// fEvaluationLimitsSection.initializeFrom(configuration);
-
+
initializeAnalyzeStrategy();
-
+
handleEnablingRedundancyDetection();
}
-
+
private void initializeAnalyzeStrategy() {
fBFSButton.setSelection(false);
fDFSButton.setSelection(false);
@@ -279,7 +280,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
break;
default:
fBFSButton.setSelection(true);
-
+
fAnalyzeStrategy =
GraphExplorationStrategyKind.BREADTH_FIRST_SEARCH;
break;
@@ -294,9 +295,9 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
configuration.setAttribute(
ATTR_SPECIFICATION_ANALYZE_STRATEGY,
fAnalyzeStrategy.getLiteral());
-
+
// fGraphSizeLimitsSection.performApply(configuration);
-//
+//
// fEvaluationLimitsSection.performApply(configuration);
}
@@ -305,7 +306,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
return true;
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@@ -314,10 +315,10 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
switch( event.getProperty() ) {
case ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE:
- switch( event.getNewValue().toString() ) {
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR:
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION:
- case ANALYSIS_PROFILE_MODEL_TEST_OFFLINE: {
+ switch( (AnalysisProfileKind) event.getNewValue() ) {
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE:
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE:
+ case ANALYSIS_TEST_OFFLINE_PROFILE: {
fDFSButton.setSelection(false);
fRFSButton.setSelection(false);
fALLButton.setSelection(false);
@@ -326,7 +327,7 @@ public class OverviewExplorationConfigurationProfile extends AbstractConfigurati
break;
}
- case ANALYSIS_PROFILE_MODEL_EXPLORATION:
+ case ANALYSIS_EXPLORATION_PROFILE:
default:
break;
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTestOfflineConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTestOfflineConfigurationProfile.java
index 6bd4e0e..1aaeae8 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTestOfflineConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTestOfflineConfigurationProfile.java
@@ -21,18 +21,21 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationProfile;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
-import org.eclipse.efm.execution.configuration.common.ui.editors.StringFieldEditor;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableConfigProvider;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
import org.eclipse.efm.execution.core.Activator;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleAdapter;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -58,8 +61,36 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
private BooleanFieldEditor fEnabledTraceConfigurationBooleanField;
- private Group fGroupObservable;
- private Group fGroupControllable;
+ private TraceElementTableViewer fObservableTraceTableViewer;
+
+ private TraceElementTableConfigProvider getObservableTraceTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
+ DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
+ "&Observable", "", true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.GRAPHVIZ_TRACE_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
+
+ private TraceElementTableViewer fControllableTraceTableViewer;
+
+ private TraceElementTableConfigProvider getControllableTraceTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
+ DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
+ "&Controllable", "", true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.GRAPHVIZ_TRACE_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
+
/**
* Constructor
@@ -106,7 +137,7 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
return "Offline Testing, configuration section";
}
-
+
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit) {
// SWTFactory.createGroup(
@@ -130,7 +161,7 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
fTracePathText.addModifyListener(fBasicModifyListener);
fTraceWorkspaceBrowse =
- widgetToolkit.createPushButton(comp, "&Workspace...");
+ widgetToolkit.createPushButton(comp, "&Workspace...", null);
fTraceWorkspaceBrowse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -175,7 +206,7 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
fTestPurposePathText.addModifyListener(fBasicModifyListener);
fTestPurposeWorkspaceBrowse =
- widgetToolkit.createPushButton(comp, "&Workspace...");
+ widgetToolkit.createPushButton(comp, "&Workspace...", null);
fTestPurposeWorkspaceBrowse.addSelectionListener(
new SelectionAdapter() {
@Override
@@ -226,29 +257,15 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
}
});
+ fObservableTraceTableViewer =
+ new TraceElementTableViewer(null, comp, 1, widgetToolkit,
+ getObservableTraceTableConfig(parent.getFont()));
+ addTableViewer(fObservableTraceTableViewer);
- fGroupObservable = widgetToolkit.createGroup(parent,
- "&Observable", 1, 1, GridData.FILL_HORIZONTAL);
- fGroupObservable.setToolTipText(TEST_OFFLINE_OBSERVABLE);
-
- StringFieldEditor textStringField =
- new StringFieldEditor(fConfigurationPage,
- ATTR_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
- "", fGroupObservable,
- DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- addField(textStringField);
-
- fGroupControllable = widgetToolkit.createGroup(parent,
- "&Controllable", 1, 1, GridData.FILL_HORIZONTAL);
- fGroupControllable.setToolTipText(TEST_OFFLINE_CONTROLLABLE);
-
- textStringField = new StringFieldEditor(fConfigurationPage,
- ATTR_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
- "", fGroupControllable,
- DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- addField(textStringField);
+ fControllableTraceTableViewer =
+ new TraceElementTableViewer(null, comp, 1, widgetToolkit,
+ getControllableTraceTableConfig(parent.getFont()));
+ addTableViewer(fControllableTraceTableViewer);
}
@@ -256,12 +273,13 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
boolean enabled =
fEnabledTraceConfigurationBooleanField.getBooleanValue();
- fConfigurationPage.propagateVisibility(fGroupObservable, enabled);
- fConfigurationPage.propagateVisibility(fGroupControllable, enabled);
+ fConfigurationPage.propagateVisibility(
+ fObservableTraceTableViewer.getControl(), enabled);
+ fConfigurationPage.propagateVisibility(
+ fControllableTraceTableViewer.getControl(), enabled);
}
-
@Override
protected void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
@@ -342,7 +360,7 @@ public class OverviewTestOfflineConfigurationProfile extends AbstractConfigurati
return false;
}
-
+
filePath = fTestPurposePathText.getText();
if( (filePath == null) || filePath.isEmpty() ) {
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTransitionCoverageConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTransitionCoverageConfigurationProfile.java
index 22ae9c8..41d613a 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTransitionCoverageConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewTransitionCoverageConfigurationProfile.java
@@ -20,41 +20,46 @@ import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationPage;
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationProfile;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableConfigProvider;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
+import org.eclipse.efm.execution.core.util.WorkflowFileUtils;
+import org.eclipse.efm.execution.core.workflow.common.TraceElement;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementCustomImpl;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
public class OverviewTransitionCoverageConfigurationProfile extends AbstractConfigurationProfile {
public BooleanFieldEditor fEnabledDetailedSelectionBooleanField;
- public Composite fCompDetailedSelection;
+ private TraceElementTableViewer fTransitionTraceElementTableViewer;
+
+ private TraceElementTableConfigProvider getTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_TRANSITION_COVERAGE_SELECTION, BEHAVIOR_INITIAL_SAMPLE,
+ "&Transition selection", BEHAVIOR_DESCRIPTION, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.TRANSITION_TRACE_ELEMENT,
+ TraceElementKind.TRANSITION);
+ }
- private Table fModelTransitionsTable;
- private TableColumn fModelTransitionsTableColumn;
- private Table fSelectedTransitionsTable;
- private TableColumn fSelectedTransitionsTableColumn;
private List< String > fAllTransitionsList;
- private List< String > fSelectedTransitionsList;
private String fModelFilePath;
@@ -85,7 +90,7 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
return "Transition Coverage, configuration section";
}
-
+
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit)
{
@@ -93,8 +98,8 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
new BooleanFieldEditor(fConfigurationPage,
ATTR_ENABLED_TRANSITION_COVERAGE_DETAILS_SELECTION,
"&Enable Transitions Selection", parent, false);
- addField(fEnabledDetailedSelectionBooleanField);
-
+ addFieldEditor(fEnabledDetailedSelectionBooleanField);
+
fEnabledDetailedSelectionBooleanField.
setPropertyChangeListener(fConfigurationPage);
@@ -108,127 +113,14 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
// ==================================================================================
- fCompDetailedSelection = widgetToolkit.createComposite(
- parent, 2, 1, GridData.FILL_HORIZONTAL);
-
- fModelTransitionsTable = new Table(
- fCompDetailedSelection, SWT.CHECK | SWT.BORDER);
- fModelTransitionsTableColumn =
- new TableColumn (fModelTransitionsTable, SWT.NONE);
- fModelTransitionsTableColumn.setText("Model Transitions");
- fModelTransitionsTable.setHeaderVisible(true);
-
- fSelectedTransitionsTable =
- new Table(fCompDetailedSelection, SWT.BORDER);
- fSelectedTransitionsTableColumn =
- new TableColumn(fSelectedTransitionsTable, SWT.NONE);
- fSelectedTransitionsTableColumn.setText("Selected transitions");
- fSelectedTransitionsTable.setHeaderVisible(true);
-
- int listHeight = fModelTransitionsTable.getItemHeight() * 10;
- Rectangle trim = fModelTransitionsTable.computeTrim(0, 0, 0, listHeight);
-
- GridData gridDataLeft = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridDataLeft.heightHint = trim.height;
- gridDataLeft.horizontalIndent = 0;
- gridDataLeft.verticalIndent = 10;
- fModelTransitionsTable.setLayoutData(gridDataLeft);
-
- GridData gridDataRight = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridDataRight.heightHint = trim.height;
- gridDataRight.horizontalIndent = 0;
- gridDataRight.verticalIndent = 10;
- fSelectedTransitionsTable.setLayoutData(gridDataRight);
-
- fModelTransitionsTable.addSelectionListener(
- new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- boolean refresh = false;
-
- if( e.item instanceof TableItem )
- {
- TableItem selectedItem = (TableItem)( e.item );
-
- String strItem = selectedItem.getText();
-
- if( selectedItem.getChecked() )
- {
- if( ! fSelectedTransitionsList.contains(strItem) )
- {
- fSelectedTransitionsList.add(strItem);
- refresh = true;
- }
- }
- else if( fSelectedTransitionsList.contains(strItem) )
- {
- fSelectedTransitionsList.remove(strItem);
- refresh = true;
- }
- }
-
- if( refresh ) {
- fSelectedTransitionsList.sort(null);
-
- fSelectedTransitionsTable.removeAll();
-
- for(int i = 0; i < fSelectedTransitionsList.size(); i++)
- {
- TableItem item = new TableItem(
- fSelectedTransitionsTable, SWT.NONE);
-
- item.setText( fSelectedTransitionsList.get(i) );
- }
- }
-
- fConfigurationPage.propagateGUIupdate();
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- fConfigurationPage.propagateGUIupdate();
- }
- });
-
- fSelectedTransitionsTable.addMouseListener( new MouseListener() {
- @Override
- public void mouseUp(MouseEvent e) {
- }
-
- @Override
- public void mouseDown(MouseEvent e) {
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- String strItem2;
- for( int index : fSelectedTransitionsTable.getSelectionIndices() )
- {
- strItem2 = fSelectedTransitionsTable.getItem(index).getText();
-
- for( TableItem tableItem1 : fModelTransitionsTable.getItems() )
- {
- if( tableItem1.getText().equals(strItem2) )
- {
- fSelectedTransitionsList.remove(strItem2);
-
- tableItem1.setChecked(false);
-
- fSelectedTransitionsTable.remove(index);
-
- fConfigurationPage.propagateGUIupdate();
-
- break;
- }
- }
- }
- }
- });
+ fTransitionTraceElementTableViewer = new TraceElementTableViewer(this,
+ parent, 1, widgetToolkit, getTableConfig(parent.getFont()));
}
private void handleEnablingDetailedSelection() {
- fConfigurationPage.propagateVisibility(fCompDetailedSelection,
+ fConfigurationPage.propagateVisibility(
+ fTransitionTraceElementTableViewer.getControl(),
fEnabledDetailedSelectionBooleanField.getBooleanValue());
}
@@ -236,13 +128,17 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
private void initTransitionTable() {
loadTransitionListToBeSelected();
- fModelTransitionsTable.removeAll();
+ fTransitionTraceElementTableViewer.removeAll();
- for(int i = 0; i < fAllTransitionsList.size(); i++) {
- TableItem item = new TableItem(fModelTransitionsTable, SWT.NONE);
- item.setChecked(false);
- item.setText( fAllTransitionsList.get(i) );
+ TraceElement[] transitionsTrace =
+ new TraceElement[fAllTransitionsList.size()];
+ int offset = -1;
+ for( String transition : fAllTransitionsList ) {
+ transitionsTrace[ ++offset ] = new TraceElementCustomImpl(
+ true, TraceElementKind.TRANSITION, transition);
}
+
+ fTransitionTraceElementTableViewer.setInput(transitionsTrace);
}
public void handleModelFilePathChanged(String modelFilePath) {
@@ -255,40 +151,13 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
}
public void updateTransitionTables() {
- fSelectedTransitionsTable.removeAll();
+ fTransitionTraceElementTableViewer.removeAll();
if( (fAllTransitionsList == null)
|| fAllTransitionsList.isEmpty() )
{
initTransitionTable();
}
-
- if( (fAllTransitionsList != null)
- && (fSelectedTransitionsList != null)
- && (! fAllTransitionsList.isEmpty())
- && (! fSelectedTransitionsList.isEmpty()) )
- {
- for(int i = 0; i < fSelectedTransitionsList.size(); i++)
- {
- TableItem item = new TableItem(
- fSelectedTransitionsTable, SWT.NONE);
-
- item.setText( fSelectedTransitionsList.get(i) );
- }
-
-
- for(int i = 0; i < fAllTransitionsList.size(); i++)
- {
- if( fSelectedTransitionsList.contains(
- fAllTransitionsList.get(i)) )
- {
- fModelTransitionsTable.getItem( i ).setChecked(true);
- }
- }
- }
- else {
-// fSelectedTransitionsList.clear();
- }
}
private void loadTransitionListToBeSelected() {
@@ -361,26 +230,6 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
}
br.close();
fAllTransitionsList.sort(null);
-
- if( maxSizetransitionName <= 30 ) {
- fModelTransitionsTableColumn.setWidth(200);
- fSelectedTransitionsTableColumn.setWidth(200);
- }
-// else if( maxSizetransitionName <= 60 ) {
-// fModelTransitionsTableColumn.setWidth(
-// maxSizetransitionName * 9 + 30);
-// fSelectedTransitionsTableColumn.setWidth(
-// maxSizetransitionName * 9 + 10);
-// }
- else {
-// fModelTransitionsTableColumn.setWidth(700);
- fModelTransitionsTableColumn.setWidth(
- maxSizetransitionName * 9 + 30);
-
-// fSelectedTransitionsTableColumn.setWidth(700);
- fSelectedTransitionsTableColumn.setWidth(
- maxSizetransitionName * 9 + 10);
- }
}
} catch (Exception e) {
e.printStackTrace();
@@ -394,49 +243,27 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
configuration.setAttribute(
ATTR_ENABLED_TRANSITION_COVERAGE_DETAILS_SELECTION, false);
- configuration.setAttribute(
- ATTR_TRANSITION_COVERAGE_SELECTION, new ArrayList<String>());
+ configuration.setAttribute(ATTR_TRANSITION_COVERAGE_SELECTION, "");
}
@Override
protected void initializeFromImpl(ILaunchConfiguration configuration)
{
- try {
- fModelFilePath = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
- DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
- }
- catch( CoreException e2 ) {
- fModelFilePath = null;
- e2.printStackTrace();
- }
+ fModelFilePath = WorkflowFileUtils.getAbsoluteLocation(
+ configuration, ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
+ DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
handleEnablingDetailedSelection();
- try {
- fSelectedTransitionsList = new ArrayList<String>();
-
- fSelectedTransitionsList.addAll(
- configuration.getAttribute(
- ATTR_TRANSITION_COVERAGE_SELECTION,
- new ArrayList<String>()) );
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- fSelectedTransitionsList = new ArrayList<String>();
- }
-
- updateTransitionTables();
+ fTransitionTraceElementTableViewer.initializeFrom(configuration);
}
@Override
protected void performApplyImpl(ILaunchConfigurationWorkingCopy configuration)
{
- configuration.setAttribute(
- ATTR_TRANSITION_COVERAGE_SELECTION, fSelectedTransitionsList);
-
+ fTransitionTraceElementTableViewer.performApply(configuration);
+
if( fOverviewAnalysisProfileSection.isTransitionCoverage() )
{
configuration.setAttribute(ATTR_SPECIFICATION_ANALYZE_STRATEGY, "WEIGHT_BFS");
@@ -445,18 +272,15 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
@Override
protected boolean isValidImpl(ILaunchConfiguration launchConfig) {
- if( fEnabledDetailedSelectionBooleanField.getBooleanValue()
- && ( fSelectedTransitionsList.size() == 0 ) )
+ if( fEnabledDetailedSelectionBooleanField.getBooleanValue() )
{
- setErrorMessage("You must select at least one transition");
-
- return false;
+ return fTransitionTraceElementTableViewer.isValid(launchConfig);
}
return true;
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@@ -465,7 +289,7 @@ public class OverviewTransitionCoverageConfigurationProfile extends AbstractConf
switch( event.getProperty() ) {
case ATTR_SPECIFICATION_MODEL_FILE_LOCATION: {
handleModelFilePathChanged( event.getNewValue().toString() );
-
+
break;
}
default:
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewWorkspaceDataSection.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewWorkspaceDataSection.java
index 9eccee4..f20148c 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewWorkspaceDataSection.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/overview/OverviewWorkspaceDataSection.java
@@ -16,7 +16,6 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -25,15 +24,16 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationSection;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.StringFieldEditor;
+import org.eclipse.efm.execution.core.util.WorkflowFileUtils;
import org.eclipse.swt.widgets.Composite;
public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
private StringFieldEditor fWorkspaceRootLocationStringField;
-
+
private StringFieldEditor fWorkspaceOutputLocationStringField;
-
+
public OverviewWorkspaceDataSection(AbstractConfigurationPage configurationPage)
{
super(configurationPage);
@@ -50,7 +50,6 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
return "Enter forlders name for workspace configuration";
}
-
@Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit)
{
@@ -68,14 +67,14 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
fWorkspaceRootLocationStringField.setEnabled(false);
fWorkspaceRootLocationStringField.setToolTipText(toolTipText2);
fWorkspaceRootLocationStringField.setEmptyStringAllowed(false);
- addField(fWorkspaceRootLocationStringField);
+ addFieldEditor(fWorkspaceRootLocationStringField);
fWorkspaceOutputLocationStringField =
new StringFieldEditor(fConfigurationPage,
ATTR_WORKSPACE_OUTPUT_FOLDER_NAME, "Output :", parent,
DEFAULT_WORKSPACE_OUTPUT_FOLDER_NAME);
fWorkspaceOutputLocationStringField.setToolTipText(toolTipText2);
- addField(fWorkspaceOutputLocationStringField);
+ addFieldEditor(fWorkspaceOutputLocationStringField);
fWorkspaceOutputLocationStringField.setEmptyStringAllowed(false);
if( getConfigurationPage().isEnabledSymbexDeveloperMode() ) {
@@ -84,7 +83,7 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
ATTR_WORKSPACE_LOG_FOLDER_NAME, "Log :",
parent, DEFAULT_WORKSPACE_LOG_FOLDER_NAME);
folderNameStringFieldEditor.setToolTipText(toolTipText3);
- addField(folderNameStringFieldEditor);
+ addFieldEditor(folderNameStringFieldEditor);
folderNameStringFieldEditor.setEmptyStringAllowed(false);
folderNameStringFieldEditor =
@@ -92,18 +91,17 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
ATTR_WORKSPACE_DEBUG_FOLDER_NAME, "Debug :",
parent, DEFAULT_WORKSPACE_DEBUG_FOLDER_NAME);
folderNameStringFieldEditor.setToolTipText(toolTipText3);
- addField(folderNameStringFieldEditor);
+ addFieldEditor(folderNameStringFieldEditor);
folderNameStringFieldEditor.setEmptyStringAllowed(false);
}
}
-
+
@Override
public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
// WORKSPACE // DEVELOPER MODE
- configuration.setAttribute(
- ATTR_WORKSPACE_ROOT_LOCATION,
- DEFAULT_WORKSPACE_ROOT_LOCATION);
+ WorkflowFileUtils.setRelativeLocation(configuration,
+ ATTR_WORKSPACE_ROOT_LOCATION, DEFAULT_WORKSPACE_ROOT_LOCATION);
configuration.setAttribute(
ATTR_WORKSPACE_OUTPUT_FOLDER_NAME,
@@ -120,14 +118,15 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
}
}
-
+
public void updateWorkspaceRootPath(IResource resource) {
final String projectLocation =
resource.getProject().getLocation().toString();
-
+
fWorkspaceRootLocationStringField.setStringValue(
- projectLocation);
-
+ WorkflowFileUtils.makeRelativeLocation(projectLocation));
+ fWorkspaceRootLocationStringField.setToolTipText(projectLocation);
+
updateWorkspaceOutputPath( resource );
}
@@ -136,9 +135,12 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
IPath path = new Path(modelPath);
IResource resource = root.findMember(path);
if( (resource != null) && resource.exists() ) {
+ path = resource.getProject().getLocation();
+
fWorkspaceRootLocationStringField.setStringValue(
- resource.getProject().getLocation().toString());
-
+ WorkflowFileUtils.makeRelativeLocation(path));
+ fWorkspaceRootLocationStringField.setToolTipText(path.toString());
+
if( DEFAULT_WORKSPACE_OUTPUT_FOLDER_NAME.equals(
fWorkspaceOutputLocationStringField.getStringValue()) )
{
@@ -148,12 +150,18 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
else if( root.getLocation().isPrefixOf(path) ) {
path = root.getLocation().append( path.segment(
path.matchingFirstSegments( root.getLocation() ) ));
- fWorkspaceRootLocationStringField.setStringValue(path.toString());
+
+ fWorkspaceRootLocationStringField.setStringValue(
+ WorkflowFileUtils.makeRelativeLocation(path));
+ fWorkspaceRootLocationStringField.setToolTipText(path.toString());
}
else {
+ path = root.getLocation().append("<project-folder-name>");
+
fWorkspaceRootLocationStringField.setStringValue(
- root.getLocation().append(
- "<project-folder-name>" ).toString() );
+ WorkflowFileUtils.makeRelativeLocation(path));
+ fWorkspaceRootLocationStringField.setToolTipText(path.toString());
+
}
fWorkspaceRootLocationStringField.updateLaunchConfigurationDialog();
@@ -161,7 +169,7 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
public void updateWorkspaceOutputPath(IResource resource) {
final IResource parentResource = resource.getParent();
-
+
if( (resource instanceof IFile) && (resource.getProject() != parentResource)
&& fWorkspaceOutputLocationStringField.getStringValue().endsWith(
DEFAULT_WORKSPACE_OUTPUT_FOLDER_NAME)
@@ -180,16 +188,12 @@ public class OverviewWorkspaceDataSection extends AbstractConfigurationSection {
@Override
public void initializeFromImpl(ILaunchConfiguration configuration) {
- try {
- String specMainFileLocation = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
- DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
-
- updateWorkspaceRootPath( specMainFileLocation );
- }
- catch (CoreException e) {
- e.printStackTrace();
- }
+ String specMainFileLocation =
+ WorkflowFileUtils.getAbsoluteLocation(configuration,
+ ATTR_SPECIFICATION_MODEL_FILE_LOCATION,
+ DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION);
+
+ updateWorkspaceRootPath( specMainFileLocation );
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorConfigurationPage.java
index d7abd4b..129d580 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorConfigurationPage.java
@@ -23,18 +23,28 @@ import org.eclipse.swt.widgets.Composite;
public class SupervisorConfigurationPage extends AbstractConfigurationPage {
private SupervisorGraphSizeLimitsSection fGraphSizeLimitsSection;
-
+
private SupervisorEvaluationLimitsSection fEvaluationLimitsSection;
-
+
public SupervisorConfigurationPage(ILaunchConfigurationGUIelement masterGUIelement) {
super(masterGUIelement);
-
+
fGraphSizeLimitsSection = new SupervisorGraphSizeLimitsSection(this);
-
+
fEvaluationLimitsSection = new SupervisorEvaluationLimitsSection(this);
}
+ @Override
+ public String getSectionTitle() {
+ return "Supervisor";
+ }
+
+ @Override
+ public String getSectionDescription() {
+ return "Supervisor";
+ }
+
// ======================================================================================
// Graphical Components Creation Methods
@@ -44,7 +54,7 @@ public class SupervisorConfigurationPage extends AbstractConfigurationPage {
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit)
{
fGraphSizeLimitsSection.createControl(parent, widgetToolkit);
-
+
fEvaluationLimitsSection.createControl(parent, widgetToolkit);
}
@@ -55,24 +65,24 @@ public class SupervisorConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
fGraphSizeLimitsSection.setDefaults(configuration);
-
+
fEvaluationLimitsSection.setDefaults(configuration);
}
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
fGraphSizeLimitsSection.initializeFrom(configuration);
-
+
fEvaluationLimitsSection.initializeFrom(configuration);
}
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration) {
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
fGraphSizeLimitsSection.performApply(configuration);
-
+
fEvaluationLimitsSection.performApply(configuration);
}
@@ -81,7 +91,7 @@ public class SupervisorConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
if( ! fGraphSizeLimitsSection.isValid(launchConfig) ) {
return new FieldValidationReturn(false, null);
}
@@ -89,7 +99,7 @@ public class SupervisorConfigurationPage extends AbstractConfigurationPage {
if( ! fEvaluationLimitsSection.isValid(launchConfig) ) {
return new FieldValidationReturn(false, null);
}
-
+
return new FieldValidationReturn(true, null);
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorEvaluationLimitsSection.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorEvaluationLimitsSection.java
index 89d6526..00bedad 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorEvaluationLimitsSection.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorEvaluationLimitsSection.java
@@ -20,11 +20,12 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurationSection;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.IntegerFieldEditor;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.swt.widgets.Composite;
public class SupervisorEvaluationLimitsSection extends AbstractConfigurationSection {
-
+
public SupervisorEvaluationLimitsSection(AbstractConfigurationPage configurationPage) {
super(configurationPage);
}
@@ -54,21 +55,21 @@ public class SupervisorEvaluationLimitsSection extends AbstractConfigurationSect
"&Symbex Step Count :", parent, 1000);
integerField.setToolTipText("Maximal symbex step (possibly many evaluations by step)"
+ " (-1 <=> no-limit) during the dynamic process");
- addField( integerField );
+ addFieldEditor( integerField );
integerField = new IntegerFieldEditor(fConfigurationPage,
ATTR_SPECIFICATION_STOP_CRITERIA_EVALS,
"&Symbex Eval Count :", parent, 1000);
integerField.setToolTipText("Maximal symbex evaluation count"
+ " (-1 <=> no-limit) during the dynamic process");
- addField( integerField );
+ addFieldEditor( integerField );
integerField = new IntegerFieldEditor(fConfigurationPage,
ATTR_SPECIFICATION_STOP_CRITERIA_TIMEOUT,
"&Timeout (seconds) :", parent, -1);
integerField.setToolTipText("Maximal duration "
+ "(-1 <=> no-limit) of the symbex dynamic process");
- addField( integerField );
+ addFieldEditor( integerField );
integerField.setEnabled(false);
}
@@ -89,19 +90,22 @@ public class SupervisorEvaluationLimitsSection extends AbstractConfigurationSect
configuration.setAttribute(
ATTR_SPECIFICATION_STOP_CRITERIA_HEIGHT, -1);
- String fModelAnalysis;
+ AnalysisProfileKind modelAnalysisProfile =
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
try {
- fModelAnalysis = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE, "");
+ final String strModelAnalysisProfile = configuration.getAttribute(
+ ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE.getLiteral());
+
+ modelAnalysisProfile = AnalysisProfileKind.get(strModelAnalysisProfile);
}
catch (CoreException e) {
e.printStackTrace();
-
- fModelAnalysis = "";
+ modelAnalysisProfile = AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
}
- if ( fModelAnalysis.equals(
- ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION) )
+ if ( modelAnalysisProfile ==
+ AnalysisProfileKind.ANALYSIS_TRANSITION_COVERAGE_PROFILE )
{
configuration.setAttribute(
ATTR_SPECIFICATION_STOP_CRITERIA_STEPS, -1);
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorGraphSizeLimitsSection.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorGraphSizeLimitsSection.java
index d504127..d970952 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorGraphSizeLimitsSection.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/supervisor/SupervisorGraphSizeLimitsSection.java
@@ -52,19 +52,19 @@ public class SupervisorGraphSizeLimitsSection extends AbstractConfigurationSecti
ATTR_SPECIFICATION_STOP_CRITERIA_NODE, "&Nodes :", parent, -1);
integerField.setToolTipText("Maximal number of nodes "
+ "(-1 <=> no-limit) of the symbolic execution tree");
- addField( integerField );
+ addFieldEditor( integerField );
integerField = new IntegerFieldEditor(fConfigurationPage,
ATTR_SPECIFICATION_STOP_CRITERIA_WIDTH, "W&idth :", parent, -1);
integerField.setToolTipText(
"Maximal width (-1 <=> no-limit) of the symbolic execution tree");
- addField( integerField );
+ addFieldEditor( integerField );
integerField = new IntegerFieldEditor(fConfigurationPage,
ATTR_SPECIFICATION_STOP_CRITERIA_HEIGHT, "&Height :", parent, 100);
integerField.setToolTipText(
"Maximal height (-1 <=> no-limit) of the symbolic execution tree");
- addField( integerField );
+ addFieldEditor( integerField );
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationBasicTraceConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationBasicTraceConfigurationProfile.java
index d3a90de..64b62b1 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationBasicTraceConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationBasicTraceConfigurationProfile.java
@@ -19,9 +19,13 @@ import org.eclipse.efm.execution.configuration.common.ui.api.AbstractConfigurati
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
import org.eclipse.efm.execution.configuration.common.ui.editors.StringFieldEditor;
-import org.eclipse.swt.SWT;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableConfigProvider;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
@@ -39,7 +43,8 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
* Constructor
* @param parentTab
*/
- public TestGenerationBasicTraceConfigurationProfile(AbstractConfigurationPage configurationPage) {
+ public TestGenerationBasicTraceConfigurationProfile(
+ AbstractConfigurationPage configurationPage) {
super(configurationPage);
}
@@ -68,7 +73,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
ATTR_BASIC_TRACE_ENABLED_GENERATION,
"&Generation", comp,
DEFAULT_BASIC_TRACE_ENABLED_GENERATION);
- addField(fBasicTraceEnabledGenerationBooleanField);
+ addFieldEditor(fBasicTraceEnabledGenerationBooleanField);
fBasicTraceEnabledGenerationBooleanField.addSelectionListener(
new SelectionAdapter() {
@@ -86,7 +91,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
ATTR_BASIC_TRACE_LIFELINES_ENABLED_PRINTING,
"&Print Lifelines", comp,
DEFAULT_BASIC_TRACE_LIFELINES_ENABLED_PRINTING);
- addField(fBasicTraceLifelinesEnabledGenerationBooleanField);
+ addFieldEditor(fBasicTraceLifelinesEnabledGenerationBooleanField);
createBasicConfigurationComponent(parent, widgetToolkit);
@@ -96,10 +101,10 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
private void handleEnablingGeneration() {
fBasicTraceLifelinesEnabledGenerationBooleanField.setEnabled(
fBasicTraceEnabledGenerationBooleanField.getBooleanValue() );
-
+
fConfigurationPage.propagateVisibility(groupBasicConfiguration,
fBasicTraceEnabledGenerationBooleanField.getBooleanValue() );
-
+
fConfigurationPage.propagateVisibility(groupBasicObservable,
fBasicTraceEnabledGenerationBooleanField.getBooleanValue() );
}
@@ -118,7 +123,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
comp, DEFAULT_BASIC_TRACE_FOLDER_NAME);
resourceNameStringField.setToolTipText(
"Folder name w.r.t. <workspace-root>/<output>");
- addField(resourceNameStringField);
+ addFieldEditor(resourceNameStringField);
comp = widgetToolkit.createComposite(
groupBasicConfiguration, 1, 1, GridData.FILL_HORIZONTAL);
@@ -127,7 +132,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
ATTR_BASIC_TRACE_FILE_NAME, "&File :",
comp, DEFAULT_BASIC_TRACE_FILE_NAME);
resourceNameStringField.setToolTipText("File name");
- addField(resourceNameStringField);
+ addFieldEditor(resourceNameStringField);
comp = widgetToolkit.createComposite(groupBasicConfiguration,
1, 1, GridData.FILL_HORIZONTAL);
@@ -135,7 +140,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
BooleanFieldEditor flagBooleanFieldEditor = new BooleanFieldEditor(
fConfigurationPage, ATTR_BASIC_TRACE_ENABLED_NORMALIZATION,
"&Normalization (Redundance Elimination...)", comp, true);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
comp = widgetToolkit.createComposite(groupBasicConfiguration,
1, 1, GridData.FILL_HORIZONTAL);
@@ -143,7 +148,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
flagBooleanFieldEditor = new BooleanFieldEditor(
fConfigurationPage, ATTR_BASIC_TRACE_INITIAL_VALUES_ENABLED_PRINTING,
"&Print Initial Values", comp, false);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
}
public void createObservableSelectionComponent(
@@ -157,9 +162,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
createOtherObservableComponent(groupBasicObservable, widgetToolkit);
- createObservableDetailsComponent(groupBasicObservable, widgetToolkit);
-
- createObservableFormatComponent(groupBasicObservable, widgetToolkit);
+ createTraceElementTableViewerComponent(groupBasicObservable, widgetToolkit);
}
private void createExternalCommunicationComponent(
@@ -177,7 +180,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_EXTERNAL_INPUT_COM_SELECTION,
"&Input", comp, true);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
comp = widgetToolkit.createComposite(
@@ -186,7 +189,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
flagBooleanFieldEditor = new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_EXTERNAL_OUTPUT_COM_SELECTION,
"&Output", comp, true);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
}
private void createInternalCommunicationComponent(
@@ -204,7 +207,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_INPUT_COM_SELECTION,
"&Input", comp, false);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
comp = widgetToolkit.createComposite(
@@ -212,7 +215,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
flagBooleanFieldEditor = new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_OUTPUT_COM_SELECTION, "&Output", comp, false);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
}
private void createOtherObservableComponent(
@@ -229,7 +232,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_TIME_SELECTION,
"&Time", comp, true);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
comp = widgetToolkit.createComposite(
@@ -237,7 +240,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
flagBooleanFieldEditor = new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_VARIABLE_SELECTION, "&Variable", comp, false);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
comp = widgetToolkit.createComposite(
@@ -245,7 +248,7 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
flagBooleanFieldEditor = new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_TRANSITION_SELECTION, "&Transition", comp, false);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
comp = widgetToolkit.createComposite(
@@ -253,40 +256,58 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
flagBooleanFieldEditor = new BooleanFieldEditor(fConfigurationPage,
ATTR_BASIC_TRACE_ALL_STATE_SELECTION, "&State", comp, false);
- addField(flagBooleanFieldEditor);
+ addFieldEditor(flagBooleanFieldEditor);
}
- private void createObservableDetailsComponent(
- Composite parent, IWidgetToolkit widgetToolkit) {
- Group group = widgetToolkit.createGroup(parent,
- "&Details", 1, 2, GridData.FILL_HORIZONTAL);
- StringFieldEditor observableTraceDetailsStringField =
- new StringFieldEditor(fConfigurationPage,
- ATTR_BASIC_TRACE_DETAILS_ELEMENT_LIST, "",
- group, DEFAULT_BASIC_TRACE_DETAILS_ELEMENT_LIST,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- addField(observableTraceDetailsStringField);
+ private TraceElementTableViewer fDetailTraceElementTableViewer;
+
+ private TraceElementTableConfigProvider getTraceDetailTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_BASIC_TRACE_DETAILS_ELEMENT_LIST,
+ DEFAULT_BASIC_TRACE_DETAILS_ELEMENT_LIST,
+ "&Detail", BEHAVIOR_DESCRIPTION, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.BEHAVIOR_SELECTION_TRACE_ELEMENT,
+ TraceElementKind.TRANSITION);
}
- private void createObservableFormatComponent(
- Composite parent, IWidgetToolkit widgetToolkit) {
- Group group = widgetToolkit.createGroup(parent,
+ private TraceElementTableViewer fFormatTraceElementTableViewer;
+
+ private TraceElementTableConfigProvider getTraceFormatElementTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_BASIC_TRACE_FORMAT_ELEMENT_LIST,
+ DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST,
"&Ad'Hoc Element Format for Tests",
- 1, 2, GridData.FILL_HORIZONTAL);
- group.setToolTipText( HELPER_TRACE_FORMAT_SPECIFICATION );
+ HELPER_TRACE_FORMAT_SPECIFICATION, false, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(32),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.FORMAT_ELEMENT,
+ TraceElementKind.VARIABLE);
+ }
- StringFieldEditor observableFormatStringField =
- new StringFieldEditor(fConfigurationPage,
- ATTR_BASIC_TRACE_FORMAT_ELEMENT_LIST, "",
- group, DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- observableFormatStringField.setToolTipText(
- HELPER_TRACE_FORMAT_SPECIFICATION );
- addField(observableFormatStringField);
+ private void createTraceElementTableViewerComponent(
+ Composite parent, IWidgetToolkit widgetToolkit) {
+
+ Composite comp = widgetToolkit.createComposite(
+ parent, 1, 2, GridData.FILL_HORIZONTAL);
+
+ fDetailTraceElementTableViewer =
+ new TraceElementTableViewer(this, comp, 1,
+ widgetToolkit, getTraceDetailTableConfig(parent.getFont()));
+
+ fFormatTraceElementTableViewer =
+ new TraceElementTableViewer(this, comp, 1,
+ widgetToolkit, getTraceFormatElementTableConfig(parent.getFont()));
}
+
@Override
protected void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration)
{
@@ -350,16 +371,21 @@ public class TestGenerationBasicTraceConfigurationProfile extends AbstractConfig
@Override
protected void initializeFromImpl(ILaunchConfiguration configuration) {
handleEnablingGeneration();
+
+ fDetailTraceElementTableViewer.initializeFrom(configuration);
+ fFormatTraceElementTableViewer.initializeFrom(configuration);
}
@Override
protected void performApplyImpl(ILaunchConfigurationWorkingCopy configuration) {
- //!! NOTHING
+ fDetailTraceElementTableViewer.performApply(configuration);
+ fFormatTraceElementTableViewer.performApply(configuration);
}
@Override
protected boolean isValidImpl(ILaunchConfiguration launchConfig) {
- return true;
+ return( fDetailTraceElementTableViewer.isValid(launchConfig) ||
+ fFormatTraceElementTableViewer.isValid(launchConfig) );
}
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationConfigurationPage.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationConfigurationPage.java
index 71e78c1..e876eaf 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationConfigurationPage.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationConfigurationPage.java
@@ -20,23 +20,42 @@ import org.eclipse.efm.execution.configuration.common.ui.api.ILaunchConfiguratio
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
import org.eclipse.efm.execution.configuration.common.ui.editors.BooleanFieldEditor;
import org.eclipse.efm.execution.configuration.common.ui.editors.IntegerFieldEditor;
-import org.eclipse.efm.execution.configuration.common.ui.editors.StringFieldEditor;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableConfigProvider;
+import org.eclipse.efm.execution.configuration.common.ui.editors.table.TraceElementTableViewer;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
+import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
-
+
private Group groupTraceExtension;
private Group groupExtensionObjective;
private BooleanFieldEditor fTraceExtensionEnabledBooleanField;
private IntegerFieldEditor fTraceExtensionEvaluationStepsLimitIntegerField;
- private StringFieldEditor fTraceExtensionObjectiveStringField;
+
+
+ private TraceElementTableViewer fExtensionObjectiveTraceElementTableViewer;
+
+ private TraceElementTableConfigProvider getTraceExtensionObjectiveTableConfig(Font font) {
+ final PixelConverter pixelConverter = new PixelConverter(font);
+
+ return new TraceElementTableConfigProvider(
+ ATTR_TRACE_EXTENSION_OBJECTIVE, DEFAULT_TRACE_EXTENSION_OBJECTIVE,
+ "Trace Ending with", BEHAVIOR_DESCRIPTION, true,
+ "Nature" , pixelConverter.convertWidthInCharsToPixels(16),
+ "Element", pixelConverter.convertWidthInCharsToPixels(48),
+ TraceElementTableConfigProvider.BEHAVIOR_SELECTION_TRACE_ELEMENT,
+ TraceElementKind.TRANSITION);
+ }
+
// BASIC TRACE GENERATION
private TestGenerationBasicTraceConfigurationProfile fBasicTracePage;
@@ -55,6 +74,7 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
// Graphical Components Creation Methods
// ======================================================================================
+ @Override
protected void createContent(Composite parent, IWidgetToolkit widgetToolkit)
{
createExtensionFormatPage(parent, widgetToolkit);
@@ -64,6 +84,17 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
fTTCNTracePage.createControl(parent, widgetToolkit);
}
+ @Override
+ public String getSectionTitle() {
+ return "Test Generation";
+ }
+
+ @Override
+ public String getSectionDescription() {
+ return "Test Generation";
+ }
+
+
public void createExtensionFormatPage(Composite parent, IWidgetToolkit widgetToolkit) {
Group group = widgetToolkit.createGroup(
parent, "Trace Extension Page",
@@ -83,19 +114,19 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
fTraceExtensionEnabledBooleanField = new BooleanFieldEditor(
this, ATTR_ENABLED_TRACE_EXTENSION,
"&Enabled Extension", comp, false);
-
fTraceExtensionEnabledBooleanField.addSelectionListener(
new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
handleEnablingTraceExtension();
-
+
propertyChange( new PropertyChangeEvent(this, ATTR_ENABLED_TRACE_EXTENSION,
new Boolean(fTraceExtensionEnabledBooleanField.getBooleanValue()),
new Boolean(fTraceExtensionEnabledBooleanField.getBooleanValue()) ));
}
});
+ addFieldEditor(fTraceExtensionEnabledBooleanField);
groupExtensionObjective = widgetToolkit.createGroup(
@@ -110,19 +141,15 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
new IntegerFieldEditor(this,
ATTR_TRACE_EXTENSION_EVALUATION_STEPS,
"&Evaluation Steps :", comp, -1);
-
fTraceExtensionEvaluationStepsLimitIntegerField.setToolTipText(
"Maximal evaluation steps (-1 <=> no-limit) " +
"during the extension of symbolic execution");
+ addFieldEditor(fTraceExtensionEvaluationStepsLimitIntegerField);
- Group group = widgetToolkit.createGroup(
- groupTraceExtension, "Trace Ending with ",
- 1, 1, GridData.FILL_HORIZONTAL);
-
- fTraceExtensionObjectiveStringField = new StringFieldEditor(
- this, ATTR_TRACE_EXTENSION_OBJECTIVE,
- "", group, DEFAULT_TRACE_EXTENSION_OBJECTIVE,
- SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
+ fExtensionObjectiveTraceElementTableViewer =
+ new TraceElementTableViewer(null, groupTraceExtension, 1, widgetToolkit,
+ getTraceExtensionObjectiveTableConfig(parent.getFont()));
+ addTableViewer(fExtensionObjectiveTraceElementTableViewer);
}
private void handleEnablingTraceExtension() {
@@ -136,34 +163,24 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public void setDefaultFieldValues(ILaunchConfigurationWorkingCopy configuration) {
-
-// fTraceExtensionEnabledBooleanField.setDefaults(configuration);
+ public void setDefaultsImpl(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
ATTR_ENABLED_TRACE_EXTENSION, false);
-// fTraceExtensionEvaluationStepsLimitIntegerField.setDefaults(
-// configuration);
configuration.setAttribute(
ATTR_TRACE_EXTENSION_EVALUATION_STEPS, -1);
-// fTraceExtensionObjectiveStringField.setDefaults(configuration);
configuration.setAttribute(
ATTR_TRACE_EXTENSION_OBJECTIVE,
DEFAULT_TRACE_EXTENSION_OBJECTIVE);
-
fBasicTracePage.setDefaults(configuration);
fTTCNTracePage.setDefaults(configuration);
}
@Override
- public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
- fTraceExtensionEnabledBooleanField.initializeFrom(configuration);
- fTraceExtensionEvaluationStepsLimitIntegerField.initializeFrom(configuration);
- fTraceExtensionObjectiveStringField.initializeFrom(configuration);
-
+ public void initializeFromImpl(ILaunchConfiguration configuration) {
// String analysisProfile;
// try {
// analysisProfile = configuration.getAttribute(
@@ -189,13 +206,8 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
@Override
- public void applyUpdatesOnFieldValuesFrom(ILaunchConfigurationWorkingCopy configuration)
+ public void performApplyImpl(ILaunchConfigurationWorkingCopy configuration)
{
- fTraceExtensionEnabledBooleanField.performApply(configuration);
-
- fTraceExtensionEvaluationStepsLimitIntegerField.performApply(configuration);
- fTraceExtensionObjectiveStringField.performApply(configuration);
-
fBasicTracePage.performApply(configuration);
fTTCNTracePage.performApply(configuration);
@@ -206,62 +218,62 @@ public class TestGenerationConfigurationPage extends AbstractConfigurationPage {
// ======================================================================================
@Override
- public FieldValidationReturn areFieldsValid(ILaunchConfiguration launchConfig) {
+ public FieldValidationReturn areFieldsValidImpl(ILaunchConfiguration launchConfig) {
if( ! fTraceExtensionEvaluationStepsLimitIntegerField.isValid() ) {
return new FieldValidationReturn(false, "Evaluation Steps is not a valid integer");
}
-
+
if( ! fBasicTracePage.isValid(launchConfig) ) {
return new FieldValidationReturn(false, null);
}
-
+
if( ! fTTCNTracePage.isValid(launchConfig) ) {
return new FieldValidationReturn(false, null);
}
-
+
return new FieldValidationReturn(true, null);
}
-
+
///////////////////////////////////////////////////////////////////////////
// Property Change
//
@Override
- protected void handleConfigurationPropertyChange(PropertyChangeEvent event) {
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
switch( event.getProperty() ) {
case ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE:
- switch ( event.getNewValue().toString() ) {
- case ANALYSIS_PROFILE_MODEL_TEST_OFFLINE:
+ switch ( (AnalysisProfileKind) event.getNewValue() ) {
+ case ANALYSIS_TEST_OFFLINE_PROFILE:
groupTraceExtension.setEnabled(false);
-
+
propagateVisibility(groupExtensionObjective, false);
-
+
setVisibleAndEnabled(fBasicTracePage.getSection(), false);
setVisibleAndEnabled(fTTCNTracePage.getSection() , false);
-
+
break;
-
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION:
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR:
- case ANALYSIS_PROFILE_MODEL_EXPLORATION:
+
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE:
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE:
+ case ANALYSIS_EXPLORATION_PROFILE:
default:
groupTraceExtension.setEnabled(true);
-
+
propagateVisibility(groupExtensionObjective, true);
-
+
setVisibleAndEnabled(fBasicTracePage.getSection(), true);
setVisibleAndEnabled(fTTCNTracePage.getSection() , true);
-
- handleEnablingTraceExtension();;
+
+ handleEnablingTraceExtension();
break;
}
-
+
break;
default:
break;
}
}
-
+
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationTTCNConfigurationProfile.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationTTCNConfigurationProfile.java
index d3d9efd..8e9679a 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationTTCNConfigurationProfile.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/page/testgen/TestGenerationTTCNConfigurationProfile.java
@@ -67,7 +67,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
ATTR_TTCN_ENABLED_GENERATION,
"&Generation", comp, false);
- addField(fTTCNEnabledGenerationBooleanField);
+ addFieldEditor(fTTCNEnabledGenerationBooleanField);
fTTCNEnabledGenerationBooleanField.addSelectionListener(
new SelectionAdapter() {
@@ -85,7 +85,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
ATTR_TTCN_ENABLED_CUSTOMIZATION,
"&Customization", comp,
DEFAULT_TTCN_ENABLED_CUSTOMIZATION);
- addField(fTTCNEnabledAdaptationModuleBooleanField);
+ addFieldEditor(fTTCNEnabledAdaptationModuleBooleanField);
fTTCNEnabledAdaptationModuleBooleanField.addSelectionListener(
new SelectionAdapter() {
@@ -132,7 +132,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
DEFAULT_TTCN_FOLDER_NAME);
folderNameStringField.setToolTipText(
"Folder name w.r.t. <workspace-root>/<output>");
- addField(folderNameStringField);
+ addFieldEditor(folderNameStringField);
}
private void createTTCNModuleConfigurationComponent(Composite parent, IWidgetToolkit widgetToolkit) {
@@ -154,7 +154,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
Composite comp = widgetToolkit.createComposite(
group, 1, 1, GridData.FILL_HORIZONTAL);
- addField( new StringFieldEditor(fConfigurationPage,
+ addFieldEditor( new StringFieldEditor(fConfigurationPage,
ATTR_TTCN_CONTROL_MODULE_NAME,
"&Name :", comp,
DEFAULT_TTCN_CONTROL_MODULE_NAME) );
@@ -167,7 +167,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
Composite comp = widgetToolkit.createComposite(
group, 1, 1, GridData.FILL_HORIZONTAL);
- addField( new StringFieldEditor(fConfigurationPage,
+ addFieldEditor( new StringFieldEditor(fConfigurationPage,
ATTR_TTCN_DECLARATIONS_MODULE_NAME,
"&Name :", comp,
DEFAULT_TTCN_DECLARATIONS_MODULE_NAME) );
@@ -180,7 +180,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
Composite comp = widgetToolkit.createComposite(
group, 2, 1, GridData.FILL_HORIZONTAL);
- addField( new StringFieldEditor(fConfigurationPage,
+ addFieldEditor( new StringFieldEditor(fConfigurationPage,
ATTR_TTCN_TEMPLATES_MODULE_NAME,
"&Name :", comp,
DEFAULT_TTCN_TEMPLATE_MODULE_NAME) );
@@ -195,7 +195,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
Composite comp = widgetToolkit.createComposite(
group, 2, 1, GridData.FILL_HORIZONTAL);
- addField( new StringFieldEditor(fConfigurationPage,
+ addFieldEditor( new StringFieldEditor(fConfigurationPage,
ATTR_TTCN_TESTCASES_MODULE_NAME,
"&Name :", comp,
DEFAULT_TTCN_TESTCASES_MODULE_NAME) );
@@ -222,7 +222,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
wrapperStringField.setToolTipText(
HELPER_MODULE_TESTCASE_STARTING_ENDING_PATTERN_PARAMETERS );
- addField( wrapperStringField );
+ addFieldEditor( wrapperStringField );
wrapperStringField = new StringFieldEditor(
fConfigurationPage, ATTR_TTCN_TESTCASES_ENDING_WRAPPER,
@@ -230,7 +230,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
wrapperStringField.setToolTipText(
HELPER_MODULE_TESTCASE_STARTING_ENDING_PATTERN_PARAMETERS );
- addField( wrapperStringField );
+ addFieldEditor( wrapperStringField );
group = widgetToolkit.createGroup(groupAdapters,
"Wrappers for testcases Sending / Receiving Operations",
@@ -249,7 +249,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
wrapperStringField.setToolTipText(
HELPER_MODULE_TESTCASE_COMMUNICATION_PATTERN_PARAMETERS );
- addField( wrapperStringField );
+ addFieldEditor( wrapperStringField );
wrapperStringField = new StringFieldEditor(
fConfigurationPage, ATTR_TTCN_TESTCASES_RECEIVING_WRAPPER,
@@ -257,7 +257,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
wrapperStringField.setToolTipText(
HELPER_MODULE_TESTCASE_COMMUNICATION_PATTERN_PARAMETERS );
- addField( wrapperStringField );
+ addFieldEditor( wrapperStringField );
}
@@ -270,7 +270,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
Composite comp = widgetToolkit.createComposite(
group, 2, 1, GridData.FILL_HORIZONTAL);
- addField( new StringFieldEditor(fConfigurationPage,
+ addFieldEditor( new StringFieldEditor(fConfigurationPage,
ATTR_TTCN_ADAPTATION_MODULE_NAME, "&Name :",
comp, DEFAULT_TTCN_ADAPTATION_MODULE_NAME) );
@@ -297,7 +297,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
stringField.setToolTipText(
HELPER_MODULE_TESTCASE_STARTING_ENDING_PATTERN_PARAMETERS );
- addField( stringField );
+ addFieldEditor( stringField );
group = widgetToolkit.createGroup(groupImpl,
"Implementation of testcases Sending wrappers",
@@ -316,7 +316,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
stringField.setToolTipText(
HELPER_MODULE_TESTCASE_COMMUNICATION_PATTERN_PARAMETERS );
- addField( stringField );
+ addFieldEditor( stringField );
group = widgetToolkit.createGroup(groupImpl,
"Implementation of testcases Receiving wrappers",
@@ -335,7 +335,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
stringField.setToolTipText(
HELPER_MODULE_TESTCASE_COMMUNICATION_PATTERN_PARAMETERS );
- addField( stringField );
+ addFieldEditor( stringField );
group = widgetToolkit.createGroup(groupImpl,
@@ -355,7 +355,7 @@ public class TestGenerationTTCNConfigurationProfile extends AbstractConfiguratio
SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
stringField.setToolTipText(
HELPER_MODULE_TESTCASE_STARTING_ENDING_PATTERN_PARAMETERS );
- addField( stringField );
+ addFieldEditor( stringField );
}
diff --git a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/util/GenericCompositeCreator.java b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/util/GenericCompositeCreator.java
index 532d074..5de3129 100644
--- a/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/util/GenericCompositeCreator.java
+++ b/execution/org.eclipse.efm.execution.configuration.common.ui/src/org/eclipse/efm/execution/configuration/common/ui/util/GenericCompositeCreator.java
@@ -26,28 +26,28 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
public class GenericCompositeCreator {
-
+
public static Text createComposite_label_text_from_toolkit(FormToolkit toolkit, Composite parentComposite, String labeltext, int colnum) {
-
+
Composite composite = toolkit.createComposite(parentComposite);
GridLayout gl = new GridLayout(colnum, false);
composite.setLayout(gl);
-
+
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
composite.setLayoutData(gd);
-
+
toolkit.createLabel(composite, labeltext);
-
+
GridData gd2 = new GridData(SWT.FILL,SWT.FILL, true, false);
-
+
Text label_content = toolkit.createText(composite, "...");
label_content.setLayoutData(gd2);
label_content.setEditable(false);
-
+
return label_content;
}
-
+
public static Button createComposite_label_pushbutton_from_toolkit(FormToolkit toolkit,
Composite parentComposite, String labeltext, String buttontext, int colnum)
{
@@ -55,27 +55,27 @@ public class GenericCompositeCreator {
GridLayout gl = new GridLayout(colnum, false);
composite.setLayout(gl);
-
+
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
composite.setLayoutData(gd);
-
+
toolkit.createLabel(composite, labeltext);
-
+
//GridData gd2 = new GridData(SWT.FILL,SWT.FILL, true, false);
-
+
Button button = toolkit.createButton(composite, buttontext, SWT.PUSH);
// Text label_content = toolkit.createText(composite, "...");
// label_content.setLayoutData(gd2);
// label_content.setEditable(false);
-
+
return button;
- }
-
+ }
+
+
-
public static Combo createComposite_combo_text_from_toolkit(
FormToolkit toolkit, Composite parentComposite, String labeltext, int colnum) {
-
+
Composite composite = toolkit.createComposite(parentComposite);
//RowLayout rl = new RowLayout(SWT.HORIZONTAL);
@@ -86,55 +86,55 @@ public class GenericCompositeCreator {
//gl.numColumns = 2; // colnum
//RowLayout rl = new RowLayout(SWT.HORIZONTAL);
composite.setLayout(gl);
-
+
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
// RowData rd = new RowData();
composite.setLayoutData(gd);
-
-
+
+
//Composite labelhost = toolkit.createComposite(composite);
//labelhost.setLa
Label lbl = toolkit.createLabel(composite, labeltext);
lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
//Label lbl = new Label(composite, SWT.NONE);
//lbl.setText(labeltext);
-
+
//Composite combohost = toolkit.createComposite(composite);
-
+
//CCombo ccombo = new CCombo(composite, SWT.READ_ONLY);
-
-
+
+
//GridData gdlb = new GridData(SWT.LEFT,SWT.TOP, false, false);
//GridData gdlb = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
//gdlb.horizontalSpan = 2;
//lbl.setLayoutData(gdlb);
-
+
//GridData gdcb = new GridData(SWT.RIGHT,SWT.TOP, true, false);
-
+
Combo combo = new Combo(composite, SWT.READ_ONLY);
combo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
// combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
// combo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
+
//combo.setLayoutData(gdcb);
//combo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
+
toolkit.adapt(combo, true, true);
-
+
return combo;
- }
-
+ }
+
public static void recursiveSetEnabled(Control ctrl, boolean enabled) {
- if (ctrl instanceof Composite) {
- Composite comp = (Composite) ctrl;
- for (Control c : comp.getChildren())
- recursiveSetEnabled(c, enabled);
- } else {
- ctrl.setEnabled(enabled);
- }
+ if (ctrl instanceof Composite) {
+ Composite comp = (Composite) ctrl;
+ for (Control c : comp.getChildren())
+ recursiveSetEnabled(c, enabled);
+ } else {
+ ctrl.setEnabled(enabled);
}
-
-
+ }
+
+
public static void fillToolBar(IToolBarManager manager, Action[] acts) {
for(Action action: acts) {
manager.add(action);
diff --git a/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.ecore b/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.ecore
index cf491a7..bad1332 100644
--- a/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.ecore
+++ b/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.ecore
@@ -86,6 +86,14 @@
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
</eClassifiers>
<eSubpackages name="common" nsURI="http://www.eclipse.org/efm/Workflow/Common" nsPrefix="Common">
+ <eClassifiers xsi:type="ecore:EEnum" name="AnalysisProfileKind">
+ <eLiterals name="ANALYSIS_UNDEFINED_PROFILE"/>
+ <eLiterals name="ANALYSIS_EXPLORATION_PROFILE" value="1" literal="Exploration"/>
+ <eLiterals name="ANALYSIS_TRANSITION_COVERAGE_PROFILE" value="2" literal="Transition Coverage"/>
+ <eLiterals name="ANALYSIS_BEHAVIOR_SELECTION_PROFILE" value="3" literal="Behavior Selection"/>
+ <eLiterals name="ANALYSIS_TEST_OFFLINE_PROFILE" value="4" literal="Test Offline"/>
+ <eLiterals name="ANALYSIS_ACSL_GENERATION_PROFILE" value="5" literal="Inference"/>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Workspace">
<eStructuralFeatures xsi:type="ecore:EReference" name="location" eType="#//common/Location"
containment="true"/>
@@ -211,14 +219,26 @@
<eLiterals name="LIFELINE_END" value="60" literal="lifeline#end"/>
<eLiterals name="LIFELINE_ID" value="61" literal="lifeline#id"/>
<eLiterals name="LIFELINE_STATE" value="62" literal="lifeline#state"/>
- <eLiterals name="RAW_ATTRIBUTE" value="63" literal="RAW_ATTRIBUTE"/>
+ <eLiterals name="RAW_ATTRIBUTE" value="63" literal="__raw__"/>
<eLiterals name="NODE_HEADER" value="64" literal="node#header"/>
<eLiterals name="NODE_DATA" value="65" literal="node#data"/>
<eLiterals name="NODE_INFO" value="66" literal="node#info"/>
<eLiterals name="NODE_TRACE_RUN" value="67" literal="node#trace#run"/>
<eLiterals name="NODE_TRACE_IO" value="68" literal="node#trace#io"/>
+ <eLiterals name="VALUE_PARAMETER_BEGIN" value="69" literal="value#parameter#begin"/>
+ <eLiterals name="VALUE_PARAMETER_SEPARATOR" value="70" literal="value#parameter#separator"/>
+ <eLiterals name="VALUE_PARAMETER_END" value="71" literal="value#parameter#end"/>
+ <eLiterals name="VALUE_ARRAY_BEGIN" value="72" literal="value#array#begin"/>
+ <eLiterals name="VALUE_ARRAY_SEPARATOR" value="73" literal="value#array#separator"/>
+ <eLiterals name="VALUE_ARRAY_END" value="74" literal="value#array#end"/>
+ <eLiterals name="VALUE_STRUCT_BEGIN" value="75" literal="value#struct#begin"/>
+ <eLiterals name="VALUE_STRUCT_SEPARATOR" value="76" literal="value#struct#separator"/>
+ <eLiterals name="VALUE_STRUCT_END" value="77" literal="value#struct#end"/>
+ <eLiterals name="TIPS" value="99" literal="tips"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TraceElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="selected" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="nature" eType="#//common/TraceElementKind"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
</eClassifiers>
diff --git a/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.genmodel b/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.genmodel
index 09becef..fcacdd9 100644
--- a/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.genmodel
+++ b/execution/org.eclipse.efm.execution.core/resources/ecore/workflow.genmodel
@@ -68,6 +68,14 @@
</genClasses>
<nestedGenPackages prefix="Common" basePackage="org.eclipse.efm.execution.core.workflow"
disposableProviderFactory="true" ecorePackage="workflow.ecore#//common">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="workflow.ecore#//common/AnalysisProfileKind">
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/AnalysisProfileKind/ANALYSIS_UNDEFINED_PROFILE"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/AnalysisProfileKind/ANALYSIS_EXPLORATION_PROFILE"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/AnalysisProfileKind/ANALYSIS_TRANSITION_COVERAGE_PROFILE"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/AnalysisProfileKind/ANALYSIS_BEHAVIOR_SELECTION_PROFILE"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/AnalysisProfileKind/ANALYSIS_TEST_OFFLINE_PROFILE"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/AnalysisProfileKind/ANALYSIS_ACSL_GENERATION_PROFILE"/>
+ </genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="workflow.ecore#//common/GraphExplorationStrategyKind">
<genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/GraphExplorationStrategyKind/BEST_FIRST_SEARCH"/>
<genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/GraphExplorationStrategyKind/BREADTH_FIRST_SEARCH"/>
@@ -155,6 +163,16 @@
<genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/NODE_INFO"/>
<genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/NODE_TRACE_RUN"/>
<genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/NODE_TRACE_IO"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_PARAMETER_BEGIN"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_PARAMETER_SEPARATOR"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_PARAMETER_END"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_ARRAY_BEGIN"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_ARRAY_SEPARATOR"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_ARRAY_END"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_STRUCT_BEGIN"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_STRUCT_SEPARATOR"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/VALUE_STRUCT_END"/>
+ <genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/TraceElementKind/TIPS"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="workflow.ecore#//common/HeuristicClassKind">
<genEnumLiterals ecoreEnumLiteral="workflow.ecore#//common/HeuristicClassKind/BASIC"/>
@@ -218,6 +236,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute workflow.ecore#//common/ConsoleLogFormat/verbosity"/>
</genClasses>
<genClasses ecoreClass="workflow.ecore#//common/TraceElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute workflow.ecore#//common/TraceElement/selected"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute workflow.ecore#//common/TraceElement/nature"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute workflow.ecore#//common/TraceElement/value"/>
</genClasses>
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/AnalysisProfileKind.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/AnalysisProfileKind.java
new file mode 100644
index 0000000..8de7aee
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/AnalysisProfileKind.java
@@ -0,0 +1,332 @@
+/**
+ * Copyright (c) 2017 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr
+ * - Initial API and Implementation
+ */
+package org.eclipse.efm.execution.core.workflow.common;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Analysis Profile Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.efm.execution.core.workflow.common.CommonPackage#getAnalysisProfileKind()
+ * @model
+ * @generated
+ */
+public enum AnalysisProfileKind implements Enumerator {
+ /**
+ * The '<em><b>ANALYSIS UNDEFINED PROFILE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_UNDEFINED_PROFILE_VALUE
+ * @generated
+ * @ordered
+ */
+ ANALYSIS_UNDEFINED_PROFILE(0, "ANALYSIS_UNDEFINED_PROFILE", "ANALYSIS_UNDEFINED_PROFILE"),
+
+ /**
+ * The '<em><b>ANALYSIS EXPLORATION PROFILE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_EXPLORATION_PROFILE_VALUE
+ * @generated
+ * @ordered
+ */
+ ANALYSIS_EXPLORATION_PROFILE(1, "ANALYSIS_EXPLORATION_PROFILE", "Exploration"),
+
+ /**
+ * The '<em><b>ANALYSIS TRANSITION COVERAGE PROFILE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_TRANSITION_COVERAGE_PROFILE_VALUE
+ * @generated
+ * @ordered
+ */
+ ANALYSIS_TRANSITION_COVERAGE_PROFILE(2, "ANALYSIS_TRANSITION_COVERAGE_PROFILE", "Transition Coverage"),
+
+ /**
+ * The '<em><b>ANALYSIS BEHAVIOR SELECTION PROFILE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_BEHAVIOR_SELECTION_PROFILE_VALUE
+ * @generated
+ * @ordered
+ */
+ ANALYSIS_BEHAVIOR_SELECTION_PROFILE(3, "ANALYSIS_BEHAVIOR_SELECTION_PROFILE", "Behavior Selection"),
+
+ /**
+ * The '<em><b>ANALYSIS TEST OFFLINE PROFILE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_TEST_OFFLINE_PROFILE_VALUE
+ * @generated
+ * @ordered
+ */
+ ANALYSIS_TEST_OFFLINE_PROFILE(4, "ANALYSIS_TEST_OFFLINE_PROFILE", "Test Offline"),
+
+ /**
+ * The '<em><b>ANALYSIS ACSL GENERATION PROFILE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_ACSL_GENERATION_PROFILE_VALUE
+ * @generated
+ * @ordered
+ */
+ ANALYSIS_ACSL_GENERATION_PROFILE(5, "ANALYSIS_ACSL_GENERATION_PROFILE", "Inference");
+
+ /**
+ * The '<em><b>ANALYSIS UNDEFINED PROFILE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANALYSIS UNDEFINED PROFILE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_UNDEFINED_PROFILE
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int ANALYSIS_UNDEFINED_PROFILE_VALUE = 0;
+
+ /**
+ * The '<em><b>ANALYSIS EXPLORATION PROFILE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANALYSIS EXPLORATION PROFILE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_EXPLORATION_PROFILE
+ * @model literal="Exploration"
+ * @generated
+ * @ordered
+ */
+ public static final int ANALYSIS_EXPLORATION_PROFILE_VALUE = 1;
+
+ /**
+ * The '<em><b>ANALYSIS TRANSITION COVERAGE PROFILE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANALYSIS TRANSITION COVERAGE PROFILE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_TRANSITION_COVERAGE_PROFILE
+ * @model literal="Transition Coverage"
+ * @generated
+ * @ordered
+ */
+ public static final int ANALYSIS_TRANSITION_COVERAGE_PROFILE_VALUE = 2;
+
+ /**
+ * The '<em><b>ANALYSIS BEHAVIOR SELECTION PROFILE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANALYSIS BEHAVIOR SELECTION PROFILE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_BEHAVIOR_SELECTION_PROFILE
+ * @model literal="Behavior Selection"
+ * @generated
+ * @ordered
+ */
+ public static final int ANALYSIS_BEHAVIOR_SELECTION_PROFILE_VALUE = 3;
+
+ /**
+ * The '<em><b>ANALYSIS TEST OFFLINE PROFILE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANALYSIS TEST OFFLINE PROFILE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_TEST_OFFLINE_PROFILE
+ * @model literal="Test Offline"
+ * @generated
+ * @ordered
+ */
+ public static final int ANALYSIS_TEST_OFFLINE_PROFILE_VALUE = 4;
+
+ /**
+ * The '<em><b>ANALYSIS ACSL GENERATION PROFILE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANALYSIS ACSL GENERATION PROFILE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANALYSIS_ACSL_GENERATION_PROFILE
+ * @model literal="Inference"
+ * @generated
+ * @ordered
+ */
+ public static final int ANALYSIS_ACSL_GENERATION_PROFILE_VALUE = 5;
+
+ /**
+ * An array of all the '<em><b>Analysis Profile Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final AnalysisProfileKind[] VALUES_ARRAY =
+ new AnalysisProfileKind[] {
+ ANALYSIS_UNDEFINED_PROFILE,
+ ANALYSIS_EXPLORATION_PROFILE,
+ ANALYSIS_TRANSITION_COVERAGE_PROFILE,
+ ANALYSIS_BEHAVIOR_SELECTION_PROFILE,
+ ANALYSIS_TEST_OFFLINE_PROFILE,
+ ANALYSIS_ACSL_GENERATION_PROFILE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Analysis Profile Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<AnalysisProfileKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Analysis Profile Kind</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal the literal.
+ * @return the matching enumerator or <code>null</code>.
+ * @generated
+ */
+ public static AnalysisProfileKind get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ AnalysisProfileKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Analysis Profile Kind</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name the name.
+ * @return the matching enumerator or <code>null</code>.
+ * @generated
+ */
+ public static AnalysisProfileKind getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ AnalysisProfileKind result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Analysis Profile Kind</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the integer value.
+ * @return the matching enumerator or <code>null</code>.
+ * @generated
+ */
+ public static AnalysisProfileKind get(int value) {
+ switch (value) {
+ case ANALYSIS_UNDEFINED_PROFILE_VALUE: return ANALYSIS_UNDEFINED_PROFILE;
+ case ANALYSIS_EXPLORATION_PROFILE_VALUE: return ANALYSIS_EXPLORATION_PROFILE;
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE_VALUE: return ANALYSIS_TRANSITION_COVERAGE_PROFILE;
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE_VALUE: return ANALYSIS_BEHAVIOR_SELECTION_PROFILE;
+ case ANALYSIS_TEST_OFFLINE_PROFILE_VALUE: return ANALYSIS_TEST_OFFLINE_PROFILE;
+ case ANALYSIS_ACSL_GENERATION_PROFILE_VALUE: return ANALYSIS_ACSL_GENERATION_PROFILE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private AnalysisProfileKind(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //AnalysisProfileKind
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/CommonPackage.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/CommonPackage.java
index ecaa0d6..a353d8c 100644
--- a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/CommonPackage.java
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/CommonPackage.java
@@ -464,13 +464,22 @@ public interface CommonPackage extends EPackage {
int TRACE_ELEMENT = 6;
/**
+ * The feature id for the '<em><b>Selected</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TRACE_ELEMENT__SELECTED = 0;
+
+ /**
* The feature id for the '<em><b>Nature</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int TRACE_ELEMENT__NATURE = 0;
+ int TRACE_ELEMENT__NATURE = 1;
/**
* The feature id for the '<em><b>Value</b></em>' attribute.
@@ -479,7 +488,7 @@ public interface CommonPackage extends EPackage {
* @generated
* @ordered
*/
- int TRACE_ELEMENT__VALUE = 1;
+ int TRACE_ELEMENT__VALUE = 2;
/**
* The number of structural features of the '<em>Trace Element</em>' class.
@@ -488,7 +497,7 @@ public interface CommonPackage extends EPackage {
* @generated
* @ordered
*/
- int TRACE_ELEMENT_FEATURE_COUNT = 2;
+ int TRACE_ELEMENT_FEATURE_COUNT = 3;
/**
* The number of operations of the '<em>Trace Element</em>' class.
@@ -1434,6 +1443,16 @@ public interface CommonPackage extends EPackage {
int REDUNDANCY_DETECTION_OPERATION_COUNT = 0;
/**
+ * The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind <em>Analysis Profile Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind
+ * @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getAnalysisProfileKind()
+ * @generated
+ */
+ int ANALYSIS_PROFILE_KIND = 14;
+
+ /**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.GraphExplorationStrategyKind <em>Graph Exploration Strategy Kind</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1441,7 +1460,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getGraphExplorationStrategyKind()
* @generated
*/
- int GRAPH_EXPLORATION_STRATEGY_KIND = 14;
+ int GRAPH_EXPLORATION_STRATEGY_KIND = 15;
/**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.ConsoleVerbosityKind <em>Console Verbosity Kind</em>}' enum.
@@ -1451,7 +1470,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getConsoleVerbosityKind()
* @generated
*/
- int CONSOLE_VERBOSITY_KIND = 15;
+ int CONSOLE_VERBOSITY_KIND = 16;
/**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.TraceElementKind <em>Trace Element Kind</em>}' enum.
@@ -1461,7 +1480,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getTraceElementKind()
* @generated
*/
- int TRACE_ELEMENT_KIND = 16;
+ int TRACE_ELEMENT_KIND = 17;
/**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.HeuristicClassKind <em>Heuristic Class Kind</em>}' enum.
@@ -1471,7 +1490,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getHeuristicClassKind()
* @generated
*/
- int HEURISTIC_CLASS_KIND = 17;
+ int HEURISTIC_CLASS_KIND = 18;
/**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.CoverageScopeKind <em>Coverage Scope Kind</em>}' enum.
@@ -1481,7 +1500,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getCoverageScopeKind()
* @generated
*/
- int COVERAGE_SCOPE_KIND = 18;
+ int COVERAGE_SCOPE_KIND = 19;
/**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.CheckingScopeKind <em>Checking Scope Kind</em>}' enum.
@@ -1491,7 +1510,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getCheckingScopeKind()
* @generated
*/
- int CHECKING_SCOPE_KIND = 19;
+ int CHECKING_SCOPE_KIND = 20;
/**
* The meta object id for the '{@link org.eclipse.efm.execution.core.workflow.common.DebuglevelKind <em>Debuglevel Kind</em>}' enum.
@@ -1501,7 +1520,7 @@ public interface CommonPackage extends EPackage {
* @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getDebuglevelKind()
* @generated
*/
- int DEBUGLEVEL_KIND = 20;
+ int DEBUGLEVEL_KIND = 21;
/**
@@ -1839,6 +1858,17 @@ public interface CommonPackage extends EPackage {
EClass getTraceElement();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.efm.execution.core.workflow.common.TraceElement#isSelected <em>Selected</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Selected</em>'.
+ * @see org.eclipse.efm.execution.core.workflow.common.TraceElement#isSelected()
+ * @see #getTraceElement()
+ * @generated
+ */
+ EAttribute getTraceElement_Selected();
+
+ /**
* Returns the meta object for the attribute '{@link org.eclipse.efm.execution.core.workflow.common.TraceElement#getNature <em>Nature</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2800,6 +2830,16 @@ public interface CommonPackage extends EPackage {
EAttribute getRedundancyDetection_LoopDetetctionTrivial();
/**
+ * Returns the meta object for enum '{@link org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind <em>Analysis Profile Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Analysis Profile Kind</em>'.
+ * @see org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind
+ * @generated
+ */
+ EEnum getAnalysisProfileKind();
+
+ /**
* Returns the meta object for enum '{@link org.eclipse.efm.execution.core.workflow.common.GraphExplorationStrategyKind <em>Graph Exploration Strategy Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3155,6 +3195,14 @@ public interface CommonPackage extends EPackage {
EClass TRACE_ELEMENT = eINSTANCE.getTraceElement();
/**
+ * The meta object literal for the '<em><b>Selected</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TRACE_ELEMENT__SELECTED = eINSTANCE.getTraceElement_Selected();
+
+ /**
* The meta object literal for the '<em><b>Nature</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3873,6 +3921,16 @@ public interface CommonPackage extends EPackage {
EAttribute REDUNDANCY_DETECTION__LOOP_DETETCTION_TRIVIAL = eINSTANCE.getRedundancyDetection_LoopDetetctionTrivial();
/**
+ * The meta object literal for the '{@link org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind <em>Analysis Profile Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind
+ * @see org.eclipse.efm.execution.core.workflow.common.impl.CommonPackageImpl#getAnalysisProfileKind()
+ * @generated
+ */
+ EEnum ANALYSIS_PROFILE_KIND = eINSTANCE.getAnalysisProfileKind();
+
+ /**
* The meta object literal for the '{@link org.eclipse.efm.execution.core.workflow.common.GraphExplorationStrategyKind <em>Graph Exploration Strategy Kind</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElement.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElement.java
index 66b72a9..3d87665 100644
--- a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElement.java
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElement.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* The following features are supported:
* </p>
* <ul>
+ * <li>{@link org.eclipse.efm.execution.core.workflow.common.TraceElement#isSelected <em>Selected</em>}</li>
* <li>{@link org.eclipse.efm.execution.core.workflow.common.TraceElement#getNature <em>Nature</em>}</li>
* <li>{@link org.eclipse.efm.execution.core.workflow.common.TraceElement#getValue <em>Value</em>}</li>
* </ul>
@@ -33,6 +34,33 @@ import org.eclipse.emf.ecore.EObject;
*/
public interface TraceElement extends EObject {
/**
+ * Returns the value of the '<em><b>Selected</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Selected</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Selected</em>' attribute.
+ * @see #setSelected(boolean)
+ * @see org.eclipse.efm.execution.core.workflow.common.CommonPackage#getTraceElement_Selected()
+ * @model default="true"
+ * @generated
+ */
+ boolean isSelected();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.efm.execution.core.workflow.common.TraceElement#isSelected <em>Selected</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Selected</em>' attribute.
+ * @see #isSelected()
+ * @generated
+ */
+ void setSelected(boolean value);
+
+ /**
* Returns the value of the '<em><b>Nature</b></em>' attribute.
* The literals are from the enumeration {@link org.eclipse.efm.execution.core.workflow.common.TraceElementKind}.
* <!-- begin-user-doc -->
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElementKind.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElementKind.java
index 839530c..93a6559 100644
--- a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElementKind.java
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/TraceElementKind.java
@@ -652,7 +652,7 @@ public enum TraceElementKind implements Enumerator {
* @generated
* @ordered
*/
- RAW_ATTRIBUTE(63, "RAW_ATTRIBUTE", "RAW_ATTRIBUTE"), /**
+ RAW_ATTRIBUTE(63, "RAW_ATTRIBUTE", "__raw__"), /**
* The '<em><b>NODE HEADER</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -692,7 +692,87 @@ public enum TraceElementKind implements Enumerator {
* @generated
* @ordered
*/
- NODE_TRACE_IO(68, "NODE_TRACE_IO", "node#trace#io");
+ NODE_TRACE_IO(68, "NODE_TRACE_IO", "node#trace#io"), /**
+ * The '<em><b>VALUE PARAMETER BEGIN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_PARAMETER_BEGIN_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_PARAMETER_BEGIN(69, "VALUE_PARAMETER_BEGIN", "value#parameter#begin"), /**
+ * The '<em><b>VALUE PARAMETER SEPARATOR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_PARAMETER_SEPARATOR_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_PARAMETER_SEPARATOR(70, "VALUE_PARAMETER_SEPARATOR", "value#parameter#separator"), /**
+ * The '<em><b>VALUE PARAMETER END</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_PARAMETER_END_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_PARAMETER_END(71, "VALUE_PARAMETER_END", "value#parameter#end"), /**
+ * The '<em><b>VALUE ARRAY BEGIN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_ARRAY_BEGIN_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_ARRAY_BEGIN(72, "VALUE_ARRAY_BEGIN", "value#array#begin"), /**
+ * The '<em><b>VALUE ARRAY SEPARATOR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_ARRAY_SEPARATOR_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_ARRAY_SEPARATOR(73, "VALUE_ARRAY_SEPARATOR", "value#array#separator"), /**
+ * The '<em><b>VALUE ARRAY END</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_ARRAY_END_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_ARRAY_END(74, "VALUE_ARRAY_END", "value#array#end"), /**
+ * The '<em><b>VALUE STRUCT BEGIN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_STRUCT_BEGIN_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_STRUCT_BEGIN(75, "VALUE_STRUCT_BEGIN", "value#struct#begin"), /**
+ * The '<em><b>VALUE STRUCT SEPARATOR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_STRUCT_SEPARATOR_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_STRUCT_SEPARATOR(76, "VALUE_STRUCT_SEPARATOR", "value#struct#separator"), /**
+ * The '<em><b>VALUE STRUCT END</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #VALUE_STRUCT_END_VALUE
+ * @generated
+ * @ordered
+ */
+ VALUE_STRUCT_END(77, "VALUE_STRUCT_END", "value#struct#end"), /**
+ * The '<em><b>TIPS</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #TIPS_VALUE
+ * @generated
+ * @ordered
+ */
+ TIPS(99, "TIPS", "tips");
/**
* The '<em><b>UNDEFINED</b></em>' literal value.
@@ -1648,7 +1728,7 @@ public enum TraceElementKind implements Enumerator {
* </p>
* <!-- end-user-doc -->
* @see #RAW_ATTRIBUTE
- * @model
+ * @model literal="__raw__"
* @generated
* @ordered
*/
@@ -1730,6 +1810,156 @@ public enum TraceElementKind implements Enumerator {
public static final int NODE_TRACE_IO_VALUE = 68;
/**
+ * The '<em><b>VALUE PARAMETER BEGIN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE PARAMETER BEGIN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_PARAMETER_BEGIN
+ * @model literal="value#parameter#begin"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_PARAMETER_BEGIN_VALUE = 69;
+
+ /**
+ * The '<em><b>VALUE PARAMETER SEPARATOR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE PARAMETER SEPARATOR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_PARAMETER_SEPARATOR
+ * @model literal="value#parameter#separator"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_PARAMETER_SEPARATOR_VALUE = 70;
+
+ /**
+ * The '<em><b>VALUE PARAMETER END</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE PARAMETER END</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_PARAMETER_END
+ * @model literal="value#parameter#end"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_PARAMETER_END_VALUE = 71;
+
+ /**
+ * The '<em><b>VALUE ARRAY BEGIN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE ARRAY BEGIN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_ARRAY_BEGIN
+ * @model literal="value#array#begin"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_ARRAY_BEGIN_VALUE = 72;
+
+ /**
+ * The '<em><b>VALUE ARRAY SEPARATOR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE ARRAY SEPARATOR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_ARRAY_SEPARATOR
+ * @model literal="value#array#separator"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_ARRAY_SEPARATOR_VALUE = 73;
+
+ /**
+ * The '<em><b>VALUE ARRAY END</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE ARRAY END</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_ARRAY_END
+ * @model literal="value#array#end"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_ARRAY_END_VALUE = 74;
+
+ /**
+ * The '<em><b>VALUE STRUCT BEGIN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE STRUCT BEGIN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_STRUCT_BEGIN
+ * @model literal="value#struct#begin"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_STRUCT_BEGIN_VALUE = 75;
+
+ /**
+ * The '<em><b>VALUE STRUCT SEPARATOR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE STRUCT SEPARATOR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_STRUCT_SEPARATOR
+ * @model literal="value#struct#separator"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_STRUCT_SEPARATOR_VALUE = 76;
+
+ /**
+ * The '<em><b>VALUE STRUCT END</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>VALUE STRUCT END</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #VALUE_STRUCT_END
+ * @model literal="value#struct#end"
+ * @generated
+ * @ordered
+ */
+ public static final int VALUE_STRUCT_END_VALUE = 77;
+
+ /**
+ * The '<em><b>TIPS</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>TIPS</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #TIPS
+ * @model literal="tips"
+ * @generated
+ * @ordered
+ */
+ public static final int TIPS_VALUE = 99;
+
+ /**
* An array of all the '<em><b>Trace Element Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1806,6 +2036,16 @@ public enum TraceElementKind implements Enumerator {
NODE_INFO,
NODE_TRACE_RUN,
NODE_TRACE_IO,
+ VALUE_PARAMETER_BEGIN,
+ VALUE_PARAMETER_SEPARATOR,
+ VALUE_PARAMETER_END,
+ VALUE_ARRAY_BEGIN,
+ VALUE_ARRAY_SEPARATOR,
+ VALUE_ARRAY_END,
+ VALUE_STRUCT_BEGIN,
+ VALUE_STRUCT_SEPARATOR,
+ VALUE_STRUCT_END,
+ TIPS,
};
/**
@@ -1931,6 +2171,16 @@ public enum TraceElementKind implements Enumerator {
case NODE_INFO_VALUE: return NODE_INFO;
case NODE_TRACE_RUN_VALUE: return NODE_TRACE_RUN;
case NODE_TRACE_IO_VALUE: return NODE_TRACE_IO;
+ case VALUE_PARAMETER_BEGIN_VALUE: return VALUE_PARAMETER_BEGIN;
+ case VALUE_PARAMETER_SEPARATOR_VALUE: return VALUE_PARAMETER_SEPARATOR;
+ case VALUE_PARAMETER_END_VALUE: return VALUE_PARAMETER_END;
+ case VALUE_ARRAY_BEGIN_VALUE: return VALUE_ARRAY_BEGIN;
+ case VALUE_ARRAY_SEPARATOR_VALUE: return VALUE_ARRAY_SEPARATOR;
+ case VALUE_ARRAY_END_VALUE: return VALUE_ARRAY_END;
+ case VALUE_STRUCT_BEGIN_VALUE: return VALUE_STRUCT_BEGIN;
+ case VALUE_STRUCT_SEPARATOR_VALUE: return VALUE_STRUCT_SEPARATOR;
+ case VALUE_STRUCT_END_VALUE: return VALUE_STRUCT_END;
+ case TIPS_VALUE: return TIPS;
}
return null;
}
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonFactoryImpl.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonFactoryImpl.java
index dce2cfa..e394ffc 100644
--- a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonFactoryImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonFactoryImpl.java
@@ -93,6 +93,8 @@ public class CommonFactoryImpl extends EFactoryImpl implements CommonFactory {
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
+ case CommonPackage.ANALYSIS_PROFILE_KIND:
+ return createAnalysisProfileKindFromString(eDataType, initialValue);
case CommonPackage.GRAPH_EXPLORATION_STRATEGY_KIND:
return createGraphExplorationStrategyKindFromString(eDataType, initialValue);
case CommonPackage.CONSOLE_VERBOSITY_KIND:
@@ -120,6 +122,8 @@ public class CommonFactoryImpl extends EFactoryImpl implements CommonFactory {
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
+ case CommonPackage.ANALYSIS_PROFILE_KIND:
+ return convertAnalysisProfileKindToString(eDataType, instanceValue);
case CommonPackage.GRAPH_EXPLORATION_STRATEGY_KIND:
return convertGraphExplorationStrategyKindToString(eDataType, instanceValue);
case CommonPackage.CONSOLE_VERBOSITY_KIND:
@@ -274,6 +278,26 @@ public class CommonFactoryImpl extends EFactoryImpl implements CommonFactory {
* <!-- end-user-doc -->
* @generated
*/
+ public AnalysisProfileKind createAnalysisProfileKindFromString(EDataType eDataType, String initialValue) {
+ AnalysisProfileKind result = AnalysisProfileKind.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertAnalysisProfileKindToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public GraphExplorationStrategyKind createGraphExplorationStrategyKindFromString(EDataType eDataType, String initialValue) {
GraphExplorationStrategyKind result = GraphExplorationStrategyKind.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonPackageImpl.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonPackageImpl.java
index 88087da..969e258 100644
--- a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonPackageImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/CommonPackageImpl.java
@@ -14,6 +14,7 @@ package org.eclipse.efm.execution.core.workflow.common.impl;
import org.eclipse.efm.execution.core.workflow.WorkflowPackage;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.execution.core.workflow.common.CheckingScopeKind;
import org.eclipse.efm.execution.core.workflow.common.CommonFactory;
import org.eclipse.efm.execution.core.workflow.common.CommonPackage;
@@ -170,6 +171,13 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
* <!-- end-user-doc -->
* @generated
*/
+ private EEnum analysisProfileKindEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EEnum graphExplorationStrategyKindEEnum = null;
/**
@@ -573,7 +581,7 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getTraceElement_Nature() {
+ public EAttribute getTraceElement_Selected() {
return (EAttribute)traceElementEClass.getEStructuralFeatures().get(0);
}
@@ -582,7 +590,7 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getTraceElement_Value() {
+ public EAttribute getTraceElement_Nature() {
return (EAttribute)traceElementEClass.getEStructuralFeatures().get(1);
}
@@ -591,6 +599,15 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getTraceElement_Value() {
+ return (EAttribute)traceElementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getTraceSpecification() {
return traceSpecificationEClass;
}
@@ -1365,6 +1382,15 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EEnum getAnalysisProfileKind() {
+ return analysisProfileKindEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EEnum getGraphExplorationStrategyKind() {
return graphExplorationStrategyKindEEnum;
}
@@ -1488,6 +1514,7 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
createEAttribute(consoleLogFormatEClass, CONSOLE_LOG_FORMAT__VERBOSITY);
traceElementEClass = createEClass(TRACE_ELEMENT);
+ createEAttribute(traceElementEClass, TRACE_ELEMENT__SELECTED);
createEAttribute(traceElementEClass, TRACE_ELEMENT__NATURE);
createEAttribute(traceElementEClass, TRACE_ELEMENT__VALUE);
@@ -1585,6 +1612,7 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
createEAttribute(redundancyDetectionEClass, REDUNDANCY_DETECTION__LOOP_DETETCTION_TRIVIAL);
// Create enums
+ analysisProfileKindEEnum = createEEnum(ANALYSIS_PROFILE_KIND);
graphExplorationStrategyKindEEnum = createEEnum(GRAPH_EXPLORATION_STRATEGY_KIND);
consoleVerbosityKindEEnum = createEEnum(CONSOLE_VERBOSITY_KIND);
traceElementKindEEnum = createEEnum(TRACE_ELEMENT_KIND);
@@ -1665,6 +1693,7 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
initEAttribute(getConsoleLogFormat_Verbosity(), this.getConsoleVerbosityKind(), "verbosity", "UNDEFINED", 0, 1, ConsoleLogFormat.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(traceElementEClass, TraceElement.class, "TraceElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getTraceElement_Selected(), ecorePackage.getEBoolean(), "selected", "true", 0, 1, TraceElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getTraceElement_Nature(), this.getTraceElementKind(), "nature", null, 0, 1, TraceElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getTraceElement_Value(), ecorePackage.getEJavaObject(), "value", null, 0, 1, TraceElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1762,6 +1791,14 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
initEAttribute(getRedundancyDetection_LoopDetetctionTrivial(), ecorePackage.getEBoolean(), "loopDetetctionTrivial", "true", 0, 1, RedundancyDetection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
+ initEEnum(analysisProfileKindEEnum, AnalysisProfileKind.class, "AnalysisProfileKind");
+ addEEnumLiteral(analysisProfileKindEEnum, AnalysisProfileKind.ANALYSIS_UNDEFINED_PROFILE);
+ addEEnumLiteral(analysisProfileKindEEnum, AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE);
+ addEEnumLiteral(analysisProfileKindEEnum, AnalysisProfileKind.ANALYSIS_TRANSITION_COVERAGE_PROFILE);
+ addEEnumLiteral(analysisProfileKindEEnum, AnalysisProfileKind.ANALYSIS_BEHAVIOR_SELECTION_PROFILE);
+ addEEnumLiteral(analysisProfileKindEEnum, AnalysisProfileKind.ANALYSIS_TEST_OFFLINE_PROFILE);
+ addEEnumLiteral(analysisProfileKindEEnum, AnalysisProfileKind.ANALYSIS_ACSL_GENERATION_PROFILE);
+
initEEnum(graphExplorationStrategyKindEEnum, GraphExplorationStrategyKind.class, "GraphExplorationStrategyKind");
addEEnumLiteral(graphExplorationStrategyKindEEnum, GraphExplorationStrategyKind.BEST_FIRST_SEARCH);
addEEnumLiteral(graphExplorationStrategyKindEEnum, GraphExplorationStrategyKind.BREADTH_FIRST_SEARCH);
@@ -1849,6 +1886,16 @@ public class CommonPackageImpl extends EPackageImpl implements CommonPackage {
addEEnumLiteral(traceElementKindEEnum, TraceElementKind.NODE_INFO);
addEEnumLiteral(traceElementKindEEnum, TraceElementKind.NODE_TRACE_RUN);
addEEnumLiteral(traceElementKindEEnum, TraceElementKind.NODE_TRACE_IO);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_PARAMETER_BEGIN);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_PARAMETER_SEPARATOR);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_PARAMETER_END);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_ARRAY_BEGIN);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_ARRAY_SEPARATOR);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_ARRAY_END);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_STRUCT_BEGIN);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_STRUCT_SEPARATOR);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.VALUE_STRUCT_END);
+ addEEnumLiteral(traceElementKindEEnum, TraceElementKind.TIPS);
initEEnum(heuristicClassKindEEnum, HeuristicClassKind.class, "HeuristicClassKind");
addEEnumLiteral(heuristicClassKindEEnum, HeuristicClassKind.BASIC);
diff --git a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/TraceElementImpl.java b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/TraceElementImpl.java
index eb8ec22..9cc3f13 100644
--- a/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/TraceElementImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src-gen/org/eclipse/efm/execution/core/workflow/common/impl/TraceElementImpl.java
@@ -31,6 +31,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
* The following features are implemented:
* </p>
* <ul>
+ * <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.TraceElementImpl#isSelected <em>Selected</em>}</li>
* <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.TraceElementImpl#getNature <em>Nature</em>}</li>
* <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.TraceElementImpl#getValue <em>Value</em>}</li>
* </ul>
@@ -39,6 +40,26 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
*/
public class TraceElementImpl extends MinimalEObjectImpl.Container implements TraceElement {
/**
+ * The default value of the '{@link #isSelected() <em>Selected</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSelected()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean SELECTED_EDEFAULT = true;
+
+ /**
+ * The cached value of the '{@link #isSelected() <em>Selected</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSelected()
+ * @generated
+ * @ordered
+ */
+ protected boolean selected = SELECTED_EDEFAULT;
+
+ /**
* The default value of the '{@link #getNature() <em>Nature</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -102,6 +123,27 @@ public class TraceElementImpl extends MinimalEObjectImpl.Container implements Tr
* <!-- end-user-doc -->
* @generated
*/
+ public boolean isSelected() {
+ return selected;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelected(boolean newSelected) {
+ boolean oldSelected = selected;
+ selected = newSelected;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.TRACE_ELEMENT__SELECTED, oldSelected, selected));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public TraceElementKind getNature() {
return nature;
}
@@ -147,6 +189,8 @@ public class TraceElementImpl extends MinimalEObjectImpl.Container implements Tr
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case CommonPackage.TRACE_ELEMENT__SELECTED:
+ return isSelected();
case CommonPackage.TRACE_ELEMENT__NATURE:
return getNature();
case CommonPackage.TRACE_ELEMENT__VALUE:
@@ -163,6 +207,9 @@ public class TraceElementImpl extends MinimalEObjectImpl.Container implements Tr
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
+ case CommonPackage.TRACE_ELEMENT__SELECTED:
+ setSelected((Boolean)newValue);
+ return;
case CommonPackage.TRACE_ELEMENT__NATURE:
setNature((TraceElementKind)newValue);
return;
@@ -181,6 +228,9 @@ public class TraceElementImpl extends MinimalEObjectImpl.Container implements Tr
@Override
public void eUnset(int featureID) {
switch (featureID) {
+ case CommonPackage.TRACE_ELEMENT__SELECTED:
+ setSelected(SELECTED_EDEFAULT);
+ return;
case CommonPackage.TRACE_ELEMENT__NATURE:
setNature(NATURE_EDEFAULT);
return;
@@ -199,6 +249,8 @@ public class TraceElementImpl extends MinimalEObjectImpl.Container implements Tr
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case CommonPackage.TRACE_ELEMENT__SELECTED:
+ return selected != SELECTED_EDEFAULT;
case CommonPackage.TRACE_ELEMENT__NATURE:
return nature != NATURE_EDEFAULT;
case CommonPackage.TRACE_ELEMENT__VALUE:
@@ -217,7 +269,9 @@ public class TraceElementImpl extends MinimalEObjectImpl.Container implements Tr
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (nature: ");
+ result.append(" (selected: ");
+ result.append(selected);
+ result.append(", nature: ");
result.append(nature);
result.append(", value: ");
result.append(value);
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 cafe137..1db03bc 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
@@ -12,6 +12,9 @@
*******************************************************************************/
package org.eclipse.efm.execution.core;
+import java.util.Arrays;
+import java.util.List;
+
public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationSyntax {
/**
@@ -25,19 +28,6 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public final String WORKSPACE_SELECTION_DIALOG =
Activator.PLUGIN_ID + ".WORKSPACE_SELECTION_DIALOG"; //$NON-NLS-1$
- ////////////////////////////////////////////////////////////////////////////
- // DIRECTOR: ANALYSIS PROFILE a.k.a. MODEL | TESTOFFLINE
- ////////////////////////////////////////////////////////////////////////////
-
- public static final String ANALYSIS_PROFILE_MODEL_UNDEFINED = "";
-
- public static final String ANALYSIS_PROFILE_MODEL_EXPLORATION = "Exploration";
-
- public static final String ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION = "Transition Coverage";
-
- public static final String ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR = "Behavior Selection";
-
- public static final String ANALYSIS_PROFILE_MODEL_TEST_OFFLINE = "Test Offline";
////////////////////////////////////////////////////////////////////////////
// LAUNCH CONFIGURATION PLUGIN PREFIX ID
@@ -91,7 +81,7 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
PLUGIN_LAUNCH_ID + ".ATTR_SPECIFICATION_MODEL_FILE_LOCATION"; //$NON-NLS-1$
public static final String DEFAULT_SPECIFICATION_MODEL_FILE_LOCATION =
- "<spec-model-file-location>"; //$NON-NLS-1$
+ "<spec-model-file-location.xlia>"; //$NON-NLS-1$
public static final String ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE =
PLUGIN_LAUNCH_ID + ".ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE"; //$NON-NLS-1$
@@ -108,7 +98,7 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
PLUGIN_LAUNCH_ID + ".ATTR_WORKSPACE_ROOT_LOCATION"; //$NON-NLS-1$
public static final String DEFAULT_WORKSPACE_ROOT_LOCATION =
- "<workspace-root-location>"; //$NON-NLS-1$
+ "<workspace-root-folder-location>"; //$NON-NLS-1$
public static final String ATTR_WORKSPACE_OUTPUT_FOLDER_NAME =
PLUGIN_LAUNCH_ID + ".ATTR_WORKSPACE_OUTPUT_FOLDER_NAME"; //$NON-NLS-1$
@@ -341,27 +331,22 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public static final String ATTR_TEST_OFFLINE_OBSERVABLE_SPECIFICATION =
PLUGIN_LAUNCH_ID + ".ATTR_TEST_OFFLINE_OBSERVABLE_TRACE"; //$NON-NLS-1$
- public static final String DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION
- = "//[*] , use for ANY element w.r.t. the kind"
- + "\n//com_element_id ::= <port_name_id> | <signal_name_id>"
-
- + "\n//com = <machine_name_id> -> <com_element_id>"
-
-// + "\n//input#env = <machine_name_id> -> <com_element_id>"
-// + "\n//output#env = <machine_name_id> -> <com_element_id>"
-
-// + "\n//input#rdv = <machine_name_id> -> <com_element_id>"
-// + "\n//output#rdv = <machine_name_id> -> <com_element_id>"
-
- + "\n//input = <machine_name_id> -> <com_element_id>"
- + "\n//output = <machine_name_id> -> <com_element_id>"; //$NON-NLS-1$
+ public static final List<String> DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION
+ = Arrays.asList(
+ "//[*] , use for ANY element w.r.t. the kind",
+ "//com_element_id ::= <port_name_id> | <signal_name_id>",
+ "input#env = [*]",
+ "output#env = [*]"
+ );
public static final String ATTR_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION =
PLUGIN_LAUNCH_ID + ".ATTR_TEST_OFFLINE_CONTROLLABLE_TRACE"; //$NON-NLS-1$
- public static final String DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION =
- "input#env = [*]"; //$NON-NLS-1$
+ public static final List<String> DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION
+ = Arrays.asList(
+ "input#env = [*]"
+ );
////////////////////////////////////////////////////////////////////////////
@@ -377,9 +362,11 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public static final String ATTR_TRACE_EXTENSION_OBJECTIVE =
PLUGIN_LAUNCH_ID + ".ATTR_TRACE_EXTENSION_OBJECTIVE"; //$NON-NLS-1$
- public static final String DEFAULT_TRACE_EXTENSION_OBJECTIVE =
- "output#env = [*]\n"
- + SYNTAX_TRACE_SPECIFICATION_LINK; //$NON-NLS-1$
+ public static final List<String> DEFAULT_TRACE_EXTENSION_OBJECTIVE
+ = Arrays.asList(
+ SYNTAX_TRACE_SPECIFICATION_LINK,
+ "output#env = [*]"
+ );
public static final String ATTR_BASIC_TRACE_ENABLED_GENERATION =
@@ -387,13 +374,13 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public static final boolean DEFAULT_BASIC_TRACE_ENABLED_GENERATION = false;
-
+
public static final String ATTR_BASIC_TRACE_LIFELINES_ENABLED_PRINTING =
PLUGIN_LAUNCH_ID + ".ATTR_BASIC_LIFELINES_TRACE_ENABLED_PRINTING"; //$NON-NLS-1$
public static final boolean DEFAULT_BASIC_TRACE_LIFELINES_ENABLED_PRINTING = false;
-
+
public static final String DEFAULT_BASIC_TRACE_FOLDER_NAME =
"basic"; //$NON-NLS-1$
@@ -452,44 +439,52 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public static final String ATTR_BASIC_TRACE_DETAILS_ELEMENT_LIST =
PLUGIN_LAUNCH_ID + ".ATTR_BASIC_TRACE_DETAILS_ELEMENT_LIST"; //$NON-NLS-1$
- public static final String DEFAULT_BASIC_TRACE_DETAILS_ELEMENT_LIST =
- SYNTAX_TRACE_SPECIFICATION_LINK; //$NON-NLS-1$
+ public static final List<String> DEFAULT_BASIC_TRACE_DETAILS_ELEMENT_LIST
+ = Arrays.asList(
+ SYNTAX_TRACE_SPECIFICATION_LINK
+ );
public static final String ATTR_BASIC_TRACE_FORMAT_ELEMENT_LIST =
PLUGIN_LAUNCH_ID + ".ATTR_BASIC_TRACE_FORMAT_ELEMENT_LIST"; //$NON-NLS-1$
- public static final String DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST
-// %1% --> string message
-// %2% --> execution context identifier
- = "comment = \"\\t// %1%\\n\""
-// %1% --> condition
- + "\npath#condition = \"\\tPC: %1%\\n\""
- + "\npath#timed#condition = \"\\tPtC: %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
-// %4% --> value
-// %5% --> machine target identifier name
- + "\ntime = \"\\tdelta = %4%\\n\""
-// + "\nassign = \"\\t2%:%3%=%4%\\n\""
- + "\nassign = \"\\t%3%=%4%\\n\""
- + "\nnewfresh = \"\\tnewfresh(%2%:%3%) <- %4%\\n\""
-
- + "\ninput#env = \"\\tINPUT %2%:%3%%4%\\n\""
- + "\ninput#rdv = \"\\tinput %2%:%3%%4%\\n\""
- + "\ninput = \"\\tinput %2%:%3%%4%\\n\""
-// + "\ninput = \"\\t%2%->%3% ? %4%\\n\""
- + "\noutput#env = \"\\tOUTPUT %2%:%3%%4%\\n\""
- + "\noutput#rdv = \"\\toutput %2%:%3%%4%\\n\""
- + "\noutput = \"\\toutput %2%:%3%%4%\\n\""
-
- + "\nroutine = \"\\tinvoke %2%:%3%\\n\""
- + "\ntransition = \"\\tfired transition %2%:%3%\\n\""
-
- + "\nmachine = \"\\trun %2%:%3%\\n\""; //$NON-NLS-1$
+ public static final List<String> DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST
+ = Arrays.asList(
+// %1% --> string message
+// %2% --> execution context identifier
+ "comment = \"\\t// %1%\\n\"",
+// %1% --> condition,
+ "path#condition = \"\\tPC: %1%\\n\"",
+ "path#timed#condition = \"\\tPtC: %1%\\n\"",
+ "node#condition = \"\\tNC: %1%\\n\"",
+ "node#timed#condition = \"\\tNtC: %1%\\n\"",
+// %1% --> machine runtime pid
+// %2% --> machine identifier name
+// %3% --> port | signal | variable | machine | transition | routine
+// %4% --> value
+// %5% --> machine target identifier name
+ "time = \"\\tdelta = %4%\\n\"",
+// "assign = \"\\t2%:%3%=%4%\\n\"",
+ "assign = \"\\t%3%=%4%\\n\"",
+ "newfresh = \"\\tnewfresh(%2%:%3%) <- %4%\\n\"",
+
+ "input#env = \"\\tINPUT %2%:%3%%4%\\n\"",
+ "input#rdv = \"\\tinput %2%:%3%%4%\\n\"",
+ "input = \"\\tinput %2%:%3%%4%\\n\"",
+// "input = \"\\t%2%->%3% ? %4%\\n\"",
+ "output#env = \"\\tOUTPUT %2%:%3%%4%\\n\"",
+ "output#rdv = \"\\toutput %2%:%3%%4%\\n\"",
+ "output = \"\\toutput %2%:%3%%4%\\n\"",
+
+ "routine = \"\\tinvoke %2%:%3%\\n\"",
+ "transition = \"\\tfired transition %2%:%3%\\n\"",
+
+ "machine = \"\\trun %2%:%3%\\n\"",
+
+ "value#parameter#begin = \"(\"",
+ "value#parameter#separator = \",\"",
+ "value#parameter#end = \")\""
+ );
// TTCN Tests Generation
@@ -509,10 +504,12 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
"TTCN"; //$NON-NLS-1$
- public static final String DEFAULT_TTCN_TRACE_SPECIFICATION
- = "input#env = [*]\n"
- + "output#env = [*]\n"
- + SYNTAX_TRACE_SPECIFICATION_LINK; //$NON-NLS-1$
+ public static final List<String> DEFAULT_TTCN_TRACE_SPECIFICATION
+ = Arrays.asList(
+ SYNTAX_TRACE_SPECIFICATION_LINK,
+ "input#env = [*]\n",
+ "output#env = [*]\n"
+ );
@@ -692,121 +689,127 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public static final String ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC =
PLUGIN_LAUNCH_ID + ".ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC"; //$NON-NLS-1$
- public static final String DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC
- = "com = [*]\n"
- + "variable = [*]\n"
- + SYNTAX_TRACE_SPECIFICATION_LINK; //$NON-NLS-1$
+ public static final List<String> DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC
+ = Arrays.asList(
+ SYNTAX_TRACE_SPECIFICATION_LINK,
+ "com = [*]\n",
+ "variable = [*]\n"
+ );
public static final String ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC =
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
- + "\nlifeline#state = %2%:%4%"
- // %1% --> condition
- + "\npath#condition = PC: %1%"
- + "\npath#timed#condition = PtC: %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
- // %4% --> value
-// + "\nassign = %2%:%3%=%4%"
- + "\nassign = %3%=%4%"
- + "\nnewfresh = newfresh(%2%:%3%) <- %4%"
-
- + "\ninput#env = INPUT %2%:%3%%4%"
- + "\ninput#rdv = input %2%:%3%%4%"
- + "\ninput = input %2%:%3%%4%"
-// + "\ninput = %1%->%3% ? %4%"
-
- + "\noutput#env = OUTPUT %2%:%3%%4%"
- + "\noutput#rdv = output %2%:%3%%4%"
- + "\noutput = output %2%:%3%%4%"
-// + "\noutput = %1%->%3% ? %4%"
-
- + "\nroutine = invoke %2%:%3%"
- + "\ntransition = fired transition %3%"
-
- + "\nmachine = \"run %2%:%3%\""; //$NON-NLS-1$
+ public static final List<String> DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC
+ = Arrays.asList(
+ // %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%\"",
+ // %1% --> condition
+ "path#condition = \"PC: %1%\"",
+ "path#timed#condition = \"PtC: %1%\"",
+ "node#condition = \"NC: %1%\"",
+ "node#timed#condition = \"NtC: %1%\"",
+ // %1% --> machine runtime pid
+ // %2% --> machine identifier name
+ // %3% --> port | signal | variable | machine | transition | routine
+ // %4% --> value
+// "assign = \"%2%:%3%=%4%\"",
+ "assign = \"%3%=%4%\"",
+ "newfresh = \"newfresh(%2%:%3%) <- %4%\"",
+
+ "input#env = \"INPUT %2%:%3%%4%\"",
+ "input#rdv = \"input %2%:%3%%4%\"",
+ "input = \"input %2%:%3%%4%\"",
+// "input = \"%1%->%3% ? %4%\"",
+
+ "output#env = \"OUTPUT %2%:%3%%4%\"",
+ "output#rdv = \"output %2%:%3%%4%\"",
+ "output = \"output %2%:%3%%4%\"",
+// "output = \"%1%->%3% ? %4%\"",
+
+ "routine = \"invoke %2%:%3%\"",
+ "transition = \"fired transition %3%\"",
+
+ "machine = \"run %2%:%3%\""
+ );
public static final String ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC =
PLUGIN_LAUNCH_ID + ".ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC"; //$NON-NLS-1$
- public static final String DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC
- = // Node color / shape
- "node#color = 'lightblue'"
- + "\nnode#shape = 'ellipse'"
- + "\nnode#style = 'filled'"
+ public static final List<String> DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC
+ // Node color / shape
+ = Arrays.asList(
+ "node#color = 'lightblue'",
+ "node#shape = 'ellipse'",
+ "node#style = 'filled'",
- + "\nnode#passed#color = 'yellow'"
- + "\nnode#passed#shape = 'ellipse'"
- + "\nnode#passed#style = 'filled'"
+ "node#passed#color = 'yellow'",
+ "node#passed#shape = 'ellipse'",
+ "node#passed#style = 'filled'",
- + "\nnode#failed#color = 'red'"
- + "\nnode#failed#shape = 'doubleoctagon'"
- + "\nnode#failed#style = 'filled'"
+ "node#failed#color = 'red'",
+ "node#failed#shape = 'doubleoctagon'",
+ "node#failed#style = 'filled'",
- + "\nnode#inconclusive#color = 'orange'"
- + "\nnode#inconclusive#shape = 'octagon'"
- + "\nnode#inconclusive#style = 'filled'"
+ "node#inconclusive#color = 'orange'",
+ "node#inconclusive#shape = 'octagon'",
+ "node#inconclusive#style = 'filled'",
- + "\nnode#aborted#color = 'red'"
- + "\nnode#aborted#shape = 'octagon'"
- + "\nnode#aborted#style = 'filled'"
+ "node#aborted#color = 'red'",
+ "node#aborted#shape = 'octagon'",
+ "node#aborted#style = 'filled'",
- + "\nnode#warning#color = 'orange'"
- + "\nnode#warning#shape = 'ellipse'"
- + "\nnode#warning#style = 'filled'"
+ "node#warning#color = 'orange'",
+ "node#warning#shape = 'ellipse'",
+ "node#warning#style = 'filled'",
- + "\nnode#error#color = 'red'"
- + "\nnode#error#shape = 'ellipse'"
- + "\nnode#error#style = 'filled'"
+ "node#error#color = 'red'",
+ "node#error#shape = 'ellipse'",
+ "node#error#style = 'filled'",
- + "\nnode#alert#color = 'red'"
- + "\nnode#alert#shape = 'ellipse'"
- + "\nnode#alert#style = 'filled'"
+ "node#alert#color = 'red'",
+ "node#alert#shape = 'ellipse'",
+ "node#alert#style = 'filled'",
- + "\nnode#exit#color = 'orange'"
- + "\nnode#exit#shape = 'tripleoctagon'"
- + "\nnode#exit#style = 'filled'"
+ "node#exit#color = 'orange'",
+ "node#exit#shape = 'tripleoctagon'",
+ "node#exit#style = 'filled'",
- + "\nnode#redundancy#source#color = 'green'"
- + "\nnode#redundancy#source#shape = 'cds'"
- + "\nnode#redundancy#source#style = 'filled'"
+ "node#redundancy#source#color = 'green'",
+ "node#redundancy#source#shape = 'cds'",
+ "node#redundancy#source#style = 'filled'",
- + "\nnode#redundancy#target#color = 'greenyellow'"
- + "\nnode#redundancy#target#shape = 'septagon'"
- + "\nnode#redundancy#target#style = 'filled'"
+ "node#redundancy#target#color = 'greenyellow'",
+ "node#redundancy#target#shape = 'septagon'",
+ "node#redundancy#target#style = 'filled'",
- // Path color / shape
- + "\npath#passed#color = 'lawngreen'"
- + "\npath#passed#shape = 'tripleoctagon'"
- + "\npath#passed#style = 'filled'"
+ // Path color / shape
+ "path#passed#color = 'lawngreen'",
+ "path#passed#shape = 'tripleoctagon'",
+ "path#passed#style = 'filled'",
- + "\npath#failed#color = 'red'"
- + "\npath#failed#shape = 'doubleoctagon'"
- + "\npath#failed#style = 'filled'"
+ "path#failed#color = 'red'",
+ "path#failed#shape = 'doubleoctagon'",
+ "path#failed#style = 'filled'",
- + "\npath#inconclusive#color = 'orange'"
- + "\npath#inconclusive#shape = 'octagon'"
- + "\npath#inconclusive#style = 'filled'"
+ "path#inconclusive#color = 'orange'",
+ "path#inconclusive#shape = 'octagon'",
+ "path#inconclusive#style = 'filled'",
- + "\npath#aborted#color = 'red'"
- + "\npath#aborted#shape = 'octagon'"
- + "\npath#aborted#style = 'filled'";
+ "path#aborted#color = 'red'",
+ "path#aborted#shape = 'octagon'",
+ "path#aborted#style = 'filled'"
+ );
// Second Symbex Workflow Page
@@ -851,9 +854,11 @@ public interface IWorkflowConfigurationConstants extends IWorkflowConfigurationS
public static final String ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC =
PLUGIN_LAUNCH_ID + ".ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC"; //$NON-NLS-1$
- public static final String DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC
- = "com = [*]\n"
- + SYNTAX_TRACE_SPECIFICATION_LINK; //$NON-NLS-1$
+ public static final List<String> DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC
+ = Arrays.asList(
+ SYNTAX_TRACE_SPECIFICATION_LINK,
+ "com = [*]\n"
+ );
public static final String ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC =
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationSyntax.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationSyntax.java
index e4126cb..59653cb 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationSyntax.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/IWorkflowConfigurationSyntax.java
@@ -12,6 +12,9 @@
*******************************************************************************/
package org.eclipse.efm.execution.core;
+import java.util.Arrays;
+import java.util.List;
+
public interface IWorkflowConfigurationSyntax {
////////////////////////////////////////////////////////////////////////////
@@ -21,24 +24,26 @@ public interface IWorkflowConfigurationSyntax {
public static final String BEHAVIOR_DESCRIPTION
= "Select a list of elements to characterize the behavior to be find."
+ "\nThe list can be a set of following elements:"
- + "\n\t- transition =\"a transition name\""
- + "\n\t- state =\"a state name\""
- + "\n\t- input =\"an input name used in a statement\""
- + "\n\t- output =\"an output name used in a statement\""
- + "\n\t- com =\"a com (input or output) name used in a statement\""
+ + "\n\t- transition =\"a-transition-name\""
+ + "\n\t- state =\"a-state-name\""
+ + "\n\t- input =\"an_input_port_or_signal_used_in_a_statement\""
+ + "\n\t_ output =\"an_output_port_or_signal_used_in_a_statement\""
+ + "\n\t_ com =\"a_com_input_or_output_port_or_signal_used_in_a_statement\""
+ "\nAll items must be separated by newline or semicolon.";
- public static final String BEHAVIOR_INITIAL_SAMPLE
- = "// Sequence of elements (separated by newline or semicolon) "
- + "\ncharacterizing the desired behavior."
- + "\n// The elements of the sequence may be selected from:"
- + "\ntransition =\"<transition-name-id>\""
- + "\nstate =\"<state-name-id>\""
- + "\ninput =\"<input-port-or-signal-name-id>\""
- + "\ninout =\"<inout-port-or-signal-name-id>\""
- + "\noutput =\"<output-port-or-signal-name-id>\""
- + "\ncom =\"<input-or-output-port-or-signal-name-id>\"";
- // + "\nformula=\"<predicat-expression-on-variable>\"";
+ public static final List<String> BEHAVIOR_INITIAL_SAMPLE
+ = Arrays.asList(
+ "// Sequence of elements (separated by newline or semicolon) "
+ + "\ncharacterizing the desired behavior."
+// "\n// The elements of the sequence may be selected from:",
+// "\ntransition =\"<transition_name_id>\"",
+// "\nstate =\"<state_name_id>\"",
+// "\ninput =\"<input_port_or_signal_name_id>\"",
+// "\ninout =\"<inout_port_or_signal_name_id>\"",
+// "\noutput =\"<output_port_or_signal_name_id>\"",
+// "\ncom =\"<input_or_output_port_or_signal_name_id>\"",
+// "\nformula=\"<predicat_expression_on_variable>\""
+ );
////////////////////////////////////////////////////////////////////////////
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/util/WorkflowFileUtils.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/util/WorkflowFileUtils.java
new file mode 100644
index 0000000..dc7a86a
--- /dev/null
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/util/WorkflowFileUtils.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.efm.execution.core.util;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
+
+public class WorkflowFileUtils implements IWorkflowConfigurationConstants {
+
+ public static final String EMPTY_STRING = "";
+
+ public static final String WORKSPACE_SEGMENT = "${workspace_loc}";
+
+ public static final String WORKSPACE_PREFIX = WORKSPACE_SEGMENT + IPath.SEPARATOR;
+
+
+ public static final Path WORKSPACE_PREFIX_PATH = new Path( "${workspace_loc}" );
+
+
+ public static final IPath WORKSPACE_PATH =
+ ResourcesPlugin.getWorkspace().getRoot().getLocation();
+
+ public static final String WORKSPACE_LOCATION = WORKSPACE_PATH.toString();
+
+
+ /**
+ * make relative path
+ * @param path
+ * @return
+ */
+ public static IPath makeRelativePath(final IPath path) {
+ final IPath relativePath = //WORKSPACE_PREFIX_PATH.append(
+ path.makeRelativeTo(WORKSPACE_PATH);
+
+ return relativePath;
+ }
+
+ /**
+ * make relative location
+ * @param referencePath
+ * @param location
+ * @return
+ */
+ public static String makeRelativeParentLocation(
+ final IPath referencePath, final String location)
+ {
+ final IPath parentPath = new Path(location).removeLastSegments(1);
+
+ final IPath relativePath = parentPath.makeRelativeTo(referencePath);
+
+ return (relativePath.segmentCount() > 0) ? relativePath.toString() : ".";
+ }
+
+ /**
+ * make relative location
+ * @param location
+ * @return
+ */
+ public static String makeRelativeLocation(final IPath path)
+ {
+ final IPath relativePath = path.makeRelativeTo(WORKSPACE_PATH);
+
+ final String relativeLocation = WORKSPACE_PREFIX + relativePath.toString();
+
+ return relativeLocation;
+ }
+
+ /**
+ * make relative location
+ * @param location
+ * @return
+ */
+ public static String makeRelativeLocation(final String location)
+ {
+ final IPath locationPath = new Path(location);
+ if( (locationPath.segmentCount() == 0)
+ || WORKSPACE_SEGMENT.equals(locationPath.segment(0)))
+ {
+ return location;
+ }
+ else {
+ final String relativeLocation = WORKSPACE_PREFIX
+ + locationPath.makeRelativeTo(WORKSPACE_PATH).toString();
+
+ return relativeLocation;
+ }
+ }
+
+
+ /**
+ * make absolute path
+ * @param path
+ * @return
+ */
+ public static IPath makeAbsolutePath(final IPath path)
+ {
+ if( path.isAbsolute() ) {
+ return path;
+ }
+ else if( path.segmentCount() > 0 )
+ {
+ if( WORKSPACE_SEGMENT.equals(path.segment(0)) )
+ {
+ final IPath absolutePath =
+ WORKSPACE_PATH.append(path.removeFirstSegments(1));
+
+ return absolutePath;
+ }
+ else {
+ final IPath absolutePath = WORKSPACE_PATH.append(path);
+
+ return absolutePath;
+ }
+ }
+
+ return path;
+ }
+
+ /**
+ * make absolute location
+ * @param location
+ * @return
+ */
+ public static String makeAbsoluteLocation(String location)
+ {
+ final IPath absolutePath = makeAbsolutePath(new Path(location));
+
+ return absolutePath.toString();
+ }
+
+
+ /**
+ * Getter for raw location in configuration
+ * @param configuration
+ * @param storeKey
+ * @param defaultLocation
+ * @return
+ */
+ public static String getRawLocation(
+ ILaunchConfiguration configuration,
+ final String storeKey, final String defaultLocation)
+ {
+ String location = null;
+ try {
+ location = configuration.getAttribute(storeKey, defaultLocation);
+ }
+ catch (CoreException e) {
+ e.printStackTrace();
+
+ location = null;
+ }
+
+ return (location != null) ? location : defaultLocation;
+ }
+
+
+ /**
+ * Getter for raw location in configuration
+ * @param configuration
+ * @param storeKey
+ * @return
+ */
+ public static String getAbsoluteLocation(
+ ILaunchConfiguration configuration,
+ final String storeKey, final String defaultLocation)
+ {
+ final String location = makeAbsoluteLocation(
+ getRawLocation(configuration, storeKey, defaultLocation));
+
+ return( location );
+ }
+
+ /**
+ * Getter for raw location in configuration
+ * @param configuration
+ * @param storeKey
+ * @return
+ */
+ public static String getRelativeLocation(
+ ILaunchConfiguration configuration,
+ final String storeKey, final String defaultLocation)
+ {
+ final String location = makeRelativeLocation(
+ getRawLocation(configuration, storeKey, defaultLocation));
+
+ return( location );
+ }
+
+
+ /**
+ * Setter for location in configuration
+ * @param configuration
+ * @param storeKey
+ * @param location
+ */
+ public static void setRelativeLocation(
+ ILaunchConfigurationWorkingCopy configuration,
+ final String storeKey, final String location)
+ {
+ configuration.setAttribute(storeKey, makeRelativeLocation(location));
+ }
+
+
+ /**
+ * filename of the location
+ * @param location
+ * @return
+ */
+ public static String filename(final String location) {
+ final IPath path = new Path(location);
+
+ return (path.segmentCount() > 0 )
+ ? path.lastSegment().toString()
+ : "<no-filename>";
+ }
+
+ /**
+ * basename of the location
+ * @param location
+ * @return
+ */
+ public static String basename(final String location) {
+ final IPath path = new Path(location);
+
+ return (path.segmentCount() > 0 )
+ ? path.removeFileExtension().lastSegment().toString()
+ : "<no-basename>";
+ }
+
+ /**
+ * file location configuration attribute filename
+ * @param configuration
+ * @param storeKey
+ * @return
+ */
+ public static String getModelBasename(ILaunchConfiguration configuration) {
+ String modelPath = getRawLocation(configuration,
+ ATTR_SPECIFICATION_MODEL_FILE_LOCATION, EMPTY_STRING);
+
+ return( modelPath.isEmpty() ? EMPTY_STRING : basename(modelPath) );
+ }
+
+}
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 6408fda..1be5b78 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
@@ -17,6 +17,8 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
+import org.eclipse.efm.execution.core.util.WorkflowFileUtils;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.execution.core.workflow.common.CommonFactory;
import org.eclipse.efm.execution.core.workflow.common.ConsoleLogFormatCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.DeveloperTuningOptionCustomImpl;
@@ -50,14 +52,14 @@ public class DirectorCustomImpl extends DirectorImpl
public static DirectorCustomImpl create(Workflow workflow,
- ILaunchConfiguration configuration, boolean hasSecond) {
+ ILaunchConfiguration configuration, IPath workingPath, boolean hasSecond) {
DirectorCustomImpl director = new DirectorCustomImpl(workflow);
director.setManifest( ManifestCustomImpl.create(true, true) );
- if( ! director.configureProject(configuration) ) {
+ if( ! director.configureProject(configuration, workingPath) ) {
//!! ERROR
}
@@ -83,56 +85,19 @@ public class DirectorCustomImpl extends DirectorImpl
return( director );
}
-
- public static String getModelPath(ILaunchConfiguration configuration) {
- String modelPath;
- try {
- modelPath = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION, "");
- }
- catch (CoreException e) {
- e.printStackTrace();
-
- 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 );
+ public boolean configureProject(
+ ILaunchConfiguration configuration, IPath workingPath) {
+ String modelPath = WorkflowFileUtils.getAbsoluteLocation(
+ configuration, ATTR_SPECIFICATION_MODEL_FILE_LOCATION, "");
- if( (modelPath != null) && (! modelPath.isEmpty()) ) {
+ if( ! modelPath.isEmpty() ) {
Project project = CommonFactory.eINSTANCE.createProject();
- int pos = modelPath.lastIndexOf(IPath.SEPARATOR);
- if( pos > 0 ) {
- project.setSource( modelPath.substring(0, pos) );
- modelPath = modelPath.substring(pos+1);
- }
- project.setModel( modelPath );
+ project.setSource(
+ WorkflowFileUtils.makeRelativeParentLocation(workingPath, modelPath));
+
+ project.setModel( WorkflowFileUtils.filename(modelPath) );
setProject( project );
@@ -151,22 +116,26 @@ public class DirectorCustomImpl extends DirectorImpl
setSupervisor( supervisor );
- String modelAnalysisProfile;
+ AnalysisProfileKind modelAnalysisProfile = null;
try {
- modelAnalysisProfile = configuration.getAttribute(
+ final String strAnalysisProfile = configuration.getAttribute(
ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
- ANALYSIS_PROFILE_MODEL_EXPLORATION);
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE.getLiteral());
+
+ modelAnalysisProfile = AnalysisProfileKind.get(strAnalysisProfile);
}
catch (CoreException e) {
e.printStackTrace();
+ }
- modelAnalysisProfile = ANALYSIS_PROFILE_MODEL_EXPLORATION;
+ if( modelAnalysisProfile == null ) {
+ modelAnalysisProfile = AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
}
boolean isRedundancyDetectionPossible = false;
switch ( modelAnalysisProfile ) {
- case ANALYSIS_PROFILE_MODEL_EXPLORATION: {
+ case ANALYSIS_EXPLORATION_PROFILE: {
//!! NOTHING to do...
// --> only need a Supervisor worker for Model Exploration
@@ -174,7 +143,7 @@ public class DirectorCustomImpl extends DirectorImpl
break;
}
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION: {
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE: {
TransitionCoverageWorkerCustomImpl worker =
TransitionCoverageWorkerCustomImpl.create(
this, configuration);
@@ -189,7 +158,7 @@ public class DirectorCustomImpl extends DirectorImpl
break;
}
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR: {
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE: {
BehaviorCoverageWorkerCustomImpl worker =
BehaviorCoverageWorkerCustomImpl.create(
this, configuration);
@@ -200,7 +169,7 @@ public class DirectorCustomImpl extends DirectorImpl
break;
}
- case ANALYSIS_PROFILE_MODEL_TEST_OFFLINE: {
+ case ANALYSIS_TEST_OFFLINE_PROFILE: {
OfflineTestWorkerCustomImpl worker =
OfflineTestWorkerCustomImpl.create(
this, configuration);
@@ -218,10 +187,10 @@ public class DirectorCustomImpl extends DirectorImpl
}
if( isRedundancyDetectionPossible ) {
- RedundancyDetection redundancy =
+ RedundancyDetection redundancy =
CommonFactory.eINSTANCE.createRedundancyDetection();
getSupervisor().setRedundancy(redundancy);
-
+
boolean enabledRedundancyDetection = false;
try {
enabledRedundancyDetection = configuration.getAttribute(
@@ -236,7 +205,7 @@ public class DirectorCustomImpl extends DirectorImpl
if( ! enabledRedundancyDetection ) {
redundancy.setComparer( null );;
}
-
+
try {
enabledRedundancyDetection = configuration.getAttribute(
ATTR_ENABLED_REDUNDANCY_LOOP_DETECTION_TRIVIAL, false);
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/SupervisorWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/SupervisorWorkerCustomImpl.java
index 50bd548..e5fa475 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/SupervisorWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/SupervisorWorkerCustomImpl.java
@@ -23,6 +23,7 @@ import org.eclipse.efm.execution.core.workflow.common.GraphExplorationQueue;
import org.eclipse.efm.execution.core.workflow.common.GraphExplorationStrategyKind;
import org.eclipse.efm.execution.core.workflow.common.ManifestCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.RedundancyDetection;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
import org.eclipse.efm.execution.core.workflow.impl.SupervisorWorkerImpl;
@@ -142,23 +143,12 @@ public class SupervisorWorkerCustomImpl extends SupervisorWorkerImpl
// supervisor.setManifest( ManifestCustomImpl.create(true) );
// EXECUTION EXTENDER
- String strObjective;
- try {
- strObjective = configuration.getAttribute(
- ATTR_TRACE_EXTENSION_OBJECTIVE,
- DEFAULT_TRACE_EXTENSION_OBJECTIVE);
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- strObjective = DEFAULT_TRACE_EXTENSION_OBJECTIVE;
- }
- if( (strObjective == null) || strObjective.isEmpty() ) {
- strObjective = DEFAULT_TRACE_EXTENSION_OBJECTIVE;
- }
-
TraceSpecificationCustomImpl extender =
- TraceSpecificationCustomImpl.create("extender", strObjective);
+ TraceSpecificationCustomImpl.create(
+ "extender", configuration,
+ ATTR_TRACE_EXTENSION_OBJECTIVE,
+ DEFAULT_TRACE_EXTENSION_OBJECTIVE,
+ TraceElementKind.UNDEFINED);
extender.setDescription(
"Extension of Traces to reach observables for tests purpose" );
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 eb68574..4073331 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
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.execution.core.workflow.common.CommonFactory;
import org.eclipse.efm.execution.core.workflow.common.ConsoleLogFormatCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.ConsoleVerbosityKind;
@@ -63,7 +64,7 @@ public class WorkflowCustomImpl extends WorkflowImpl
public static WorkflowCustomImpl create(
- ILaunchConfiguration configuration, IPath rootPath) {
+ ILaunchConfiguration configuration, IPath workingPath) {
WorkflowCustomImpl workflow = new WorkflowCustomImpl();
@@ -73,7 +74,7 @@ public class WorkflowCustomImpl extends WorkflowImpl
WorkspaceCustomImpl workspace =
- WorkspaceCustomImpl.create(configuration, rootPath);
+ WorkspaceCustomImpl.create(configuration, workingPath);
workflow.setWorkspace(workspace);
@@ -90,28 +91,31 @@ public class WorkflowCustomImpl extends WorkflowImpl
// Main Execution Director
DirectorCustomImpl director =
DirectorCustomImpl.create(workflow,
- configuration, enabledExtension);
+ configuration, workingPath, enabledExtension);
- String modelAnalysis;
+ AnalysisProfileKind modelAnalysisProfile =
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
try {
- modelAnalysis = configuration.getAttribute(
+ final String strModelAnalysisProfile = configuration.getAttribute(
ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
- ANALYSIS_PROFILE_MODEL_EXPLORATION);
+ AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE.getLiteral());
+
+ modelAnalysisProfile = AnalysisProfileKind.get(strModelAnalysisProfile);
}
catch (CoreException e) {
e.printStackTrace();
- modelAnalysis = ANALYSIS_PROFILE_MODEL_EXPLORATION;
+ modelAnalysisProfile = AnalysisProfileKind.ANALYSIS_EXPLORATION_PROFILE;
}
- switch ( modelAnalysis ) {
- case ANALYSIS_PROFILE_MODEL_EXPLORATION: {
+ switch ( modelAnalysisProfile ) {
+ case ANALYSIS_EXPLORATION_PROFILE: {
director.setName( "exploration" );
break;
}
- case ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION: {
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE: {
director.setName( "transition#coverage" );
break;
}
- case ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR: {
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE: {
director.setName( "behavior#selection" );
break;
}
@@ -231,17 +235,17 @@ public class WorkflowCustomImpl extends WorkflowImpl
SymbexOption symbexMode = getSymbexOption();
if( symbexMode != null ) {
writer.appendTab2Eol( "symbex 'option' [" );
-
+
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" );
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkspaceCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkspaceCustomImpl.java
index fa8689f..e60d366 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkspaceCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/WorkspaceCustomImpl.java
@@ -30,19 +30,18 @@ public class WorkspaceCustomImpl extends WorkspaceImpl
public static WorkspaceCustomImpl create(
- ILaunchConfiguration configuration, IPath rootPath) {
+ ILaunchConfiguration configuration, IPath workingPathPath) {
WorkspaceCustomImpl workspace = new WorkspaceCustomImpl();
Location location = CommonFactory.eINSTANCE.createLocation();
- location.setRoot( rootPath.toString() );
+ location.setRoot( workingPathPath.toString() );
String str;
-
try {
str = configuration.getAttribute(
- ATTR_WORKSPACE_OUTPUT_FOLDER_NAME,
- DEFAULT_WORKSPACE_OUTPUT_FOLDER_NAME);
+ ATTR_WORKSPACE_OUTPUT_FOLDER_NAME,
+ DEFAULT_WORKSPACE_OUTPUT_FOLDER_NAME);
}
catch( CoreException e ) {
e.printStackTrace();
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/DeveloperTuningOptionCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/DeveloperTuningOptionCustomImpl.java
index a7319d8..11d0b50 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/DeveloperTuningOptionCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/DeveloperTuningOptionCustomImpl.java
@@ -13,13 +13,13 @@
package org.eclipse.efm.execution.core.workflow.common;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.AbstractLaunchDelegate;
-import org.eclipse.efm.execution.core.SymbexPreferenceUtil;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.efm.execution.core.IWorkflowPreferenceConstants;
+import org.eclipse.efm.execution.core.SymbexPreferenceUtil;
import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
+import org.eclipse.efm.execution.core.util.WorkflowFileUtils;
import org.eclipse.efm.execution.core.workflow.common.impl.DeveloperTuningOptionImpl;
public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
@@ -521,36 +521,6 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
}
-
- public static String getModelFilename(ILaunchConfiguration configuration) {
- String modelPath;
- try {
- modelPath = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION, "");
- }
- catch (CoreException e) {
- e.printStackTrace();
-
- modelPath = null;
- }
-
- if( (modelPath != null) && (! modelPath.isEmpty()) ) {
- int pos = modelPath.lastIndexOf(IPath.SEPARATOR);
- if( pos > 0 ) {
- modelPath = modelPath.substring(pos+1);
- }
-
- pos = modelPath.lastIndexOf('.');
- if( pos > 0 ) {
- modelPath = modelPath.substring(0, pos);
- }
-
- return( modelPath );
- }
-
- return( null );
- }
-
public static DeveloperTuningOptionCustomImpl createDirector(
ILaunchConfiguration configuration) {
@@ -565,7 +535,8 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
boolean enabled;
- String modelFilename = getModelFilename(configuration);
+ String modelBasename =
+ WorkflowFileUtils.getModelBasename(configuration);
try {
enabled = configuration.getAttribute(
@@ -576,14 +547,14 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
enabled = false;
}
if( enabled ) {
- devTuning.setOutputFilename(modelFilename + "_%1%");
- devTuning.setSpecificationFilename(modelFilename + ".xlia");
+ devTuning.setOutputFilename(modelBasename + "_%1%");
+ devTuning.setSpecificationFilename(modelBasename + ".xlia");
if( fEnabledSymbexDeveloperMode ) {
- devTuning.setDebugFilename(modelFilename + "_%1%");
+ devTuning.setDebugFilename(modelBasename + "_%1%");
devTuning.setParsedModelFilename(
- modelFilename + "_parsed.xlia");
+ modelBasename + "_parsed.xlia");
}
}
@@ -596,13 +567,13 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
enabled = false;
}
if( enabled ) {
- devTuning.setExecutableFilename(modelFilename + ".fexe");
+ devTuning.setExecutableFilename(modelBasename + ".fexe");
- devTuning.setInitializationFilename(modelFilename + ".fet");
+ devTuning.setInitializationFilename(modelBasename + ".fet");
if( fEnabledSymbexDeveloperMode ) {
devTuning.setCompiledModelFilename(
- modelFilename + "_compiled.fexe");
+ modelBasename + "_compiled.fexe");
}
}
@@ -615,10 +586,10 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
enabled = false;
}
if( enabled ) {
- devTuning.setSymbexGraphFilename(modelFilename + ".fscn");
+ devTuning.setSymbexGraphFilename(modelBasename + ".fscn");
if( fEnabledSymbexDeveloperMode ) {
- devTuning.setSymbexTraceFilename(modelFilename + ".fet");
+ devTuning.setSymbexTraceFilename(modelBasename + ".fet");
}
}
@@ -643,7 +614,8 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
boolean enabled;
- String modelFilename = getModelFilename(configuration);
+ String modelBasename =
+ WorkflowFileUtils.getModelBasename(configuration);
try {
enabled = configuration.getAttribute(
@@ -655,14 +627,14 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
}
if( enabled ) {
- devTuning.setOutputFilename(modelFilename + "_%1%");
- devTuning.setSpecificationFilename(modelFilename + ".xlia");
+ devTuning.setOutputFilename(modelBasename + "_%1%");
+ devTuning.setSpecificationFilename(modelBasename + ".xlia");
if( fEnabledSymbexDeveloperMode ) {
- devTuning.setDebugFilename(modelFilename + "_%1%");
+ devTuning.setDebugFilename(modelBasename + "_%1%");
devTuning.setParsedModelFilename(
- modelFilename + "_parsed.xlia");
+ modelBasename + "_parsed.xlia");
}
}
@@ -675,11 +647,11 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
enabled = false;
}
if( enabled ) {
- devTuning.setExecutableFilename(modelFilename + ".fexe");
+ devTuning.setExecutableFilename(modelBasename + ".fexe");
if( fEnabledSymbexDeveloperMode ) {
devTuning.setCompiledModelFilename(
- modelFilename + "_compiled.fexe");
+ modelBasename + "_compiled.fexe");
}
}
@@ -693,11 +665,11 @@ public class DeveloperTuningOptionCustomImpl extends DeveloperTuningOptionImpl
}
if( enabled ) {
devTuning.setSymbexGraphFilename(
- modelFilename + "_extension.fscn");
+ modelBasename + "_extension.fscn");
if( fEnabledSymbexDeveloperMode ) {
devTuning.setSymbexTraceFilename(
- modelFilename + "_extension.fet");
+ modelBasename + "_extension.fet");
}
}
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceElementCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceElementCustomImpl.java
index f58c16f..47f03ac 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceElementCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceElementCustomImpl.java
@@ -17,11 +17,23 @@ import org.eclipse.efm.execution.core.workflow.common.impl.TraceElementImpl;
public class TraceElementCustomImpl extends TraceElementImpl {
- public TraceElementCustomImpl(TraceElementKind nature, Object value) {
+ private static final String UNSELECTION_MARKER = "//!#";
+
+
+ public TraceElementCustomImpl(boolean selected, TraceElementKind nature, Object value) {
super();
- super.nature = nature;
- super.value = value;
+ this.selected = selected;
+ super.nature = nature;
+ super.value = value;
+ }
+
+ public TraceElementCustomImpl(TraceElementKind nature, Object value) {
+ this(true, nature, value);
+ }
+
+ public TraceElementCustomImpl(TraceElement model) {
+ this(model.isSelected(), model.getNature(), model.getValue());
}
@@ -31,16 +43,23 @@ public class TraceElementCustomImpl extends TraceElementImpl {
public static TraceElementCustomImpl create(
String element, TraceElementKind defaultNature) {
+ boolean selected = true;
TraceElementKind nature = TraceElementKind.UNDEFINED;
- String value = element;
String kind;
int pos;
+ while ( element.startsWith(UNSELECTION_MARKER) ) {
+ selected = false;
+
+ element = element.substring(UNSELECTION_MARKER.length()).trim();
+ }
+
+ String value = element;
if ( element.startsWith("//") ) {
- nature = TraceElementKind.UNDEFINED;
+ nature = TraceElementKind.TIPS;
- value = element.substring(2).trim();
+ value = value.substring(2).trim();
}
else if( (pos = element.indexOf('=')) > 0 ) {
kind = element.substring(0, pos).trim();
@@ -48,6 +67,12 @@ public class TraceElementCustomImpl extends TraceElementImpl {
if( nature != null ) {
value = element.substring(pos+1).trim();
+ if( (! value.isEmpty())
+ && (value.charAt(0) == '\'')
+ && (value.charAt(value.length() - 1) == '\'') )
+ {
+ value = value.substring(1, value.length() - 1);
+ }
}
else {
nature = defaultNature;
@@ -58,37 +83,113 @@ public class TraceElementCustomImpl extends TraceElementImpl {
value = element.trim();
}
- return( new TraceElementCustomImpl(nature, value) );
+ return( new TraceElementCustomImpl(selected, nature, value) );
}
- public void toWriter(PrettyPrintWriter writer) {
+ public String toSEW() {
+// return( (selected ? "+ " : "- " ) + nature + " = " + value );
+ StringBuffer strBuffer = new StringBuffer();
+
final Object value = getValue();
- if( getNature() == TraceElementKind.UNDEFINED ) {
- writer.commentLine( value );
- }
- else if( getNature() == TraceElementKind.RAW_ATTRIBUTE ) {
- writer.appendTabEol( value.toString() );
+ if( ! isSelected() ) {
+ strBuffer.append( UNSELECTION_MARKER );
}
- else {
- writer.appendTab( getNature().getLiteral() ).append( " = " );
- if( value instanceof String ) {
- final String str = value.toString();
- if( (! str.startsWith("\"")) && (! str.startsWith("'"))
- && ((! str.startsWith("[")) || str.startsWith("[*]")) ) {
- writer.append( "\"" ).append( str ).appendEol( "\"" );
+
+ switch( getNature() ) {
+ case UNDEFINED: {
+ for( String line : value.toString().split(" *\\R") ) {
+ strBuffer.append( "// " ).append( line ).append('\n');
+ }
+ break;
+ }
+ case TIPS: {
+ strBuffer.append("//").append( value.toString() ).append('\n');
+ break;
+ }
+ case RAW_ATTRIBUTE: {
+ strBuffer.append( value.toString() ).append('\n');
+ break;
+ }
+ default: {
+ strBuffer.append( getNature().getLiteral() ).append( " = " );
+
+ if( value instanceof String ) {
+ final String str = value.toString();
+ if( (! str.startsWith("\"")) && (! str.startsWith("'"))
+ && ((! str.startsWith("[")) || str.startsWith("[*]")) )
+ {
+ strBuffer.append( "'" ).append( str ).append( "'" );
+ }
+ else {
+ strBuffer.append( str );
+ }
+ }
+ else if( value != null ) {
+ strBuffer.append( value.toString() );
}
else {
- writer.appendEol( str );
+ strBuffer.append( "'<null>'" );
}
+
+ strBuffer.append('\n');
+ break;
}
- else if( value != null ) {
+ }
+
+ return strBuffer.toString();
+ }
+
+ @Override
+ public String toString() {
+ return toSEW();
+ }
+
+
+ public void toWriter(PrettyPrintWriter writer) {
+ final Object value = getValue();
+
+ writer.appendTab( isSelected() ? "" : UNSELECTION_MARKER );
+
+ switch( getNature() ) {
+ case UNDEFINED: {
+ writer.commentLine( value );
+ break;
+ }
+ case TIPS: {
+ writer.append("//").appendEol( value.toString() );
+ break;
+ }
+ case RAW_ATTRIBUTE: {
writer.appendEol( value.toString() );
+ break;
}
- else {
- writer.appendEol( "'<null>'" );
+ default: {
+ writer.append( getNature().getLiteral() ).append( " = " );
+
+ if( value instanceof String ) {
+ final String str = value.toString();
+ if( str.isEmpty() ) {
+ writer.appendEol( "\"\"" );
+ }
+ else if( (! str.startsWith("\"")) && (! str.startsWith("'"))
+ && ((! str.startsWith("[")) || str.startsWith("[*]")) )
+ {
+ writer.append( "'" ).append( str ).appendEol( "'" );
+ }
+ else {
+ writer.appendEol( str );
+ }
+ }
+ else if( value != null ) {
+ writer.appendEol( value.toString() );
+ }
+ else {
+ writer.appendEol( "'<null>'" );
+ }
+ break;
}
}
}
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceSpecificationCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceSpecificationCustomImpl.java
index 1f5e469..6beb503 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceSpecificationCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/common/TraceSpecificationCustomImpl.java
@@ -12,71 +12,127 @@
*******************************************************************************/
package org.eclipse.efm.execution.core.workflow.common;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
import org.eclipse.efm.execution.core.workflow.common.impl.TraceSpecificationImpl;
public class TraceSpecificationCustomImpl extends TraceSpecificationImpl {
+ public static final String TRACE_SEPARATOR = "\\R|;";
+
+
protected TraceSpecificationCustomImpl(String name) {
super();
setName(name);
}
+ public TraceSpecificationCustomImpl(List<TraceElement> traceElements) {
+ getElement().addAll(traceElements);
+ }
+
+
public static TraceSpecificationCustomImpl create(String name) {
return( new TraceSpecificationCustomImpl(name) ) ;
}
- public static TraceSpecificationCustomImpl create(
- String name, String specification) {
+ public static TraceSpecificationCustomImpl create(String name,
+ ILaunchConfiguration configuration, String storeKey,
+ List<String> defaultValue, TraceElementKind defaultNature) {
+ List<String> traceElementList = new ArrayList<String>();
+ try {
+ traceElementList.addAll(
+ configuration.getAttribute(storeKey, defaultValue) );
+ }
+ catch( DebugException de) {
+ // For Compatibility
+ try {
+ String specification =
+ configuration.getAttribute(storeKey, "");
- TraceSpecificationCustomImpl trace =
- new TraceSpecificationCustomImpl(name);
+ if( specification != null ) {
+ specification = specification.trim();
+
+ if( ! specification.isEmpty() ) {
+ String[] tabString = specification.split(
+ TraceSpecificationCustomImpl.TRACE_SEPARATOR);
- trace.parseAll( specification );
+ traceElementList.addAll( Arrays.asList(tabString) );
+ }
+ }
+ }
+ catch( CoreException ce ) {
+ ce.printStackTrace();
+ }
+ }
+ catch( CoreException ce ) {
+ ce.printStackTrace();
+ }
- return( trace );
+ return create(name, traceElementList, defaultNature);
}
+
public static TraceSpecificationCustomImpl create(
- String name, String specification, TraceElementKind defaultNature) {
+ String name, ILaunchConfiguration configuration,
+ String storeKey, TraceElementKind defaultNature)
+ {
+ return create(name, configuration, storeKey,
+ new ArrayList<String>(), defaultNature);
+ }
- TraceSpecificationCustomImpl trace =
+
+ public static TraceSpecificationCustomImpl create(String name,
+ Collection<String> traceElementList, TraceElementKind defaultNature) {
+ TraceSpecificationCustomImpl traceSpecification =
new TraceSpecificationCustomImpl(name);
- trace.parseAll( specification , defaultNature );
+ if( (traceElementList != null) && (! traceElementList.isEmpty()) ) {
- return( trace );
- }
+ traceSpecification.parseAll(traceElementList, defaultNature);
+ return traceSpecification;
+ }
- public void parseAll(String specification) {
- parseAll(specification, TraceElementKind.UNDEFINED);
+ return traceSpecification;
}
- public void parseAll(String specification,
+
+// public static TraceSpecificationCustomImpl create(
+// String name, String specification, TraceElementKind defaultNature) {
+//
+// TraceSpecificationCustomImpl trace =
+// new TraceSpecificationCustomImpl(name);
+//
+// trace.parseAll( specification , defaultNature );
+//
+// return( trace );
+// }
+//
+//
+// public void parseAll(String specification) {
+// parseAll(specification, TraceElementKind.UNDEFINED);
+// }
+
+ public void parseAll(Collection<String> specification,
TraceElementKind defaultNature) {
- if( specification == null ) {
+ if( (specification == null) || specification.isEmpty() ) {
return;
}
- else {
- specification = specification.trim();
-
- if( specification.isEmpty() ) {
- return;
- }
- }
-
- String[] tabString = specification.split("\\R|;");
List< TraceElement > elements = getElement();
TraceElementCustomImpl traceElt;
- for (String eltString : tabString) {
+ for (String eltString : specification) {
eltString = eltString.trim();
if ( eltString.length() > 0 ) {
@@ -90,6 +146,52 @@ public class TraceSpecificationCustomImpl extends TraceSpecificationImpl {
}
+ public String toSEW() {
+ StringBuffer strBuffer = new StringBuffer();
+
+ for( TraceElement element : getElement() ) {
+ if( element instanceof TraceElementCustomImpl ) {
+ strBuffer.append( ((TraceElementCustomImpl)element).toSEW() );
+ }
+ else {
+ strBuffer.append( new TraceElementCustomImpl(element.isSelected(),
+ element.getNature(), element.getValue()).toSEW() );
+ }
+ }
+
+ return strBuffer.toString();
+ }
+
+ @Override
+ public String toString() {
+ StringBuffer strBuffer = new StringBuffer();
+
+ String name = getName();
+ if( name == null ) {
+ name = "trace";
+ }
+
+ strBuffer.append( name ).append(" [\n");
+
+ for( TraceElement element : getElement() ) {
+ strBuffer.append('\t');
+
+ if( element instanceof TraceElementCustomImpl ) {
+ strBuffer.append( ((TraceElementCustomImpl)element).toString() );
+ }
+ else {
+ strBuffer.append( new TraceElementCustomImpl(element.isSelected(),
+ element.getNature(), element.getValue()).toString() );
+ }
+ }
+
+ strBuffer.append( "] // end ").append(name).append('\n');
+
+ return strBuffer.toString();
+ }
+
+
+
public void toWriter(PrettyPrintWriter writer) {
writer.commentLine( getComment() );
@@ -114,10 +216,10 @@ public class TraceSpecificationCustomImpl extends TraceSpecificationImpl {
((TraceElementCustomImpl)element).toWriter(writer2);
}
else {
- writer.appendTab2( element.getNature().getLiteral() )
- .append( " = " )
- .appendEol( (element.getValue() != null) ?
- element.getValue().toString() : "'<null>'" );
+ TraceElementCustomImpl customElement =
+ new TraceElementCustomImpl(element.isSelected(),
+ element.getNature(), element.getValue() );
+ customElement.toWriter(writer2);
}
}
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/BehaviorCoverageWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/BehaviorCoverageWorkerCustomImpl.java
index 4babc35..939a8e5 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/BehaviorCoverageWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/BehaviorCoverageWorkerCustomImpl.java
@@ -20,6 +20,7 @@ import org.eclipse.efm.execution.core.workflow.Director;
import org.eclipse.efm.execution.core.workflow.common.CheckingScopeKind;
import org.eclipse.efm.execution.core.workflow.common.ConsoleLogFormatCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.ManifestCustomImpl;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
import org.eclipse.efm.execution.core.workflow.coverage.impl.BehaviorCoverageWorkerImpl;
@@ -159,28 +160,19 @@ public class BehaviorCoverageWorkerCustomImpl extends BehaviorCoverageWorkerImpl
coverageWorker.setHeuristicConfiguration(configuration);
- String specification;
- try {
- specification = configuration.getAttribute(
- ATTR_BEHAVIOR_ANALYSIS_ELEMENT_NAME_LIST, "");
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- specification = null;
- }
- if( (specification != null) && (! specification.isEmpty()) ) {
- TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create("trace", specification);
-
- coverageWorker.setTrace( trace );
- }
+ TraceSpecificationCustomImpl trace =
+ TraceSpecificationCustomImpl.create(
+ "trace", configuration,
+ ATTR_BEHAVIOR_ANALYSIS_ELEMENT_NAME_LIST,
+ TraceElementKind.UNDEFINED);
+ coverageWorker.setTrace( trace );
ConsoleLogFormatCustomImpl console =
ConsoleLogFormatCustomImpl.create(
" , coverage: %1% / %2%" );
+
coverageWorker.setConsole( console );
return( coverageWorker );
@@ -258,23 +250,12 @@ public class BehaviorCoverageWorkerCustomImpl extends BehaviorCoverageWorkerImpl
coverageWorker.setHitCount(1);
coverageWorker.setJumpCount(-1);
- String strObjective;
- try {
- strObjective = configuration.getAttribute(
- ATTR_TRACE_EXTENSION_OBJECTIVE,
- DEFAULT_TRACE_EXTENSION_OBJECTIVE);
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- strObjective = DEFAULT_TRACE_EXTENSION_OBJECTIVE;
- }
- if( (strObjective == null) || strObjective.isEmpty() ) {
- strObjective = DEFAULT_TRACE_EXTENSION_OBJECTIVE;
- }
-
TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create("trace", strObjective);
+ TraceSpecificationCustomImpl.create(
+ "trace", configuration,
+ ATTR_TRACE_EXTENSION_OBJECTIVE,
+ DEFAULT_TRACE_EXTENSION_OBJECTIVE,
+ TraceElementKind.UNDEFINED);
coverageWorker.setTrace( trace );
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/TransitionCoverageWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/TransitionCoverageWorkerCustomImpl.java
index bd5d6e5..fa5c613 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/TransitionCoverageWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/coverage/TransitionCoverageWorkerCustomImpl.java
@@ -12,9 +12,6 @@
*******************************************************************************/
package org.eclipse.efm.execution.core.workflow.coverage;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
@@ -26,8 +23,6 @@ import org.eclipse.efm.execution.core.workflow.common.CoverageHeuristic;
import org.eclipse.efm.execution.core.workflow.common.CoverageScopeKind;
import org.eclipse.efm.execution.core.workflow.common.HeuristicClassKind;
import org.eclipse.efm.execution.core.workflow.common.ManifestCustomImpl;
-import org.eclipse.efm.execution.core.workflow.common.TraceElement;
-import org.eclipse.efm.execution.core.workflow.common.TraceElementCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
import org.eclipse.efm.execution.core.workflow.coverage.impl.TransitionCoverageWorkerImpl;
@@ -130,30 +125,13 @@ public class TransitionCoverageWorkerCustomImpl extends TransitionCoverageWorker
{
coverageWorker.setScope( CoverageScopeKind.DETAILS );
- List< String > transitions;
- try {
- transitions = configuration.getAttribute(
- ATTR_TRANSITION_COVERAGE_SELECTION, new ArrayList<String>());
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- transitions = null;
- }
-
- if( (transitions != null) && (! transitions.isEmpty()) ) {
- TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create("details");
+ TraceSpecificationCustomImpl trace =
+ TraceSpecificationCustomImpl.create(
+ "details", configuration,
+ ATTR_TRANSITION_COVERAGE_SELECTION,
+ TraceElementKind.UNDEFINED);
coverageWorker.setTrace( trace );
-
- List< TraceElement > elements = trace.getElement();
-
- for (String transition : transitions) {
- elements.add( new TraceElementCustomImpl(
- TraceElementKind.TRANSITION, transition) );
- }
- }
}
ConsoleLogFormatCustomImpl console =
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 d3fdda3..d76c989 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
@@ -53,7 +53,6 @@ public class BasicTraceSerializerWorkerCustomImpl extends BasicTraceSerializerIm
// serializerWorker.setManifest( ManifestCustomImpl.create(true) );
- String traceFormat;
boolean enabled;
try {
@@ -89,32 +88,17 @@ public class BasicTraceSerializerWorkerCustomImpl extends BasicTraceSerializerIm
}
serializerWorker.setEnabledLifelinesPrinting( enabled );
-
- try {
- traceFormat = configuration.getAttribute(
- ATTR_BASIC_TRACE_FORMAT_ELEMENT_LIST,
- DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST);
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- traceFormat = DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST;
- }
- if( (traceFormat == null) || (traceFormat.trim().isEmpty()) ) {
- traceFormat = DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST;
- }
-
TraceSpecificationCustomImpl format =
- TraceSpecificationCustomImpl.create("format", traceFormat);
+ TraceSpecificationCustomImpl.create(
+ "format", configuration,
+ ATTR_BASIC_TRACE_FORMAT_ELEMENT_LIST,
+ DEFAULT_BASIC_TRACE_FORMAT_ELEMENT_LIST,
+ TraceElementKind.UNDEFINED);
serializerWorker.setFormat( format );
- TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create(
- "trace", SYNTAX_TRACE_SPECIFICATION_LINK);
-
- configureTrace( trace , configuration );
+ TraceSpecificationCustomImpl trace = configureTrace(configuration);
serializerWorker.setTrace( trace );
@@ -146,9 +130,19 @@ public class BasicTraceSerializerWorkerCustomImpl extends BasicTraceSerializerIm
}
- private static void configureTrace(
- TraceSpecificationCustomImpl trace,
+ private static TraceSpecificationCustomImpl configureTrace(
ILaunchConfiguration configuration) {
+
+// TraceSpecificationCustomImpl trace =
+// TraceSpecificationCustomImpl.create(
+// "trace", SYNTAX_TRACE_SPECIFICATION_LINK);
+
+ TraceSpecificationCustomImpl trace =
+ TraceSpecificationCustomImpl.create(
+ "trace", configuration,
+ ATTR_BASIC_TRACE_DETAILS_ELEMENT_LIST,
+ TraceElementKind.UNDEFINED);
+
boolean enabled;
try {
@@ -271,20 +265,7 @@ public class BasicTraceSerializerWorkerCustomImpl extends BasicTraceSerializerIm
TraceElementKind.STATE, "[*]"));
}
-
- String detailsTrace;
- try {
- detailsTrace = configuration.getAttribute(
- ATTR_BASIC_TRACE_DETAILS_ELEMENT_LIST, "");
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- detailsTrace = null;
- }
-
- trace.parseAll( detailsTrace );
-
+ return trace;
}
@@ -331,18 +312,18 @@ public class BasicTraceSerializerWorkerCustomImpl extends BasicTraceSerializerIm
writer2.appendTabEol( "] // end property" );
- TraceSpecificationCustomImpl format =
- (TraceSpecificationCustomImpl) getFormat();
- if( format != null ) {
- format.toWriter( writer2 );
- }
-
TraceSpecificationCustomImpl trace =
(TraceSpecificationCustomImpl) getTrace();
if( trace != null ) {
trace.toWriter(writer2);
}
+ TraceSpecificationCustomImpl format =
+ (TraceSpecificationCustomImpl) getFormat();
+ if( format != null ) {
+ format.toWriter( writer2 );
+ }
+
String justifier = "";
String path;
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/ModelGraphvizSerializerWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/ModelGraphvizSerializerWorkerCustomImpl.java
index c600078..7417435 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/ModelGraphvizSerializerWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/ModelGraphvizSerializerWorkerCustomImpl.java
@@ -15,8 +15,8 @@ package org.eclipse.efm.execution.core.workflow.serializer;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
+import org.eclipse.efm.execution.core.util.WorkflowFileUtils;
import org.eclipse.efm.execution.core.workflow.Director;
-import org.eclipse.efm.execution.core.workflow.common.DeveloperTuningOptionCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.ManifestCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
import org.eclipse.efm.execution.core.workflow.serializer.impl.SymbexGraphVizSerializerWorkerImpl;
@@ -57,8 +57,7 @@ public class ModelGraphvizSerializerWorkerCustomImpl extends SymbexGraphVizSeria
//
// serializerWorker.setFormat( format );
- String modelFilename =
- DeveloperTuningOptionCustomImpl.getModelFilename(configuration);
+ String modelFilename = WorkflowFileUtils.getModelBasename(configuration);
serializerWorker.setFileName(modelFilename + "_graph.gv");
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/SymbexGraphvizSerializerWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/SymbexGraphvizSerializerWorkerCustomImpl.java
index 3a33c95..4260672 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/SymbexGraphvizSerializerWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/SymbexGraphvizSerializerWorkerCustomImpl.java
@@ -52,61 +52,35 @@ public class SymbexGraphvizSerializerWorkerCustomImpl extends ModelGraphvizSeria
// serializerWorker.setManifest( ManifestCustomImpl.create(true) );
+ TraceSpecificationCustomImpl trace =
+ TraceSpecificationCustomImpl.create(
+ "trace", configuration,
+ ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ TraceElementKind.UNDEFINED);
- String strFormat;
- try {
- strFormat = configuration.getAttribute(
- ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
- DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC);
- }
- catch( CoreException e ) {
- e.printStackTrace();
+ serializerWorker.setTrace( trace );
- strFormat = DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC;
- }
- if( (strFormat != null) && (! strFormat.isEmpty()) ) {
- TraceSpecificationCustomImpl format =
- TraceSpecificationCustomImpl.create("format", strFormat);
- serializerWorker.setFormat( format );
- }
-
- String strCSS;
- try {
- strCSS = configuration.getAttribute(
- ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC,
- DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC);
- }
- catch( CoreException e ) {
- e.printStackTrace();
+ TraceSpecificationCustomImpl format =
+ TraceSpecificationCustomImpl.create(
+ "format", configuration,
+ ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ TraceElementKind.UNDEFINED);
- strCSS = DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC;
- }
- if( (strCSS != null) && (! strCSS.isEmpty()) ) {
- TraceSpecificationCustomImpl css =
- TraceSpecificationCustomImpl.create("css",
- strCSS, TraceElementKind.RAW_ATTRIBUTE);
+ serializerWorker.setFormat( format );
- serializerWorker.setCSS( css );
- }
- String strTrace;
- try {
- strTrace = configuration.getAttribute(
- ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
- DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC);
- }
- catch( CoreException e ) {
- e.printStackTrace();
+ TraceSpecificationCustomImpl css =
+ TraceSpecificationCustomImpl.create(
+ "css", configuration,
+ ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC,
+ DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC,
+ TraceElementKind.RAW_ATTRIBUTE);
- strTrace = DEFAULT_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC;
- }
- if( (strTrace != null) && (! strTrace.isEmpty()) ) {
- TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create("trace", strTrace);
+ serializerWorker.setCSS( css );
- serializerWorker.setTrace( trace );
- }
String strFilename;
try {
@@ -134,60 +108,34 @@ public class SymbexGraphvizSerializerWorkerCustomImpl extends ModelGraphvizSeria
// serializerWorker.setManifest( ManifestCustomImpl.create(true) );
- String strFormat;
- try {
- strFormat = configuration.getAttribute(
- ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
- DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC);
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- strFormat = DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC;
- }
- if( (strFormat != null) && (! strFormat.isEmpty()) ) {
- TraceSpecificationCustomImpl format =
- TraceSpecificationCustomImpl.create("format", strFormat);
+ TraceSpecificationCustomImpl trace =
+ TraceSpecificationCustomImpl.create(
+ "trace", configuration,
+ ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
+ TraceElementKind.UNDEFINED);
- serializerWorker.setFormat( format );
- }
+ serializerWorker.setTrace( trace );
- String strCSS;
- try {
- strCSS = configuration.getAttribute(
- ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC,
- DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC);
- }
- catch( CoreException e ) {
- e.printStackTrace();
- strCSS = DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC;
- }
- if( (strCSS != null) && (! strCSS.isEmpty()) ) {
- TraceSpecificationCustomImpl css =
- TraceSpecificationCustomImpl.create("css",
- strCSS, TraceElementKind.RAW_ATTRIBUTE);
+ TraceSpecificationCustomImpl format =
+ TraceSpecificationCustomImpl.create(
+ "format", configuration,
+ ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_FORMAT_SPEC,
+ TraceElementKind.UNDEFINED);
- serializerWorker.setCSS( css );
- }
+ serializerWorker.setFormat( format );
- String strTrace;
- try {
- strTrace = configuration.getAttribute(
- ATTR_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC,
- DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC);
- }
- catch( CoreException e ) {
- e.printStackTrace();
+ TraceSpecificationCustomImpl css =
+ TraceSpecificationCustomImpl.create(
+ "css", configuration,
+ ATTR_FIRST_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC,
+ DEFAULT_SYMBEX_OUTPUT_GRAPHVIZ_CSS_SPEC,
+ TraceElementKind.RAW_ATTRIBUTE);
- strTrace = DEFAULT_SECOND_SYMBEX_OUTPUT_GRAPHVIZ_TRACE_SPEC;
- }
- if( (strTrace != null) && (! strTrace.isEmpty()) ) {
- TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create("trace", strTrace);
+ serializerWorker.setCSS( css );
- serializerWorker.setTrace( trace );
- }
String strFilename;
try {
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/TTCNTraceSerializerWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/TTCNTraceSerializerWorkerCustomImpl.java
index 83eb09a..7de28a7 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/TTCNTraceSerializerWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/serializer/TTCNTraceSerializerWorkerCustomImpl.java
@@ -12,12 +12,15 @@
*******************************************************************************/
package org.eclipse.efm.execution.core.workflow.serializer;
+import java.util.List;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
import org.eclipse.efm.execution.core.workflow.Director;
import org.eclipse.efm.execution.core.workflow.common.ManifestCustomImpl;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
import org.eclipse.efm.execution.core.workflow.serializer.impl.TTCNTraceSerializerImpl;
@@ -59,25 +62,19 @@ public class TTCNTraceSerializerWorkerCustomImpl extends TTCNTraceSerializerImpl
// serializerWorker.setFormat( format );
//
//
- String specification = DEFAULT_TTCN_TRACE_SPECIFICATION;
-
-// try {
-// specification = configuration.getAttribute(
-// ATTR_TTCN_TRACE_SPECIFICATION,
-// DEFAULT_TTCN_TRACE_SPECIFICATION);
-// }
-// catch( CoreException e ) {
-// e.printStackTrace();
-//
-// specification = DEFAULT_TTCN_TRACE_SPECIFICATION;
-// }
+ List<String> specification = DEFAULT_TTCN_TRACE_SPECIFICATION;
- if( (specification != null) && (! specification.isEmpty()) ) {
- TraceSpecificationCustomImpl trace =
- TraceSpecificationCustomImpl.create("trace", specification);
+ TraceSpecificationCustomImpl trace =
+ TraceSpecificationCustomImpl.create("trace",
+ specification, TraceElementKind.UNDEFINED);
+// TraceSpecificationCustomImpl trace =
+// TraceSpecificationCustomImpl.create(
+// "trace", configuration,
+// ATTR_TTCN_TRACE_SPECIFICATION,
+// DEFAULT_TTCN_TRACE_SPECIFICATION,
+// TraceElementKind.UNDEFINED);
- serializerWorker.setTrace( trace );
- }
+ serializerWorker.setTrace( trace );
String str;
diff --git a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/test/OfflineTestWorkerCustomImpl.java b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/test/OfflineTestWorkerCustomImpl.java
index 4f220a5..7cc54b3 100644
--- a/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/test/OfflineTestWorkerCustomImpl.java
+++ b/execution/org.eclipse.efm.execution.core/src/org/eclipse/efm/execution/core/workflow/test/OfflineTestWorkerCustomImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.efm.execution.core.util.PrettyPrintWriter;
import org.eclipse.efm.execution.core.workflow.Director;
import org.eclipse.efm.execution.core.workflow.common.ConsoleLogFormatCustomImpl;
import org.eclipse.efm.execution.core.workflow.common.ManifestCustomImpl;
+import org.eclipse.efm.execution.core.workflow.common.TraceElementKind;
import org.eclipse.efm.execution.core.workflow.common.TraceSpecificationCustomImpl;
import org.eclipse.efm.execution.core.workflow.test.impl.OfflineTestWorkerImpl;
@@ -84,38 +85,20 @@ public class OfflineTestWorkerCustomImpl extends OfflineTestWorkerImpl
testWorker.setTestPurposeFile(path);
}
-
- String observableTrace;
- try {
- observableTrace = configuration.getAttribute(
- ATTR_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
- DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION);
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- observableTrace = DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION;
- }
testWorker.setObservable(
TraceSpecificationCustomImpl.create(
- "observable", observableTrace) );
-
- String controllableTrace;
- try {
- controllableTrace = configuration.getAttribute(
- ATTR_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
- DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION);
- }
- catch( CoreException e ) {
- e.printStackTrace();
-
- controllableTrace = DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION;
- }
+ "observable", configuration,
+ ATTR_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
+ DEFAULT_TEST_OFFLINE_OBSERVABLE_SPECIFICATION,
+ TraceElementKind.UNDEFINED) );
testWorker.setControllable(
TraceSpecificationCustomImpl.create(
- "controllable", controllableTrace) );
+ "controllable", configuration,
+ ATTR_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
+ DEFAULT_TEST_OFFLINE_CONTROLLABLE_SPECIFICATION,
+ TraceElementKind.UNDEFINED) );
// ConsoleLogFormatCustomImpl console =
@@ -155,7 +138,7 @@ public class OfflineTestWorkerCustomImpl extends OfflineTestWorkerImpl
writer.appendTab2Eol( "property [" )
.appendTab3Eol( "format = \"BASIC#XLIA\"" )
.appendTab2Eol( "] // end property" );
-
+
writer.appendTab2Eol( "merged_trace [" );
if( (str = getMergedTraceFile()) != null ) {
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 14df7fa..977a234 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
@@ -40,8 +40,9 @@ 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.util.WorkflowFileUtils;
import org.eclipse.efm.execution.core.workflow.WorkflowCustomImpl;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.execution.launchconfiguration.ui.views.page.LaunchExecConsoleManager;
import org.eclipse.efm.execution.launchconfiguration.util.BackgroundResourceRefresher;
import org.eclipse.efm.execution.launchconfiguration.util.CoreUtil;
@@ -54,6 +55,9 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
private final String BASENAME_SEP = "-";
+
+ private final String WORKFLOW_FOLDER = ".sew";
+
private final String WORKFLOW_BASENAME = "workflow";
private final String WORKFLOW_EXTENSION = ".sew";
@@ -64,11 +68,12 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
private IPath fSewLocation;
private IPath fWorkingDirectory;
- public static String fModelAnalysisProfile = ANALYSIS_PROFILE_MODEL_UNDEFINED;
+ public static AnalysisProfileKind fModelAnalysisProfile =
+ AnalysisProfileKind.ANALYSIS_UNDEFINED_PROFILE;
public static boolean fEnableTraceExtension = false;
-
+
/**
* LaunchExecConsoleManager
@@ -85,8 +90,8 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
fEnabledDebugOrDeveloperMode = false;
}
-
-
+
+
public static boolean isValidFilename(String text)
{
final Pattern pattern = Pattern.compile(
@@ -102,30 +107,42 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
") # 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. ",
+ "$ # 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 );
-
+ WorkflowFileUtils.getModelBasename( configuration );
+
final String configName = configuration.getName();
-
+
final String filename = WORKFLOW_BASENAME +
(configName.isEmpty() ? "" : (BASENAME_SEP + configName)) +
(modelBasename.isEmpty() ? "" : (BASENAME_SEP + modelBasename)) +
WORKFLOW_EXTENSION;
-
+
+ IPath workflowsFolderPath = fWorkingDirectory.append( WORKFLOW_FOLDER );
+
+ File workflowsFolderFile = workflowsFolderPath.toFile();
+ if( ! workflowsFolderFile.isDirectory() ) {
+ if( ! workflowsFolderFile.exists() ) {
+ workflowsFolderFile.mkdirs();
+ }
+ else {
+ workflowsFolderPath = fWorkingDirectory;
+ }
+ }
+
if( isValidFilename( filename ) ) {
- return fWorkingDirectory.append( filename );
+ return workflowsFolderPath.append( filename );
}
else {
- return fWorkingDirectory.append( WORKFLOW_BASENAME + WORKFLOW_EXTENSION );
+ return workflowsFolderPath.append( WORKFLOW_BASENAME + WORKFLOW_EXTENSION );
}
}
@@ -169,9 +186,10 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
// }
- fModelAnalysisProfile = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
- ANALYSIS_PROFILE_MODEL_UNDEFINED);
+ fModelAnalysisProfile = AnalysisProfileKind.get(
+ configuration.getAttribute(
+ ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE,
+ AnalysisProfileKind.ANALYSIS_UNDEFINED_PROFILE.getLiteral()));
fEnableTraceExtension = configuration.getAttribute(
ATTR_ENABLED_TRACE_EXTENSION, false);
@@ -204,10 +222,10 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
}
}
- String aLocation = configuration.getAttribute(
- ATTR_SPECIFICATION_MODEL_FILE_LOCATION, "");
+ String aLocation = WorkflowFileUtils.getAbsoluteLocation(
+ configuration, ATTR_SPECIFICATION_MODEL_FILE_LOCATION, "");
- if( (aLocation == null) || aLocation.isEmpty() ) {
+ if( aLocation.isEmpty() ) {
throwCoreException("The model file does not exist.");
return null;
@@ -233,23 +251,30 @@ public class LaunchDelegate extends AbstractLaunchDelegate {
*/
public static final int ERR_INTERNAL_ERROR = 150;
-
- public static boolean isLaunchCoverageFamilyProfile() {
- return( LaunchDelegate.fEnableTraceExtension
- || LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION)
- || LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR) );
-
+
+ public static boolean isLaunchCoverageProfileFamily() {
+ if( ! LaunchDelegate.fEnableTraceExtension )
+ switch( LaunchDelegate.fModelAnalysisProfile ) {
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE:
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE:
+ return true;
+
+ default:
+ return false;
+ }
+ return true;
}
public static boolean isLaunchExplorationFamilyProfile() {
- return( LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_EXPLORATION)
- || LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_TEST_OFFLINE)
- || LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_UNDEFINED) );
+ switch( LaunchDelegate.fModelAnalysisProfile ) {
+ case ANALYSIS_EXPLORATION_PROFILE:
+ case ANALYSIS_TEST_OFFLINE_PROFILE:
+ case ANALYSIS_UNDEFINED_PROFILE:
+ return true;
+
+ default:
+ return false;
+ }
}
public void launchExec(ILaunchConfiguration configuration, String mode,
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/AbstractSewLaunchConfigurationTab.java b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/AbstractSewLaunchConfigurationTab.java
index 65fa648..86496b4 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/AbstractSewLaunchConfigurationTab.java
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/AbstractSewLaunchConfigurationTab.java
@@ -23,12 +23,13 @@ import org.eclipse.efm.execution.configuration.common.ui.util.StandardWidgetTool
import org.eclipse.efm.execution.core.Activator;
import org.eclipse.efm.execution.launchconfiguration.LaunchConfigurationTabGroup;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
-public abstract class AbstractSewLaunchConfigurationTab
+public abstract class AbstractSewLaunchConfigurationTab
extends AbstractLaunchConfigurationTab
implements ILaunchConfigurationGUIelement {
@@ -63,13 +64,13 @@ public abstract class AbstractSewLaunchConfigurationTab
public OverviewTab getOverviewTab() {
return fGroupTab.getOverviewTab();
}
-
+
public AbstractConfigurationPage getConfigurationPage() {
return fContentCompositeManager;
}
-
-
+
+
@Override
public AbstractConfigurationPage[] getConfigurationPages() {
return fGroupTab.getConfigurationPages();
@@ -89,17 +90,17 @@ public abstract class AbstractSewLaunchConfigurationTab
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- fContentCompositeManager.setDefaultFieldValues(configuration);
+ fContentCompositeManager.setDefaults(configuration);
}
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
- fContentCompositeManager.initializeFieldValuesFrom(configuration);
+ fContentCompositeManager.initializeFrom(configuration);
}
@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- fContentCompositeManager.applyUpdatesOnFieldValuesFrom(configuration);
+ fContentCompositeManager.performApply(configuration);
}
/**
@@ -152,6 +153,11 @@ public abstract class AbstractSewLaunchConfigurationTab
// Message API
///////////////////////////////////////////////////////////////////////////
+ @Override
+ public void clearErrorMessage(){
+ super.setMessage(null);
+ }
+
@Override // to change visibility to public
public void setMessage(String message){
super.setMessage(message);
@@ -179,4 +185,14 @@ public abstract class AbstractSewLaunchConfigurationTab
super.scheduleUpdateJob();
}
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Property Change
+ //
+ @Override
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
+ //!! NOTHING as DEFAULT BEHAVIOR
+ }
+
+
}
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/SymbexRuntimeTab.java b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/SymbexRuntimeTab.java
index 17be1bb..c2d8658 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/SymbexRuntimeTab.java
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/tabs/SymbexRuntimeTab.java
@@ -108,6 +108,7 @@ public class SymbexRuntimeTab extends AbstractLaunchConfigurationTab
class WidgetListener extends SelectionAdapter implements ModifyListener {
+ @Override
public void modifyText(ModifyEvent e) {
if ( ! fInitializing ) {
setDirty(true);
@@ -119,6 +120,7 @@ public class SymbexRuntimeTab extends AbstractLaunchConfigurationTab
scheduleUpdateJob();
}
+ @Override
public void widgetSelected(SelectionEvent e) {
setDirty(true);
@@ -633,15 +635,15 @@ public class SymbexRuntimeTab extends AbstractLaunchConfigurationTab
setErrorMessage("Symbex executable location does not exist");
return false;
} else if (avmLocationPath.length() == 0) {
- setErrorMessage("ymbex executable location not specified");
+ setErrorMessage("Symbex executable location not specified");
return false;
}
return true;
}
-
-
+
+
IWidgetToolkit widgetToolkit = new StandardWidgetToolkit();
@@ -679,6 +681,7 @@ public class SymbexRuntimeTab extends AbstractLaunchConfigurationTab
fArgumentField = new Text(group,
SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
fArgumentField.addTraverseListener(new TraverseListener() {
+ @Override
public void keyTraversed(TraverseEvent event) {
if (event.detail == SWT.TRAVERSE_RETURN &&
(event.stateMask & SWT.MODIFIER_MASK) != 0) {
@@ -727,6 +730,7 @@ public class SymbexRuntimeTab extends AbstractLaunchConfigurationTab
ControlAccessibleListener(String name) {
controlName = name;
}
+ @Override
public void getName(AccessibleEvent e) {
e.result = controlName;
}
@@ -1044,6 +1048,7 @@ public class SymbexRuntimeTab extends AbstractLaunchConfigurationTab
+ @Override
public void updateLaunchConfigurationDialog() {
validateTab();
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SEWConsoleSpiderPage.java b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SEWConsoleSpiderPage.java
index 063f53f..905bbef 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SEWConsoleSpiderPage.java
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SEWConsoleSpiderPage.java
@@ -400,7 +400,7 @@ public class SEWConsoleSpiderPage extends Page
resizeWidth = s.equals(CONSOLE_INIFINITE_SYMBOL);
}
- else if ( ( nbExe == 1 ) || LaunchDelegate.isLaunchCoverageFamilyProfile() ) {
+ else if ( ( nbExe == 1 ) || LaunchDelegate.isLaunchCoverageProfileFamily() ) {
s = aString.substring(
aString.indexOf(CONSOLE_WIDTH_SYMBOL) +
CONSOLE_WIDTH_SYMBOL.length(),
@@ -453,7 +453,7 @@ public class SEWConsoleSpiderPage extends Page
nbWidth = ( currentNbWidth > oldNbWidth ) ?
currentNbWidth : oldNbWidth;
}
- else if ( ( nbExe == 1 ) || LaunchDelegate.isLaunchCoverageFamilyProfile() ) {
+ else if ( ( nbExe == 1 ) || LaunchDelegate.isLaunchCoverageProfileFamily() ) {
beginIndex = currentIndex + CONSOLE_WIDTH_SYMBOL.length();
currentIndex = aString.indexOf(CONSOLE_COVERAGE_SYMBOL);
endIndex = currentIndex - 1;
diff --git a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SWTSpider.java b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SWTSpider.java
index f5f5a79..e593d15 100644
--- a/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SWTSpider.java
+++ b/execution/org.eclipse.efm.execution.launchconfiguration/src/org/eclipse/efm/execution/launchconfiguration/ui/views/page/SWTSpider.java
@@ -126,10 +126,7 @@ public class SWTSpider extends Canvas
public void resetSpider() {
fResetFlag = true;
- if ( LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_COVERAGE_TRANSITION)
- || LaunchDelegate.fModelAnalysisProfile.equals(
- ANALYSIS_PROFILE_MODEL_COVERAGE_BEHAVIOR) ) {
+ if ( LaunchDelegate.isLaunchCoverageProfileFamily() ) {
fSpidertype = SPIDER5BRANCHES;
}
@@ -138,6 +135,7 @@ public class SWTSpider extends Canvas
}
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
redraw();
}
@@ -147,7 +145,7 @@ public class SWTSpider extends Canvas
private void initSpider4Segments(PaintEvent e) {
e.gc.fillRectangle(0, 0, SPIDER_RECTANGLE_WIDTH, SPIDER_RECTANGLE_HEIGHT);
- spiderTitle = LaunchDelegate.fModelAnalysisProfile.toUpperCase();
+ spiderTitle = LaunchDelegate.fModelAnalysisProfile.getLiteral().toUpperCase();
e.gc.drawString(spiderTitle, xDecalage + 60, yDecalage - 80);
// Point central
@@ -241,7 +239,7 @@ public class SWTSpider extends Canvas
private void initSpider5Segments(PaintEvent e) {
e.gc.fillRectangle(0, 0, SPIDER_RECTANGLE_WIDTH, SPIDER_RECTANGLE_HEIGHT);
- spiderTitle = LaunchDelegate.fModelAnalysisProfile.toUpperCase();
+ spiderTitle = LaunchDelegate.fModelAnalysisProfile.getLiteral().toUpperCase();
e.gc.drawString(spiderTitle, xDecalage + 60, yDecalage - 80);
// Point central
@@ -414,6 +412,7 @@ public class SWTSpider extends Canvas
fRedrawBySystem = false;
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
redraw();
}
diff --git a/execution/org.eclipse.efm.execution.ui.views/META-INF/MANIFEST.MF b/execution/org.eclipse.efm.execution.ui.views/META-INF/MANIFEST.MF
index 924cd0d..6e2abc3 100644
--- a/execution/org.eclipse.efm.execution.ui.views/META-INF/MANIFEST.MF
+++ b/execution/org.eclipse.efm.execution.ui.views/META-INF/MANIFEST.MF
@@ -9,7 +9,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jface,
org.eclipse.efm.ui,
org.eclipse.ui.forms,
- org.eclipse.efm.execution.configuration.common.ui
+ org.eclipse.efm.execution.configuration.common.ui,
+ org.eclipse.efm.execution.core
Import-Package: org.eclipse.core.resources,
org.eclipse.debug.core,
org.eclipse.debug.ui,
diff --git a/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/AbstractSymbexWorkflowView.java b/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/AbstractSymbexWorkflowView.java
index 0e2c8d0..8f89491 100644
--- a/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/AbstractSymbexWorkflowView.java
+++ b/execution/org.eclipse.efm.execution.ui.views/src/org/eclipse/efm/execution/ui/views/symbexlauncher/AbstractSymbexWorkflowView.java
@@ -14,7 +14,8 @@ package org.eclipse.efm.execution.ui.views.symbexlauncher;
import org.eclipse.efm.execution.configuration.common.ui.api.ILaunchConfigurationGUIelement;
import org.eclipse.efm.execution.configuration.common.ui.api.IWidgetToolkit;
-import org.eclipse.efm.execution.configuration.common.ui.util.GenericCompositeCreator;
+import org.eclipse.efm.execution.core.IWorkflowConfigurationConstants;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.ui.utils.ImageResources;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
@@ -30,7 +31,8 @@ import org.eclipse.ui.IActionBars;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.part.ViewPart;
-public abstract class AbstractSymbexWorkflowView extends ViewPart implements ILaunchConfigurationGUIelement {
+public abstract class AbstractSymbexWorkflowView extends ViewPart
+ implements ILaunchConfigurationGUIelement , IWorkflowConfigurationConstants {
protected Composite parentComposite;
@@ -40,11 +42,11 @@ public abstract class AbstractSymbexWorkflowView extends ViewPart implements ILa
private Label message_text_display;
private Label message_image_display;
-
+
protected void setupFormFrame() {
toolkit = new FormWidgetToolkit(parentComposite.getDisplay());
-
+
scrollform = toolkit.createScrolledForm(parentComposite);
//scrollform.setText("Run Configuration");
GridLayout layout = new GridLayout(1, false);
@@ -83,7 +85,7 @@ public abstract class AbstractSymbexWorkflowView extends ViewPart implements ILa
}
IToolBarManager toolBarMenuManager = bars.getToolBarManager();
toolBarMenuManager.removeAll();
- GenericCompositeCreator.fillToolBar(toolBarMenuManager, acts);
+ toolkit.fillToolBar(toolBarMenuManager, acts);
}
protected void showMessage(String message) {
@@ -93,6 +95,7 @@ public abstract class AbstractSymbexWorkflowView extends ViewPart implements ILa
/**
* Passing the focus request to the viewer's control.
*/
+ @Override
public void setFocus() {
scrollform.setFocus();
}
@@ -120,45 +123,59 @@ public abstract class AbstractSymbexWorkflowView extends ViewPart implements ILa
// Message API
///////////////////////////////////////////////////////////////////////////
- @Override // to change visibility to public
+ @Override
+ public void clearErrorMessage() {
+ AnalysisProfileKind analysisProfile =
+ AnalysisProfileKind.get(message_text_display.getText());
+ if( analysisProfile == null ) {
+ message_text_display.setText("");
+ message_image_display.setImage(null);
+ }
+ }
+
+ @Override
public void setMessage(String message){
if(message != null) {
message_text_display.setText(message);
} else {
message_text_display.setText("");
}
- message_image_display.setImage(null);
+ message_image_display.setImage(
+ ImageResources.getImage(
+ ImageResources.IMAGE__QUICKASSIST_ELCL16_ICON));
+
message_display_parentcomposite.layout();
}
- @Override // to change visibility to public
+ @Override
public void setWarningMessage(String warningMessage){
if(warningMessage != null) {
message_text_display.setText(warningMessage);
-
+
message_image_display.setImage(
- ImageResources.getImageDescriptor(
- ImageResources.IMAGE__WARNING_ICON).createImage());
+ ImageResources.getImage(
+ ImageResources.IMAGE__WARNING_ICON));
} else {
message_text_display.setText("");
message_image_display.setImage(null);
}
+
message_display_parentcomposite.layout();
}
- @Override // to change visibility to public
+ @Override
public void setErrorMessage(String errorMessage){
if(errorMessage != null) {
message_text_display.setText(errorMessage);
-
+
message_image_display.setImage(
- ImageResources.getImageDescriptor(
- ImageResources.IMAGE__ERROR_ICON).createImage());
+ ImageResources.getImage(
+ ImageResources.IMAGE__ERROR_ICON));
} else {
message_text_display.setText("");
message_image_display.setImage(null);
}
-
+
message_display_parentcomposite.layout();
}
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 a4a5f44..968c64b 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
@@ -15,6 +15,7 @@ package org.eclipse.efm.execution.ui.views.symbexlauncher;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
@@ -32,12 +33,13 @@ import org.eclipse.efm.execution.configuration.common.ui.page.expert.ExpertConfi
import org.eclipse.efm.execution.configuration.common.ui.page.overview.OverviewConfigurationPage;
import org.eclipse.efm.execution.configuration.common.ui.page.supervisor.SupervisorConfigurationPage;
import org.eclipse.efm.execution.configuration.common.ui.page.testgen.TestGenerationConfigurationPage;
-import org.eclipse.efm.execution.configuration.common.ui.util.GenericCompositeCreator;
import org.eclipse.efm.execution.core.IWorkflowPreferenceConstants;
import org.eclipse.efm.execution.core.SymbexPreferenceUtil;
+import org.eclipse.efm.execution.core.workflow.common.AnalysisProfileKind;
import org.eclipse.efm.execution.launchconfiguration.LaunchDelegate;
import org.eclipse.efm.ui.utils.ImageResources;
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
@@ -46,8 +48,6 @@ import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
@@ -62,7 +62,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
//public Set<SectionCompositeCreator> compositeSections;
private AbstractConfigurationPage[] fConfigurationPages;
-
+
protected Composite tabbedCompositeMaster;
protected CTabFolder fTabFolder;
protected Combo fComboLaunchConfiguration;
@@ -74,16 +74,41 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
}
+ ///////////////////////////////////////////////////////////////////////////
+ // Property Change
+ //
+ @Override
+ public void handleConfigurationPropertyChange(PropertyChangeEvent event) {
+ switch( event.getProperty() ) {
+ case ATTR_SPECIFICATION_MODEL_ANALYSIS_PROFILE:
+ setMessage(event.getNewValue().toString());
+
+ switch ( (AnalysisProfileKind) event.getNewValue() ) {
+ case ANALYSIS_EXPLORATION_PROFILE:
+ case ANALYSIS_TRANSITION_COVERAGE_PROFILE:
+ case ANALYSIS_BEHAVIOR_SELECTION_PROFILE:
+ case ANALYSIS_TEST_OFFLINE_PROFILE:
+ default:
+ break;
+ }
+ }
+ }
+
+
/**
* This is a callback that will allow us
* to create the viewer and initialize it.
*/
+ @Override
public void createPartControl(Composite parent) {
parentComposite = parent;
//compositeSections = new HashSet<SectionCompositeCreator>();
launchConfigurationManager = new LaunchConfigurationManager(this);
+ // Frame
+ setupFormFrame();
+
// Actions
makeActions();
setupTopLevelActionBars(new Action[] {
@@ -91,31 +116,24 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
action_launch_runconf,
action_launch_debugconf,
-
+
action_opend_runconf,
action_opend_debugconf
- });
-
- // Frame
- setupFormFrame();
-
- FormWidgetToolkit toolkit = getFormWidgetToolkit();
+ });
- fComboLaunchConfiguration =
- GenericCompositeCreator.createComposite_combo_text_from_toolkit(
- toolkit, scrollform.getBody(), "Run Configuration :", 2);
- //new Combo(scrollform.getBody(), SWT.READ_ONLY);
+ fComboLaunchConfiguration = toolkit.createLabelledCombo(
+ scrollform.getBody(), "Run Configuration :", 2);
fComboLaunchConfiguration.setItems( launchConfigurationManager.getNames() );
- //text_model_file_path = GenericCompositeCreator.createComposite_label_text_from_toolkit(
+// text_model_file_path = GenericCompositeCreator.createComposite_label_text_from_toolkit(
// toolkit, scrollform.getBody(), "Model File :", 2);
- tabbedCompositeMaster = toolkit.createComposite(scrollform.getBody());
- GridLayout gl = new GridLayout(1, false);
- tabbedCompositeMaster.setLayout(gl);
- GridData gd = new GridData(SWT.FILL,SWT.FILL, true, true);
- tabbedCompositeMaster.setLayoutData(gd);
+ tabbedCompositeMaster = toolkit.createComposite(scrollform.getBody(), 1, 1, SWT.FILL);
+// GridLayout gl = new GridLayout(1, false);
+// tabbedCompositeMaster.setLayout(gl);
+// GridData gd = new GridData(SWT.FILL,SWT.FILL, true, true);
+// tabbedCompositeMaster.setLayoutData(gd);
fTabFolder = toolkit.createTabFolder( tabbedCompositeMaster, SWT.FLAT | SWT.TOP );
@@ -197,11 +215,11 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
}
}
-
+
private void createSectionsContent(IWidgetToolkit widgetToolkit)
{
ArrayList< AbstractConfigurationPage > confPage = new ArrayList<>();
-
+
createOverviewTabItem(widgetToolkit, confPage);
createSupervisorTabItem(widgetToolkit, confPage);
@@ -222,14 +240,14 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
{
createDeveloperTuningTabItem(widgetToolkit, confPage);
}
-
+
fConfigurationPages = confPage.toArray(
new AbstractConfigurationPage[confPage.size()]);
fTabFolder.setSelection(fOverviewTabItem);
}
-
-
+
+
@Override
public AbstractConfigurationPage[] getConfigurationPages() {
return fConfigurationPages;
@@ -239,7 +257,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private CTabItem fOverviewTabItem;
private Composite fOverviewControl;
- private void createOverviewTabItem(IWidgetToolkit widgetToolkit, ArrayList<AbstractConfigurationPage> confPage)
+ private void createOverviewTabItem(IWidgetToolkit widgetToolkit, List<AbstractConfigurationPage> confPage)
{
fOverviewTabItem = new CTabItem(fTabFolder, SWT.NONE );
fOverviewTabItem.setText("Overview");
@@ -258,7 +276,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
fOverviewControl = overviewPage.getControl();
if (fOverviewControl != null) {
scrolledComposite.setContent(fOverviewControl);
-
+
scrolledComposite.setMinSize(
fOverviewControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
@@ -272,7 +290,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private CTabItem fSupervisorTabItem;
private Composite fSupervisorControl;
- private void createSupervisorTabItem(IWidgetToolkit widgetToolkit, ArrayList<AbstractConfigurationPage> confPage)
+ private void createSupervisorTabItem(IWidgetToolkit widgetToolkit, List<AbstractConfigurationPage> confPage)
{
fSupervisorTabItem = new CTabItem(fTabFolder, SWT.NONE );
fSupervisorTabItem.setText("Supervisor");
@@ -287,7 +305,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
fSupervisorControl = supervisorPage.getControl();
if (fSupervisorControl != null) {
scrolledComposite.setContent(fSupervisorControl);
-
+
scrolledComposite.setMinSize(
fSupervisorControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
@@ -301,7 +319,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private CTabItem fTestGenTabItem;
private Composite fTestGenControl;
- private void createTestGenerationTabItem(IWidgetToolkit widgetToolkit, ArrayList<AbstractConfigurationPage> confPage)
+ private void createTestGenerationTabItem(IWidgetToolkit widgetToolkit, List<AbstractConfigurationPage> confPage)
{
fTestGenTabItem = new CTabItem(fTabFolder, SWT.NONE );
fTestGenTabItem.setText("Test Generation");
@@ -316,7 +334,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
fTestGenControl = testGenPage.getControl();
if (fTestGenControl != null) {
scrolledComposite.setContent(fTestGenControl);
-
+
scrolledComposite.setMinSize(
fTestGenControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
@@ -325,11 +343,11 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
confPage.add( testGenPage );
}
-
+
private CTabItem fDebugTabItem;
private Composite fDebugControl;
- private void createDebugTabItem(IWidgetToolkit widgetToolkit, ArrayList<AbstractConfigurationPage> confPage)
+ private void createDebugTabItem(IWidgetToolkit widgetToolkit, List<AbstractConfigurationPage> confPage)
{
fDebugTabItem = new CTabItem(fTabFolder, SWT.NONE );
fDebugTabItem.setText("Debug");
@@ -344,7 +362,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
fDebugControl = devugPage.getControl();
if (fDebugControl != null) {
scrolledComposite.setContent(fDebugControl);
-
+
scrolledComposite.setMinSize(
fSupervisorControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
@@ -357,7 +375,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private CTabItem fExpertTabItem;
private Composite fExpertControl;
- private void createExpertTabItem(IWidgetToolkit widgetToolkit, ArrayList<AbstractConfigurationPage> confPage)
+ private void createExpertTabItem(IWidgetToolkit widgetToolkit, List<AbstractConfigurationPage> confPage)
{
fExpertTabItem = new CTabItem(fTabFolder, SWT.NONE );
fExpertTabItem.setText("Expert");
@@ -372,7 +390,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
fExpertControl = expertPage.getControl();
if (fExpertControl != null) {
scrolledComposite.setContent(fExpertControl);
-
+
scrolledComposite.setMinSize(
fExpertControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
@@ -385,7 +403,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private CTabItem fDeveloperTuningTabItem;
private Composite fDeveloperTuningControl;
- private void createDeveloperTuningTabItem(IWidgetToolkit widgetToolkit, ArrayList<AbstractConfigurationPage> confPage)
+ private void createDeveloperTuningTabItem(IWidgetToolkit widgetToolkit, List<AbstractConfigurationPage> confPage)
{
fDeveloperTuningTabItem = new CTabItem(fTabFolder, SWT.NONE );
fDeveloperTuningTabItem.setText("Developer");
@@ -401,7 +419,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
fDeveloperTuningControl = developerPage.getControl();
if (fDeveloperTuningControl != null) {
scrolledComposite.setContent(fDeveloperTuningControl);
-
+
scrolledComposite.setMinSize(
fSupervisorControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
@@ -415,7 +433,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private void updateEnableTab(boolean isLaunchConfSelected) {
fOverviewControl.setEnabled(isLaunchConfSelected);
}
-
+
///////////////////////////////////////////////////////////////////////////
// Action utils
//
@@ -423,7 +441,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
final ILaunchConfiguration configuration, final String mode)
{
saveLaunchConfiguration( configuration );
-
+
DebugUITools.launch(configuration, mode);
}
@@ -432,13 +450,13 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
final ILaunchConfiguration configuration, final String mode)
{
saveLaunchConfiguration( configuration );
-
+
IStructuredSelection selection = new StructuredSelection(configuration);
ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode);
-
+
String groupIdentifier = group == null ?
IDebugUIConstants.ID_RUN_LAUNCH_GROUP : group.getIdentifier();
-
+
DebugUITools.openLaunchConfigurationDialogOnGroup(
scrollform.getShell(), selection, groupIdentifier, null);
}
@@ -447,17 +465,17 @@ 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);
+ acm.performApply(rwConfiguration);
}
rwConfiguration.doSave();
-
+
if( action_apply_changes != null ) {
action_apply_changes.setEnabled(false);
}
@@ -465,8 +483,8 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
e.printStackTrace();
}
}
-
-
+
+
// ======================================================================================
@@ -483,6 +501,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
private void makeActions() {
action_apply_changes = new Action() {
+ @Override
public void run() {
if( launchConfigurationManager.hasSelection() ) {
saveLaunchConfiguration( launchConfigurationManager.getSelection() );
@@ -495,10 +514,11 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
ImageResources.getImageDescriptor(
// ImageResources.IMAGE__PUSH_ICON));
ImageResources.IMAGE__SAVE_ICON));
-
+
action_apply_changes.setEnabled(false);
action_launch_runconf = new Action() {
+ @Override
public void run() {
if( launchConfigurationManager.hasSelection() ) {
execLaunchConfiguration(
@@ -515,6 +535,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
ImageResources.getImageDescriptor(ImageResources.IMAGE__LAUNCHRUN_ICON));
action_launch_debugconf = new Action() {
+ @Override
public void run() {
if( launchConfigurationManager.hasSelection() ) {
execLaunchConfiguration(
@@ -532,6 +553,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
action_opend_runconf = new Action() {
+ @Override
public void run() {
if( launchConfigurationManager.hasSelection() ) {
openLaunchConfigurationDialog(
@@ -548,6 +570,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
ImageResources.getImageDescriptor(ImageResources.IMAGE__DIALRUN_ICON));
action_opend_debugconf = new Action() {
+ @Override
public void run() {
if( launchConfigurationManager.hasSelection() ) {
openLaunchConfigurationDialog(
@@ -564,6 +587,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
ImageResources.getImageDescriptor(ImageResources.IMAGE__DIALDEBUG_ICON));
action_opend_help = new Action() {
+ @Override
public void run() {
//PlatformUI.getWorkbench().getHelpSystem().displayHelp(String contextId);
}
@@ -578,12 +602,12 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
// ILaunchConfigurationGUIelement interface methods
// ======================================================================================
-
+
private ILaunchConfigurationWorkingCopy fLastLaunchConfigurationWorkingCopy;
public void initializeFieldValuesFrom(ILaunchConfiguration configuration) {
for(AbstractConfigurationPage acm : fConfigurationPages) {
- acm.initializeFieldValuesFrom(configuration);
+ acm.initializeFrom(configuration);
}
scheduleUpdateJob();
@@ -593,7 +617,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
if( launchConfigurationManager.hasSelection() ) {
ILaunchConfiguration selectedLC = launchConfigurationManager.getSelection();
updateEnableTab(true);
-
+
if( action_apply_changes != null ) {
action_apply_changes.setEnabled(true);
}
@@ -606,7 +630,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
System.err.println("++++---- Biopp");
for(AbstractConfigurationPage acm : fConfigurationPages) {
- acm.initializeFieldValuesFrom(selectedLC);
+ acm.initializeFrom(selectedLC);
}
}
} catch (CoreException e) {
@@ -635,7 +659,7 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
scrollform.reflow(true);
}
-
+
///////////////////////////////////////////////////////////////////////////
// Message API
///////////////////////////////////////////////////////////////////////////
@@ -646,10 +670,9 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
if( selectedTabItem != null ) {
if(warningMessage != null) {
selectedTabItem.setToolTipText(warningMessage);
-
+
selectedTabItem.setImage(
- ImageResources.getImageDescriptor(
- ImageResources.IMAGE__WARNING_ICON).createImage());
+ ImageResources.getImage(ImageResources.IMAGE__WARNING_ICON));
} else {
selectedTabItem.setImage(null);
}
@@ -663,10 +686,9 @@ public class SymbexWorkflowView extends AbstractSymbexWorkflowView
if( selectedTabItem != null ) {
if(errorMessage != null) {
selectedTabItem.setToolTipText(errorMessage);
-
+
selectedTabItem.setImage(
- ImageResources.getImageDescriptor(
- ImageResources.IMAGE__ERROR_ICON).createImage());
+ ImageResources.getImage(ImageResources.IMAGE__ERROR_ICON));
} else {
selectedTabItem.setImage(null);
}
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/clear.gif b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/clear.gif
new file mode 100644
index 0000000..8f14bd2
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/clear.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/delete.png b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/delete.png
new file mode 100644
index 0000000..3a79365
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/delete.png
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-add.gif b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-add.gif
new file mode 100644
index 0000000..45c0e60
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-add.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-delete.gif b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-delete.gif
new file mode 100644
index 0000000..5fd7e2d
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-delete.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-edit.gif b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-edit.gif
new file mode 100644
index 0000000..d1aa86c
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-edit.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-movedown.gif b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-movedown.gif
new file mode 100644
index 0000000..572933e
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-movedown.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-moveup.gif b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-moveup.gif
new file mode 100644
index 0000000..768c5c1
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dlcl16/list-moveup.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/dup_resource.png b/gui/org.eclipse.efm.ui/resources/icons/dup_resource.png
new file mode 100644
index 0000000..41efe45
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/dup_resource.png
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowDown.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowDown.gif
new file mode 100644
index 0000000..072b184
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowDown.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowLeft.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowLeft.gif
new file mode 100644
index 0000000..4fb4150
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowLeft.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowRight.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowRight.gif
new file mode 100644
index 0000000..1956789
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowRight.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowUp.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowUp.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/ArrowUp.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_in.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_in.gif
new file mode 100644
index 0000000..d12cafa
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_in.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_inout.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_inout.gif
new file mode 100644
index 0000000..87a6574
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_inout.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_out.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_out.gif
new file mode 100644
index 0000000..aeea60e
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_out.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_return.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_return.gif
new file mode 100644
index 0000000..4a421c2
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/Parameter_return.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/add.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/add.gif
index 252d7eb..252d7eb 100644
--- a/gui/org.eclipse.efm.ui/resources/icons/add.gif
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/add.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/checked.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/checked.gif
new file mode 100644
index 0000000..e556e7d
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/checked.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/clear.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/clear.gif
new file mode 100644
index 0000000..8f14bd2
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/clear.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.gif
new file mode 100644
index 0000000..b6922ac
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.png b/gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.png
new file mode 100644
index 0000000..5f00385
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/delete.png
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/duplicate.png b/gui/org.eclipse.efm.ui/resources/icons/elcl16/duplicate.png
new file mode 100644
index 0000000..195dc6d
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/duplicate.png
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/eraser.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/eraser.gif
new file mode 100644
index 0000000..6bc10f9
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/eraser.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/info_obj.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/info_obj.gif
new file mode 100644
index 0000000..745b884
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/info_obj.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-add.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-add.gif
new file mode 100644
index 0000000..45c0e60
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-add.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-delete.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-delete.gif
new file mode 100644
index 0000000..af59a0b
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-delete.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-edit.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-edit.gif
new file mode 100644
index 0000000..d1aa86c
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-edit.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-movedown.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-movedown.gif
new file mode 100644
index 0000000..572933e
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-movedown.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-moveup.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-moveup.gif
new file mode 100644
index 0000000..768c5c1
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/list-moveup.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_customization.png b/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_customization.png
new file mode 100644
index 0000000..b1f5532
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_customization.png
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_separator.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_separator.gif
new file mode 100644
index 0000000..0ff7d7f
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_separator.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_stack.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_stack.gif
new file mode 100644
index 0000000..85b2e9d
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/new_stack.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/quickassist_obj.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/quickassist_obj.gif
new file mode 100644
index 0000000..94ae2a0
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/quickassist_obj.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/refresh.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/refresh.gif
new file mode 100644
index 0000000..e383147
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/refresh.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/resources/icons/elcl16/unchecked.gif b/gui/org.eclipse.efm.ui/resources/icons/elcl16/unchecked.gif
new file mode 100644
index 0000000..342fa9d
--- /dev/null
+++ b/gui/org.eclipse.efm.ui/resources/icons/elcl16/unchecked.gif
Binary files differ
diff --git a/gui/org.eclipse.efm.ui/src/org/eclipse/efm/ui/utils/ImageResources.java b/gui/org.eclipse.efm.ui/src/org/eclipse/efm/ui/utils/ImageResources.java
index a3df349..87ca09c 100644
--- a/gui/org.eclipse.efm.ui/src/org/eclipse/efm/ui/utils/ImageResources.java
+++ b/gui/org.eclipse.efm.ui/src/org/eclipse/efm/ui/utils/ImageResources.java
@@ -12,64 +12,113 @@ package org.eclipse.efm.ui.utils;
import org.eclipse.efm.ui.Activator;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
public class ImageResources {
-
+
private static final String PLUGINS_ROOT = "platform:/plugin/";
-
+
public static final String PLUGIN_ID = "org.eclipse.efm.ui";
-
+
private static final String RESOURCES_PLUGIN_PATH = PLUGINS_ROOT + PLUGIN_ID + "/resources/";
-
-
+
+
public static final String FML_PROFILE_PATH = PLUGINS_ROOT +
"org.eclipse.efm.formalml/resources/profile/FormalML.profile.uml";
-
-
+
+
// Icons only below
private static final String ICONS_PLUGIN_PATH = RESOURCES_PLUGIN_PATH + "icons/";
-
-
+
+ private static final String ICONS_ELCL16_PLUGIN_PATH = RESOURCES_PLUGIN_PATH + "icons/elcl16/";
+
+ private static final String ICONS_DLCL16_PLUGIN_PATH = RESOURCES_PLUGIN_PATH + "icons/dlcl16/";
+
+
+ public static final String IMAGE__ADD_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "add.gif";
+
+
+ public static final String IMAGE__DELETE_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "delete.png";
+
+ public static final String IMAGE__DELETE_DLCL16_ICON = ICONS_DLCL16_PLUGIN_PATH + "delete.png";
+
+
+ public static final String IMAGE__INFO_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "info_obj.gif";
+
+ public static final String IMAGE__QUICKASSIST_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "quickassist_obj.gif";
+
+
+ public static final String IMAGE__LIST_ADD_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "list-add.gif";
+
+ public static final String IMAGE__COPY_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "duplicate.png";
+
+ public static final String IMAGE__LIST_EDIT_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "list-edit.gif";
+
+ public static final String IMAGE__LIST_DELETE_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "list-delete.gif";
+
+ public static final String IMAGE__LIST_MOVE_DOWN_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "list-movedown.gif";
+
+ public static final String IMAGE__LIST_MOVE_UP_ELCL16_ICON = ICONS_ELCL16_PLUGIN_PATH + "list-moveup.gif";
+
+
+ public static final String IMAGE__LIST_ADD_DLCL16_ICON = ICONS_DLCL16_PLUGIN_PATH + "list-add.gif";
+
+ public static final String IMAGE__LIST_EDIT_DLCL16_ICON = ICONS_DLCL16_PLUGIN_PATH + "list-edit.gif";
+
+ public static final String IMAGE__LIST_DELETE_DLCL16_ICON = ICONS_DLCL16_PLUGIN_PATH + "list-delete.gif";
+
+ public static final String IMAGE__LIST_MOVE_DOWN_DLCL16_ICON = ICONS_DLCL16_PLUGIN_PATH + "list-movedown.gif";
+
+ public static final String IMAGE__LIST_MOVE_UP_DLCL16_ICON = ICONS_DLCL16_PLUGIN_PATH + "list-moveup.gif";
+
+
+
+ public static final String IMAGE__CHECKED_ICON = ICONS_ELCL16_PLUGIN_PATH + "checked.gif";
+
+ public static final String IMAGE__UNCHECKED_ICON = ICONS_ELCL16_PLUGIN_PATH + "unchecked.gif";
+
+
+
public static final String IMAGE__HELP_ICON = ICONS_PLUGIN_PATH + "help.png";
-
+
public static final String IMAGE__DIVERSITY_ICON = ICONS_PLUGIN_PATH + "diversity_icon.png";
-
+
public static final String IMAGE__REVERT_ICON = ICONS_PLUGIN_PATH + "revert.gif";
-
+
public static final String IMAGE__PUSH_ICON = ICONS_PLUGIN_PATH + "push.png";
-
-
+
+
public static final String IMAGE__SAVE_ICON = ICONS_PLUGIN_PATH + "save.gif";
public static final String IMAGE__SAVE_AS_ICON = ICONS_PLUGIN_PATH + "save_as.gis";
-
+
public static final String IMAGE__LAUNCHDEBUG_ICON = ICONS_PLUGIN_PATH + "debug_exc.png";
-
+
public static final String IMAGE__LAUNCHRUN_ICON = ICONS_PLUGIN_PATH + "run_exc.png";
-
-
+
+
public static final String IMAGE__DIALDEBUG_ICON = ICONS_PLUGIN_PATH + "debug_dial.png";
-
+
public static final String IMAGE__DIALRUN_ICON = ICONS_PLUGIN_PATH + "run_dial.png";
-
-
+
+
public static final String IMAGE__WARNING_ICON = ICONS_PLUGIN_PATH + "warning_st_obj.png";
public static final String IMAGE__ERROR_ICON = ICONS_PLUGIN_PATH + "error_st_obj.gif";
public static final String IMAGE__PINNED_OVR_ICON = ICONS_PLUGIN_PATH + "pinned_ovr.gif";
-
+
public static final String IMAGE__REFRESH_ICON = ICONS_PLUGIN_PATH + "refresh_tab.png";
-
+
public static final String IMAGE__SYNCED_ICON = ICONS_PLUGIN_PATH + "synced.gif";
public static final String IMAGE__VALIDATE_ICON = ICONS_PLUGIN_PATH + "validate.gif";
-
+
// Helper/Util methods only below
-
+
public static final ImageDescriptor getImageDescriptor(String imagePath) {
// ImageDescriptor image_descriptor = null;
// try {
@@ -77,10 +126,15 @@ public class ImageResources {
// } catch (MalformedURLException e) {
// e.printStackTrace();
// }
-//
+//
// return(image_descriptor);
-
+
return AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, imagePath);
}
+
+ public static final Image getImage(String imagePath) {
+ return getImageDescriptor(imagePath).createImage();
+ }
+
}

Back to the top