Commit ee46a17d authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch 'master' of https://git.fortiss.org/af3/af3.git into 4067

parents 0df6f54b 50f6f564
Z3Backend.java c217750b1183c51c4f4952919d70e22b2576d7fa GREEN
Z3Backend.java 3c5cafb72109c18a22865ad98992db59893ed925 GREEN
......@@ -119,7 +119,7 @@ public class Z3Backend implements IDSEBackend {
return new ScheduleRun(spec, timeout);
} else {
throw new Exception("No applicable " + SolverRun.class.getSimpleName() +
" was found for the given set of syntesises to perform.");
" was found for the given set of syntheses to perform.");
}
}
......@@ -128,10 +128,4 @@ public class Z3Backend implements IDSEBackend {
public String getName() {
return "Z3 (SMT)";
}
/** {@inheritDoc} */
@Override
public String toString() {
return getName();
}
}
......@@ -62,12 +62,12 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="constraintsButton" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onConstaintsButton" text="Constraints">
<Button fx:id="constraintsButton" disable="true" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onConstaintsButton" text="Constraints">
<GridPane.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</GridPane.margin>
</Button>
<Button fx:id="objectiveButton" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onObjectivesButton" text="Objectives" GridPane.rowIndex="1">
<Button fx:id="objectivesButton" disable="true" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onObjectivesButton" text="Objectives" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</GridPane.margin>
......@@ -82,7 +82,7 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="synthesisButton" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onSynthesisButton" text="Synthesis">
<Button fx:id="synthesisButton" disable="true" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onSynthesisButton" text="Synthesis">
<GridPane.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</GridPane.margin>
......@@ -97,7 +97,7 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button fx:id="visualizationButton" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onVisualizationButton" text="Visualization">
<Button fx:id="visualizationButton" disable="true" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#onVisualizationButton" text="Visualization">
<GridPane.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</GridPane.margin>
......
DashboardFXController.java ade3bb868548fdc58c58cbe9648b3ff3cc281dad GREEN
DashboardFXController.java 315ccd8fe4d9c2d70e78037adb3aebcf46fe6316 GREEN
DashboardFXViewPart.java 2ff7e676b3ac9053b713d6412c92466af7fff2e7 GREEN
......@@ -52,23 +52,15 @@ public class DashboardFXController extends CompositeFXControllerBase<AnchorPane,
/** Launches the constraint edit page. */
@FXML
private Button constaintsButton;
private Button constraintsButton;
/** Launches the objectives edit page. */
@FXML
private Button objectivesButton;
/** Launches the platform synthesis page. */
@FXML
private Button platformButton;
/** Launches the deployment synthesis page. */
@FXML
private Button deploymentButton;
/** Launches the scheduling synthesis page. */
/** Launches the synthesis page. */
@FXML
private Button scheduleButton;
private Button synthesisButton;
/** Launches the visualization page. */
@FXML
......@@ -123,13 +115,33 @@ public class DashboardFXController extends CompositeFXControllerBase<AnchorPane,
wizard.dispose();
}
/** {@inheritDoc} */
@Override
public String getFXMLLocation() {
return "DashboardLayout.fxml";
}
/** {@inheritDoc} */
@Override
public void initialize() {
EventBroker.getInstance().addListener(this);
DSE activeDSE = IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE();
updatePrjLabel(activeDSE);
if(activeDSE != null) {
enableViewButtons(true);
}
}
/** {@inheritDoc} */
@Override
public void propertyChanged(Object source, DSE_EVENT propId) {
if(propId == DSE_SELECTED_EVENT && source instanceof DSE) {
updatePrjLabel((DSE)source);
enableViewButtons(true);
} else if(propId == DSE_REMOVED_EVENT) {
updatePrjLabel(null);
enableViewButtons(false);
}
}
......@@ -144,16 +156,11 @@ public class DashboardFXController extends CompositeFXControllerBase<AnchorPane,
}
}
/** {@inheritDoc} */
@Override
public String getFXMLLocation() {
return "DashboardLayout.fxml";
}
/** {@inheritDoc} */
@Override
public void initialize() {
EventBroker.getInstance().addListener(this);
updatePrjLabel(IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE());
/** Enables/Disables the buttons for opening views for specific DSE tasks. */
private void enableViewButtons(boolean enable) {
objectivesButton.setDisable(!enable);
constraintsButton.setDisable(!enable);
synthesisButton.setDisable(!enable);
visualizationButton.setDisable(!enable);
}
}
DSEProcessNavigator.java 97db65f69c2b2b15e38d5c73c6b0235413e9c0e6 GREEN
DSEProcessNavigator.java ffe553880780053b5d01bf777b52e51bb611acf0 GREEN
ExplorationElementTreeViewer.java 47f80c87855c35f11af01f409604b45433704974 GREEN
ExplorationNavigatorElementContentProvider.java 27a951f2dd5c9cb7f96c371e1e5f894825933cfd GREEN
ExplorationNavigatorFXController.java 317b4521a09e3f1067fd0e4aac061d1b573c092b GREEN
......
......@@ -20,6 +20,8 @@ import static org.fortiss.af3.exploration.ui.perspective.process.IProcessManager
import static org.fortiss.af3.exploration.ui.perspective.process.IProcessManager.EProcessStep.OBJECTIVES;
import static org.fortiss.af3.exploration.ui.perspective.process.IProcessManager.EProcessStep.SYNTHESIS;
import static org.fortiss.af3.exploration.ui.perspective.process.IProcessManager.EProcessStep.VISUALIZATION;
import static org.fortiss.af3.exploration.ui.perspective.service.IEventListener.DSE_EVENT.DSE_REMOVED_EVENT;
import static org.fortiss.af3.exploration.ui.perspective.service.IEventListener.DSE_EVENT.DSE_SELECTED_EVENT;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
......@@ -30,11 +32,16 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.fortiss.af3.exploration.model.project.DSE;
import org.fortiss.af3.exploration.ui.perspective.generic.DseSaveableView;
import org.fortiss.af3.exploration.ui.perspective.process.IProcessManager;
import org.fortiss.af3.exploration.ui.perspective.service.EventBroker;
import org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager;
import org.fortiss.af3.exploration.ui.perspective.service.IEventListener;
/**
* Navigator providing 4 Buttons:
......@@ -45,7 +52,22 @@ import org.fortiss.af3.exploration.ui.perspective.process.IProcessManager;
*
* @author eder
*/
public class DSEProcessNavigator extends DseSaveableView {
public class DSEProcessNavigator extends DseSaveableView implements IEventListener {
/** {@link Button} for the target definition views. */
private Button btnC;
/** {@link Button} for the constraint view. */
private MenuItem constraintMenu;
/** {@link MenuItem} for the objective view. */
private MenuItem objectiveMenu;
/** {@link Button} for the synthesis view. */
private Button btnS;
/** {@link Button} for the visualization view. */
private Button btnV;
/** The ID */
public static final String ID = DSEProcessNavigator.class.getName();
......@@ -53,6 +75,8 @@ public class DSEProcessNavigator extends DseSaveableView {
/** {@inheritDoc} */
@Override
public void createPartControl(Composite parent) {
EventBroker.getInstance().addListener(this);
DSE activeDSE = IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE();
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(5, false));
......@@ -62,17 +86,17 @@ public class DSEProcessNavigator extends DseSaveableView {
btnH.setImage(IProcessManager.INSTANCE.getImageForProcessStep(HOME));
btnH.addSelectionListener(new HomeSelectionAdapter());
Button btnC = new Button(composite, SWT.NONE);
btnC = new Button(composite, SWT.NONE);
btnC.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
btnC.setImage(IProcessManager.INSTANCE.getImageForProcessStep(CONSTRAINTS));
Menu menu2 = new Menu(btnC);
btnC.setMenu(menu2);
MenuItem constraintMenu = new MenuItem(menu2, SWT.NONE);
constraintMenu = new MenuItem(menu2, SWT.NONE);
constraintMenu.setText("Constraint Modeling");
constraintMenu.addSelectionListener(new ConstraintsSelectionAdapter());
MenuItem objectiveMenu = new MenuItem(menu2, SWT.NONE);
objectiveMenu = new MenuItem(menu2, SWT.NONE);
objectiveMenu.setText("Objective Modeling");
objectiveMenu.addSelectionListener(new ObjectivesSelectionAdapter());
......@@ -87,20 +111,32 @@ public class DSEProcessNavigator extends DseSaveableView {
}
});
Button btnS = new Button(composite, SWT.NONE);
btnS = new Button(composite, SWT.NONE);
btnS.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
btnS.setImage(IProcessManager.INSTANCE.getImageForProcessStep(SYNTHESIS));
btnS.addSelectionListener(new SynthSelectionAdapter());
Button btnV = new Button(composite, SWT.NONE);
btnV = new Button(composite, SWT.NONE);
btnV.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
btnV.setImage(IProcessManager.INSTANCE.getImageForProcessStep(VISUALIZATION));
new Label(composite, SWT.NONE);
btnV.addSelectionListener(new VisualizationSelectionAdapter());
if(activeDSE == null) {
enableViewButtons(false);
}
composite.update();
composite.layout();
}
/** {@inheritDoc} */
@Override
public void dispose() {
super.dispose();
EventBroker.getInstance().removeListener(this);
}
/** Home button selection adapter. */
private class HomeSelectionAdapter extends SelectionAdapter {
/** {@inheritDoc} */
......@@ -145,4 +181,25 @@ public class DSEProcessNavigator extends DseSaveableView {
IProcessManager.INSTANCE.goToStep(SYNTHESIS);
}
}
/** {@inheritDoc} */
@Override
public void propertyChanged(Object source, DSE_EVENT event) {
if(event == DSE_SELECTED_EVENT && source instanceof DSE) {
enableViewButtons(true);
} else if(event == DSE_REMOVED_EVENT) {
enableViewButtons(false);
}
}
/** Enables/Disables the buttons for opening views for specific DSE tasks. */
private void enableViewButtons(boolean enable) {
Display.getDefault().asyncExec(() -> {
btnC.setEnabled(enable);
constraintMenu.setEnabled(enable);
objectiveMenu.setEnabled(enable);
btnS.setEnabled(enable);
btnV.setEnabled(enable);
});
}
}
RuleSetUIProvider.java 9805f8c6d231992cc3471ea2cd9e6b3eb05e004d GREEN
SolverSettingsDialog.java 25b3541fc6eab090500321fa32a3f68992fff0a0 GREEN
SolverSettingsTreeTableViewer.java 279e92b20a6b48e8e99ea7a2039fef419ea42826 GREEN
SolverSettingsTreeTableViewer.java 0f0be7ff52d2c48fbff9d37c7e23bd7a99eb1948 GREEN
SynthesisCategoryExplorationTargetContentProvider.java 410f00e07b5f4208b762b80baf563b2b73a93a71 GREEN
SynthesisCategoryRuleSetContentProvider.java 039913dba18b0248d10a77275258bc9acf9526cf GREEN
SynthesisFXContentController.java 50e97d06c11c2bb24cd8da4d975191e269b6188f GREEN
SynthesisFXContentController.java 0af860ed5ab2788042296d89c195ba2e2204447e GREEN
SynthesisFXViewPart.java e40c2bd501d87b41c6324ab80fd34e64410db644 GREEN
......@@ -17,6 +17,7 @@ package org.fortiss.af3.exploration.ui.perspective.synthesis;
import static java.lang.Boolean.getBoolean;
import static org.apache.commons.lang3.math.NumberUtils.createNumber;
import static org.fortiss.af3.exploration.ui.perspective.service.internal.ExplorationCommandRunner.getRunner;
import java.util.ArrayList;
import java.util.Collection;
......@@ -73,11 +74,11 @@ public class SolverSettingsTreeTableViewer {
@SuppressWarnings("unchecked") BackendSetting<Object> setting =
(BackendSetting<Object>)element;
if(Number.class.isAssignableFrom(setting.getType())) {
setting.setValue(createNumber((String)value));
getRunner().run(() -> setting.setValue(createNumber((String)value)));
} else if(Boolean.class.isAssignableFrom(setting.getType())) {
setting.setValue(getBoolean((String)value));
getRunner().run(() -> setting.setValue(getBoolean((String)value)));
} else if(String.class.isAssignableFrom(setting.getType())) {
setting.setValue(value);
getRunner().run(() -> setting.setValue(value));
}
}
}
......
......@@ -22,6 +22,7 @@ import static javafx.collections.FXCollections.observableArrayList;
import static org.eclipse.core.runtime.Assert.isTrue;
import static org.fortiss.af3.exploration.service.IDSEBackend.EXPLORATION_TYPE.FEASIBILITY_CHECK;
import static org.fortiss.af3.exploration.service.IDSEBackend.EXPLORATION_TYPE.OPTIMIZATION;
import static org.fortiss.af3.exploration.ui.perspective.service.IEventListener.DSE_EVENT.DSE_SELECTED_EVENT;
import static org.fortiss.af3.exploration.ui.perspective.service.IEventListener.DSE_EVENT.PROCESS_STEP_ADDED;
import static org.fortiss.af3.exploration.ui.perspective.service.IEventListener.DSE_EVENT.RULE_SET_ADDED;
import static org.fortiss.af3.exploration.ui.perspective.service.IEventListener.DSE_EVENT.RULE_SET_CHANGED;
......@@ -93,6 +94,7 @@ import javafx.scene.control.Dialog;
import javafx.scene.control.Label;
import javafx.scene.control.TreeTableView;
import javafx.scene.layout.AnchorPane;
import javafx.util.StringConverter;
/**
* {@link ICompositeFXController} for the main pane of the synthesis view. It allows to group
......@@ -187,7 +189,7 @@ public class SynthesisFXContentController extends CompositeFXControllerBase<Anch
* Caches the {@link IDSEBackend}-specific settings (defaults from the backends, saved settings
* for {@link ExplorationStep}s).
*/
protected Map<IDSEBackend, SolverSettings> solverSettings = new HashMap<>();
protected Map<Class<? extends IDSEBackend>, SolverSettings> solverSettings = new HashMap<>();
/** State variable that indicates whether a solution from the backend can be visualized. */
protected boolean useResults = false;
......@@ -254,28 +256,50 @@ public class SynthesisFXContentController extends CompositeFXControllerBase<Anch
dbsService.getDSEBackends(selectedSynthesises, FEASIBILITY_CHECK);
feasibilitySolverCombo.setItems(observableArrayList(cBackends));
if(!cBackends.isEmpty()) {
feasibilitySolverCombo.setConverter(createExpTgtComboConverter(feasibilitySolverCombo));
feasibilitySolverCombo.getSelectionModel().select(0);
}
Set<IDSEBackend> oBackends = dbsService.getDSEBackends(selectedSynthesises, OPTIMIZATION);
optimalitySolverCombo.setItems(observableArrayList(oBackends));
if(!oBackends.isEmpty()) {
optimalitySolverCombo.setConverter(createExpTgtComboConverter(optimalitySolverCombo));
optimalitySolverCombo.getSelectionModel().select(0);
}
}
/**
* Creates a {@link StringConverter} for the mapping between {@link IDSEBackend}s and their
* representation in {@link ComboBox}es.
*/
protected StringConverter<IDSEBackend> createExpTgtComboConverter(ComboBox<IDSEBackend> combo) {
return new StringConverter<IDSEBackend>() {
@Override
public String toString(IDSEBackend object) {
return object != null ? object.getName() : "";
}
@Override
public IDSEBackend fromString(String string) {
return combo.getItems().stream().filter(ap -> ap.getName().equals(string))
.findFirst().orElse(null);
}
};
}
/** Returns the {@link SolverSettings} of the currently selected feasibility checker. */
protected SolverSettings getSolverSettings(IDSEBackend selectedBackend) {
SolverSettings settings = solverSettings.get(selectedBackend);
SolverSettings settings = solverSettings.get(selectedBackend.getClass());
if(settings == null) {
settings = selectedBackend.getSolverSettings();
solverSettings.put(selectedBackend, settings);
solverSettings.put(selectedBackend.getClass(), settings);
}
return settings;
}
/** Sets the {@link SolverSettings} of the given {@link IDSEBackend}. */
protected void setSolverSettings(IDSEBackend selectedBackend, SolverSettings settings) {
solverSettings.put(selectedBackend, settings);
solverSettings.put(selectedBackend.getClass(), settings);
}
/** Loads existing {@link SolverSettings} from an {@link ExplorationStep}. */
......@@ -570,6 +594,10 @@ public class SynthesisFXContentController extends CompositeFXControllerBase<Anch
/** {@inheritDoc} */
@Override
public void propertyChanged(Object source, DSE_EVENT event) {
if(activeDse == null || (activeDse == null && event != DSE_SELECTED_EVENT)) {
return;
}
switch(event) {
case EXP_TARGET_ADDED:
updateTgtRuleSetLists();
......@@ -607,14 +635,16 @@ public class SynthesisFXContentController extends CompositeFXControllerBase<Anch
loadSolverSettings();
break;
case DSE_REMOVED_EVENT:
constraintTbl.setRoot(null);
constraintTbl.getColumns().clear();
constraintRuleSetTbl.getColumns().clear();
constraintRuleSetTbl.setRoot(null);
objectiveTbl.setRoot(null);
objectiveTbl.getColumns().clear();
objectiveRuleSetTbl.setRoot(null);
objectiveRuleSetTbl.getColumns().clear();
Platform.runLater(() -> {
constraintTbl.setRoot(null);
constraintRuleSetTbl.setRoot(null);
objectiveTbl.setRoot(null);
objectiveRuleSetTbl.setRoot(null);
constraintTbl.getColumns().clear();
constraintRuleSetTbl.getColumns().clear();
objectiveTbl.getColumns().clear();
objectiveRuleSetTbl.getColumns().clear();
});
activeDse = null;
break;
}
......
dseml.ecore df66fd1e1e45789fc18bcb2d5992eb839188e849 GREEN
exploration.ecore e65a609db5c6650bbab5144ccef266a19d407385 GREEN
exploration.ecore a37edcd2c57a5e45e307345cc6988ad6633f2f2b GREEN
......@@ -891,7 +891,13 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Map entries of the {@link IDSEBackend}-specific settings."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="#//project/IDSEBackend"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
<eTypeArguments>
<eUpperBound eClassifier="#//project/IDSEBackend"/>
</eTypeArguments>
</eGenericType>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="value" lowerBound="1"
eType="#//SolverSettings" containment="true"/>
</eClassifiers>
......
ExecuteDSECommandLineHandler.java 4bdedc9265f4e058b9a44935f30820f0a58c1ab1 GREEN
ExecuteDSECommandLineHandler.java 4d80dee08bbf5f66d460bcdd158aaf3c96b654ab GREEN
TestCaseGenerationCommandLineHandler.java ccd942515f5490ff9ed6ece891f3ade206333a08 GREEN
ValidateDSESolutionCommandLineInterface.java 1b882428463c21c355d96c883af428d3fa4cce2d YELLOW
......@@ -103,8 +103,8 @@ public final class ExecuteDSECommandLineHandler implements ICommandLineSwitchHan
return;
}
Map<IDSEBackend, SolverSettings> settings = new HashMap<>();
settings.put(z3Backend.get(), z3Backend.get().getSolverSettings());
Map<Class<? extends IDSEBackend>, SolverSettings> settings = new HashMap<>();
settings.put(z3Backend.get().getClass(), z3Backend.get().getSolverSettings());
ExplorationSpecification expSpec = constructExplorationSpecification(matchingDSE);
expSpec.getSynthTypes().addAll(solutionType);
......@@ -158,11 +158,11 @@ public final class ExecuteDSECommandLineHandler implements ICommandLineSwitchHan
private final DSE dse;
/** References the settings of the solvers used for the exploration. */
private final Map<IDSEBackend, SolverSettings> settings;
private final Map<Class<? extends IDSEBackend>, SolverSettings> settings;
/** Constructor. */
/* package */ DseCLISolutionAdapter(DSE selectedDSE, ExplorationSpecification expSpec,
Map<IDSEBackend, SolverSettings> settings) {
Map<Class<? extends IDSEBackend>, SolverSettings> settings) {
super(expSpec);
this.dse = selectedDSE;
this.settings = settings;
......
DSEProjectModelElementFactory.java e00a2ea157d571992a7d9a7ed4f842b78b4141d4 GREEN
DSEProjectModelElementFactory.java 49c1d88c2260764ffeda419b8d3ca5002d387481 GREEN
DSESolutionConversionUtils.java a6ccbba92864c653d1518a92455e87c17f7cc72b GREEN
DSMLModelElementFactory.java fa4a735ff40ab8f7d9898cecc0b04cfd8997572f GREEN
DSMLUtils.java 1113377031374cef7e29afcef458c4aeecad2b21 GREEN
......
......@@ -15,13 +15,13 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.util;
import static java.util.stream.Collectors.toMap;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
import java.util.stream.Collectors;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.fortiss.af3.exploration.model.IExplorationConstraint;
......@@ -153,12 +153,12 @@ public class DSEProjectModelElementFactory {
/** Creates a {@link ExplorationStep}. */
public static ExplorationStep createExplorationStep(String name, Collection<RuleSet> ruleSets,
Map<IDSEBackend, SolverSettings> settings) {
Map<Class<? extends IDSEBackend>, SolverSettings> settings) {
ExplorationStep explorationStep = ProjectFactory.eINSTANCE.createExplorationStep();
explorationStep.setName(name);
explorationStep.getUsedRuleSets().addAll(ruleSets);
Map<IDSEBackend, SolverSettings> settingsCopy = settings.entrySet().parallelStream()
.collect(Collectors.toMap(e -> e.getKey(), e -> copy(e.getValue())));
Map<Class<? extends IDSEBackend>, SolverSettings> settingsCopy = settings.entrySet()
.parallelStream().collect(toMap(e -> e.getKey(), e -> copy(e.getValue())));
explorationStep.getSolverSettings().putAll(settingsCopy);
return explorationStep;
}
......
......@@ -3,7 +3,7 @@ FileUtils.java 70e81c85ae7c2d8076e190ebad7eae648451b645 GREEN
FunctionScopeUtils.java 054c92406affa0c0ad8ac7a067de9608d0bbca2b GREEN
LibraryModelElementFactory.java a5a30a0e6b274d220c397d9bf0f14756d49bd19f GREEN
ProjectModelElementFactory.java 2963d3a1fe651025bae3ae4dc0b6e0b77bbaadd5 GREEN
ProjectUtils.java f1465eb779a321f3bf895dd5a6983fdfd9e0fa70 GREEN
ProjectUtils.java ec338a0640e7e6170942aa619ac853a6deb22d48 GREEN
TestCaseProjectUtils.java 83dc50f1fc28c7f1d9dcde9e4e0d02480656b7aa GREEN
TypeScopeUtils.java 54f2397f0d6720c90948ccc295f1a63b7319daac GREEN
VariableScopeUtils.java 031591687c2461a990d0534cf4ed4d6df39b1551 GREEN
......@@ -15,7 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.utils;
import static org.conqat.lib.commons.filesystem.FileSystemUtils.copyFile;
import static org.conqat.lib.commons.filesystem.FileSystemUtils.copy;
import static org.conqat.lib.commons.reflect.ReflectionUtils.pickInstanceOf;
import static org.eclipse.core.resources.ResourcesPlugin.getWorkspace;
import static org.fortiss.af3.project.AF3Project.AF3_PRJ_SUFFIX;
......@@ -36,6 +36,8 @@ import static org.fortiss.tooling.kernel.utils.LoggingUtils.showError;