diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/.ratings b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/.ratings index 8643275ae68fb82c4bcaf3298d14026e4ef35266..f2c9c9aaaee1809d25a31f53ada99d3ab33be95f 100644 --- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/.ratings +++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/.ratings @@ -1 +1 @@ -ComponentImplDiversityRefValueProvider.java 76cb8a45b2ca645cddf3956f8206f9280b8d571f RED +ComponentImplDiversityRefValueProvider.java d2cbe7d1acefd9941a766ea7cf2ac958a4347ef6 RED diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/ComponentImplDiversityRefValueProvider.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/ComponentImplDiversityRefValueProvider.java index 9169e78b520f0c4f47a8734363e6d47f8948bf07..30d88e9a239c9e7db07d94b5279f0e9e01f0724a 100644 --- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/ComponentImplDiversityRefValueProvider.java +++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/annotation/valueprovider/ComponentImplDiversityRefValueProvider.java @@ -17,13 +17,8 @@ package org.fortiss.af3.exploration.alg.annotation.valueprovider; import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getParentElement; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EStructuralFeature; import org.fortiss.af3.component.model.Component; import org.fortiss.af3.component.model.ComponentArchitecture; import org.fortiss.af3.component.utils.ComponentArchitectureUtils; @@ -116,23 +111,12 @@ public class ComponentImplDiversityRefValueProvider extends return level; } - /** {@link EStructuralFeature}s managed by this {@link IAnnotationValueProvider}. */ - private static Map<String, EStructuralFeatureDescriptor> createStructuralFeatureDescriptorMap() { - Map<String, EStructuralFeatureDescriptor> rval = - new HashMap<String, EStructuralFeatureDescriptor>(); - - rval.put(IAnnotationValueProvider.DEFAULT_KEY, - new DiversityRefFilterEStructuralFeatureDescriptor( - AnnotationPackage.Literals.COMPONENT_DIVERSE_IMPL_REF__COMPONENT_REF, - EStructuralFeatureDescriptor.EReferenceScope.PROJECT)); - - return Collections.unmodifiableMap(rval); - } - /** Constructs a value provider for the (derived) {@link ComponentDiverseImplRef} annotation. */ public ComponentImplDiversityRefValueProvider() { super(AnnotationPackage.Literals.COMPONENT_DIVERSE_IMPL_REF, - createStructuralFeatureDescriptorMap()); + new DiversityRefFilterEStructuralFeatureDescriptor( + AnnotationPackage.Literals.COMPONENT_DIVERSE_IMPL_REF__COMPONENT_REF, + EStructuralFeatureDescriptor.EReferenceScope.PROJECT)); } /** {@inheritDoc} */ diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/.ratings b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/.ratings index a2703ed408fd1cf4db951ea3b300aed7b2c1ead8..fd8bd4ac2e01b3f85ef0ca0ae3c38ad65f5a3f10 100644 --- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/.ratings +++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/.ratings @@ -1 +1 @@ -AF3DeploymentParameterMapAdapter.java 49170bb0ad34e91ccc957f98fe2ab2b76ea3d2a9 RED +AF3DeploymentParameterMapAdapter.java 0ddaa1c4eb1cbe2daf72854b266acfe8f85c6e70 RED diff --git a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/AF3DeploymentParameterMapAdapter.java b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/AF3DeploymentParameterMapAdapter.java index fe140456ddbe231c8c64e322c094c039af18522c..070e98cb28028de49305025bf7db0918479c4a85 100644 --- a/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/AF3DeploymentParameterMapAdapter.java +++ b/org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/dse/sysmodel/arch/af3/helper/AF3DeploymentParameterMapAdapter.java @@ -47,8 +47,9 @@ public class AF3DeploymentParameterMapAdapter { public AF3DeploymentParameterMapAdapter(Set<Deployment> af3DeploymentList) { componentParamDeploymentMap = new HashMap<Component, Deployment>(); for(Deployment singleParamDeployment : af3DeploymentList) { - ComponentArchitecture refCompArch = (ComponentArchitecture)singleParamDeployment - .getComponentArchitectureReference().getReference(); + ComponentArchitecture refCompArch = + (ComponentArchitecture)singleParamDeployment + .getComponentArchitectureReference().getReference(); Collection<Component> containedComponents = getChildrenWithType(refCompArch, Component.class); for(Component currentComponent : containedComponents) { @@ -63,8 +64,9 @@ public class AF3DeploymentParameterMapAdapter { boolean validAf3Elements = (af3Component != null && af3ExecutionUnit != null); Deployment associatedParamDeployment = componentParamDeploymentMap.get(af3Component); - Object wcetValue = associatedParamDeployment.getDeploymentParameter(af3Component, - af3ExecutionUnit, Wcet.class, null); + Object wcetValue = + associatedParamDeployment.getDeploymentParameter(af3Component, af3ExecutionUnit, + Wcet.class); return (validAf3Elements && wcetValue != null) ? ((BigDecimal)wcetValue).doubleValue() : -1.0; } @@ -76,8 +78,9 @@ public class AF3DeploymentParameterMapAdapter { boolean validAf3Elements = (af3Component != null && af3ExecutionUnit != null); Deployment associatedParamDeployment = componentParamDeploymentMap.get(af3Component); - Object energyValue = associatedParamDeployment.getDeploymentParameter(af3Component, - af3ExecutionUnit, EnergyConsumption.class, null); + Object energyValue = + associatedParamDeployment.getDeploymentParameter(af3Component, af3ExecutionUnit, + EnergyConsumption.class); return (validAf3Elements && energyValue != null) ? (Double)energyValue : -1.0; }