diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/AF3SystemModelAdapter.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/AF3SystemModelAdapter.java index a734d77da306ecb7f3ea08c34923f99c31fbd217..68af409eb271c01d05d941bff5970fde223c6f66 100644 --- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/AF3SystemModelAdapter.java +++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/AF3SystemModelAdapter.java @@ -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.isUpdateEnabled; 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; @@ -111,12 +112,16 @@ public class AF3SystemModelAdapter */ private Collection<IDeployableComponentAdapter<Component>> componentReplacementAdapters; + // TODO (2x): package access rights are ok? If so, please add /* package */ /** Contains informations whether the given AF3 model supports multicast channels. */ boolean multicastSupport = false; /** References the method which returns the multicast targets (if available). */ Method multicastGetTargets; + /** Cache the Annotation View's update status. */ + private boolean annotationUpdateEnabled; + /** * Constructor. * @@ -147,6 +152,7 @@ public class AF3SystemModelAdapter putInputModel(PlatformArchitecture.class, platformArchitecture); // Disable any annotation view update. + annotationUpdateEnabled = isUpdateEnabled(); setUpdateEnabled(false); // Determine the associated hardware platform given the platform architecture is a a model @@ -210,7 +216,7 @@ public class AF3SystemModelAdapter createAbstractTaskGraphEncoding(); // Re-enable annotation view updates. - setUpdateEnabled(true); + setUpdateEnabled(annotationUpdateEnabled); } /** Determines whether the current AF3 version supports multicast channels. */ diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/service/internal/ExplorationTransformationService.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/service/internal/ExplorationTransformationService.java index 590e717534af3e4340437e010fe0a725e405a6a3..b33e9856a951837632f87f862737ea0210be699d 100644 --- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/service/internal/ExplorationTransformationService.java +++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/service/internal/ExplorationTransformationService.java @@ -270,11 +270,8 @@ public class ExplorationTransformationService<T extends ITransformationModule<?> ((ITransformationStrategy<?>)moduleInstance).setModelName(transformedModelName); } - // Disable any Annotation view update - if(isUpdateEnabled()) { - annotationUpdateEnabled = true; - setUpdateEnabled(false); - } + annotationUpdateEnabled = isUpdateEnabled(); + setUpdateEnabled(false); SubClassToInstanceMap<U> transformedModels = MutableSubClassToInstanceMap.create(); moduleInstance.transform(TransformationState.INITIALIZING, context, baseModels, @@ -296,10 +293,8 @@ public class ExplorationTransformationService<T extends ITransformationModule<?> ((ITransformationStrategy<?>)moduleInstance).addModelToProject(fp, modelContext); } - // Disable any Annotation view update - if(annotationUpdateEnabled) { - setUpdateEnabled(true); - } + // Re-enable Annotation view updates if needed + setUpdateEnabled(annotationUpdateEnabled); ClassToInstanceMap<U> retModels = MutableClassToInstanceMap.create(); for(Class<? extends EObject> retType : transformedModelTypes) {