Skip to content
Snippets Groups Projects
Commit 0dfbb677 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

- Avoid annotation view updates during the DSE.

parent 002a02d3
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ import org.fortiss.af3.exploration.model.ExplorationTarget;
import org.fortiss.af3.exploration.moea.model.DseSpecification;
import org.fortiss.af3.exploration.moea.model.feature.SafetyExploration;
import org.fortiss.af3.exploration.moea.model.parameters.EAOptimizer;
import org.fortiss.tooling.base.ui.annotation.view.AnnotationViewPartBase;
import org.opt4j.core.common.completer.IndividualCompleterModule;
import org.opt4j.core.config.Task;
import org.opt4j.core.config.TaskStateListener;
......@@ -244,6 +245,9 @@ public class Opt4JExplorerBackend extends ExplorerBackendBase<EAOptimizer> {
progressMonitor.beginTask("EA optimization", opt4JParameters.getIterations());
}
// Disable any Annotation view update
AnnotationViewPartBase.setUpdateEnabled(false);
CompositeExplorationSolution<?> rval = null;
Exception ex = null;
try {
......@@ -264,6 +268,9 @@ public class Opt4JExplorerBackend extends ExplorerBackendBase<EAOptimizer> {
rval = validate(rval, archExplorationProblemModule.getEvaluators());
}
opt4JTask.close();
// Disable any Annotation view update
AnnotationViewPartBase.setUpdateEnabled(true);
}
if(ex != null) {
......
......@@ -19,7 +19,6 @@ package org.fortiss.af3.exploration.alg.dse.modeltransformation.base;
import static java.util.Collections.sort;
import static org.fortiss.af3.exploration.alg.util.ExplorationAlgUtils.pickInstanceOf;
import static org.fortiss.tooling.base.ui.annotation.view.AnnotationViewPartBase.setUpdateEnabled;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -102,9 +101,6 @@ public abstract class TransformationStrategyBase<T extends EObject> extends
ExplorationEncodingMap<IExplorationEncoding> explorationEncodings,
SubClassToInstanceMap<N> transformedModels, EObject outputModel)
throws TransformationModuleException {
// Disable any Annotation view update
setUpdateEnabled(false);
if(transformedModels == null) {
throw new TransformationModuleException(this,
"The map which will contain all transformed models must be passed.");
......@@ -128,9 +124,6 @@ public abstract class TransformationStrategyBase<T extends EObject> extends
doSetModelName();
// Re-enable Annotation view updates
setUpdateEnabled(true);
encEntryModelElemAssoc.clear();
origToGenAssocMap.clear();
genToOrigAssocMap.clear();
......
......@@ -27,6 +27,7 @@ import static org.fortiss.af3.exploration.alg.util.ExplorationAlgUtils.getDeploy
import static org.fortiss.af3.platform.utils.PlatformArchitectureUtils.getPhysicalPlatformArchitecture;
import static org.fortiss.af3.platform.utils.PlatformArchitectureUtils.getReferencedElementsWithType;
import static org.fortiss.af3.schedule.utils.MathUtils.gcdDoubleCollection;
import static org.fortiss.tooling.base.ui.annotation.view.AnnotationViewPartBase.setUpdateEnabled;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
......@@ -145,6 +146,9 @@ public class AF3SystemModelAdapter
putInputModel(ComponentArchitecture.class, componentArchitecture);
putInputModel(PlatformArchitecture.class, platformArchitecture);
// Disable any annotation view update.
setUpdateEnabled(false);
// Determine the associated hardware platform given the platform architecture is a a model
// of a virtual platform.
hardwarePlatformArchitecture = getPhysicalPlatformArchitecture(platformArchitecture);
......@@ -205,6 +209,9 @@ public class AF3SystemModelAdapter
setupEmittedMessages();
setupPlatformGraph();
createAbstractTaskGraphEncoding();
// Re-enable annotation view updates.
setUpdateEnabled(true);
}
/** Determines whether the current AF3 version supports multicast channels. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment