Commit 11c3599b authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Platform Exploration: Correctly add the results to the AF3 project

.. no major rework due to the upcoming switch of the synthesis view to
JFX.

Issue-Ref: 3888
Issue-Url: https://af3-developer.fortiss.org/issues/3888

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 44e8fc22
DeploymentSynthesisViewBackend.java df1b02a7a1bda52effda366ad1b47e06c6dc58d7 GREEN
PlatformSynthesisViewBackend.java ea74030685642c70ae73e97bb10c4c9932e00c94 GREEN
PlatformSynthesisViewBackend.java 13e538cd9b14debc3a7bf98d28cb3bcdc20ffdee YELLOW
ScheduleSynthesisViewBackend.java 597320941b651a4c53e313e00ae3b345f111726e GREEN
......@@ -29,7 +29,8 @@ import static org.fortiss.tooling.kernel.ui.util.MessageUtilsExtended.showErrorI
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstParentWithType;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.runAsCommand;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.showInfo;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.fixMissingIDs;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.getLargestID;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.prepareIDs;
import java.util.ArrayList;
import java.util.HashSet;
......@@ -168,7 +169,7 @@ public class PlatformSynthesisViewBackend extends PlatformSynthesisViewGUI {
try {
dbs.explore(new DSEResultAdapter(), getTotalTimeout());
runAsCommand(dse, () -> fixMissingIDs(pm.getCurrentlySelectedDSE(), dse));
// runAsCommand(dse, () -> fixMissingIDs(pm.getCurrentlySelectedDSE(), dse));
} catch(Exception ex) {
showErrorInUIThread("Error executing the DSE.", ex.getMessage());
}
......@@ -220,6 +221,12 @@ public class PlatformSynthesisViewBackend extends PlatformSynthesisViewGUI {
"solution was found (or infeasibility was detected).");
return;
} else {
DSE dse = IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE();
prepareIDs(solution, dse, getLargestID(dse));
// Unchecked cast: It is not possible to get here without an ExplorationStep being the
// current one upfront.
ExplorationStep expStep = (ExplorationStep)dse.getCurrentStep();
getRunner().run(() -> expStep.setSolution(solution));
prepareResultVisualization(solution);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment