...
 
Commits (5)
AF3Exploration.java c3c1ac801d302ff2c7d79cbcbe459a4f087a4093 GREEN
AF3ExplorationActivator.java 875ca23cdb09e8558f7718aceac220c53f084be5 YELLOW
AF3ExplorationActivator.java 875ca23cdb09e8558f7718aceac220c53f084be5 GREEN
ExecuteDSECommandLineHandler.java 3e7c93fb7476f63499e85c2fc3e364c25b1cc23a GREEN
ExecuteDSECommandLineHandler.java f6a4698f2cd01145db0459deedf6919bc23348e9 GREEN
TestCaseGenerationCommandLineHandler.java ccd942515f5490ff9ed6ece891f3ade206333a08 GREEN
ValidateDSESolutionCommandLineInterface.java fe22edc178a4255dca54d083d3869c9142b7d304 GREEN
......@@ -18,6 +18,7 @@ package org.fortiss.af3.exploration.cli;
import static java.util.Collections.emptyList;
import static org.fortiss.af3.exploration.AF3ExplorationActivator.getDefault;
import static org.fortiss.af3.exploration.util.DSEProjectModelElementFactory.createExplorationStep;
import static org.fortiss.af3.exploration.util.DSEProjectModelElementFactory.createSolutionSelectionStep;
import static org.fortiss.af3.exploration.util.ExplorationCLIUtils.findMatchingDSEProject;
import static org.fortiss.af3.exploration.util.ExplorationCLIUtils.getExplorationTypeByArgument;
import static org.fortiss.af3.exploration.util.ExplorationModelElementFactory.createExplorationSpecification;
......@@ -43,7 +44,9 @@ import org.fortiss.af3.exploration.model.project.DSE;
import org.fortiss.af3.exploration.model.project.ExplorationStep;
import org.fortiss.af3.exploration.model.project.ProcessStep;
import org.fortiss.af3.exploration.model.project.RuleSet;
import org.fortiss.af3.exploration.model.project.SolutionSelectionStep;
import org.fortiss.af3.exploration.model.solutions.ExplorationSolution;
import org.fortiss.af3.exploration.model.solutions.SingleExplorationSolution;
import org.fortiss.af3.exploration.service.IDSEBackend;
import org.fortiss.af3.exploration.service.IDSEBackendService;
import org.fortiss.af3.project.model.FileProject;
......@@ -61,7 +64,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
public final class ExecuteDSECommandLineHandler implements ICommandLineSwitchHandler {
/** Static timeout (can be moved as defineable to the argument string if needed). */
private static final int timeoutMS = 10 * 1000; // 10 seconds
private static final int timeoutMS = 3600 * 1000; // 1 hour
/** DSE service used for the exploration. */
private final IDSEBackendService dseService = IDSEBackendService.getInstance();
......@@ -167,6 +170,15 @@ public final class ExecuteDSECommandLineHandler implements ICommandLineSwitchHan
IPersistencyService.getInstance().getTopLevelElementFor(dse);
prepareIDs(expStep, dse, getLargestID(dse));
modelCtx.runAsCommand(() -> dse.addProcessStep(expStep));
SolutionSelectionStep solSelStep = createSolutionSelectionStep("CLI Solution");
Optional<SingleExplorationSolution> singleSol = getFirst(result.getSolutions());
if(singleSol.isPresent()) {
solSelStep.setSelectedSolution(singleSol.get());
prepareIDs(solSelStep, dse, getLargestID(dse));
}
modelCtx.runAsCommand(() -> dse.addProcessStep(solSelStep));
try {
modelCtx.doSave(new NullProgressMonitor());
} catch(CoreException | IOException e) {
......@@ -180,7 +192,7 @@ public final class ExecuteDSECommandLineHandler implements ICommandLineSwitchHan
/** Creates an {@link ExplorationStep} to store the result. */
private ExplorationStep createCLIExplorationStep(ExplorationSolution result) {
ExplorationStep expStep = createExplorationStep("CLI solution", emptyList());
ExplorationStep expStep = createExplorationStep("CLI Exploration", emptyList());
expStep.setSolution(result);
ProcessStep pStep = dse.getCurrentStep();
......