diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/DerivedAnnotationValueProviderBase.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/DerivedAnnotationValueProviderBase.java index ef9ae195a12654cfcbeba1493b611b38859d85d6..d83fac55ebe705b8a31919bbdc9071b0e171cf34 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/DerivedAnnotationValueProviderBase.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/valueprovider/DerivedAnnotationValueProviderBase.java @@ -21,24 +21,24 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EFactory; import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.EditingSupport; -import org.fortiss.tooling.base.model.base.DerivedAnnotationBase; import org.fortiss.tooling.base.model.element.IAnnotatedSpecification; +import org.fortiss.tooling.base.model.element.IDerivedAnnotation; /** * Base class for {@link IAnnotationValueProvider} for derived annotations (i.e., based on - * {@link DerivedAnnotationBase}). + * {@link IDerivedAnnotation}). * * @author barner * @author $Author$ * @version $Rev$ * @ConQAT.Rating RED Hash: */ -public abstract class DerivedAnnotationValueProviderBase<T extends DerivedAnnotationBase> extends +public abstract class DerivedAnnotationValueProviderBase<T extends IDerivedAnnotation<?>> extends ValueProviderBase<T> { /** * Constructs a {@link IAnnotationValueProvider} for derived annotations (i.e., based on - * {@link DerivedAnnotationBase}). + * {@link IDerivedAnnotation}). */ public DerivedAnnotationValueProviderBase(EClass annotatedSpecificationEClass, EFactory annotationFactory) { diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/AnnotationViewPartBase.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/AnnotationViewPartBase.java index 4e42219f5239d23d7262888cf0b7f3e63292d428..6e31d43a7493c0319b283451eb6287ca0b485822 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/AnnotationViewPartBase.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/AnnotationViewPartBase.java @@ -64,8 +64,9 @@ public abstract class AnnotationViewPartBase extends ViewPart implements ISelect Set<IModelElement> watchedModelElements = new HashSet<IModelElement>(); /** - * {@link Adapter} to watch for the addition or removal of model elements to/from elements - * visible in this {@link AnnotationViewPartBase} (to trigger according updates). + * {@link Adapter} to watch for the addition, removal or value change of model elements + * to/from/in elements visible in this {@link AnnotationViewPartBase} (to trigger according + * updates). */ private final Adapter changeListener = new AdapterImpl() { @Override diff --git a/org.fortiss.tooling.base/trunk/model/base.ecore b/org.fortiss.tooling.base/trunk/model/base.ecore index 4339ba1f664e1902a9109e87600094eb533d4468..58c9f162675cbb0e37e13dd8294d635e0ae1bb4d 100644 --- a/org.fortiss.tooling.base/trunk/model/base.ecore +++ b/org.fortiss.tooling.base/trunk/model/base.ecore @@ -152,6 +152,16 @@ <details key="documentation" value="An array of model element specifications."/> </eAnnotations> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="IDerivedAnnotation" abstract="true" + interface="true" eSuperTypes="#//element/IAnnotatedSpecification #//element/IHiddenSpecification"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Base class for {@link IAnnotationSpecification}s that are derived from the state of other annotations and/or model elements.

<ul>
<li>Concrete specifications must provide a specialized getValue() {@link EOperation}s that perform the required calculation. Example: Calculation of {@link Component} WCET for current deployment (if available) based on {@link Component} instruction count and performance (e.g., MIPS) of {@link ExecutionUnit}, some warning indicator otherwise. </li>
<li>Concrete specifications may provide additional {@link EOperation} that provide an advanced query interface to the annoation. Example: WCET for an explicitly specified {@link ExecutionUnit}. This can be used e.g. in a DSE to explore different deployments.</li>
<li>The corresponding {@link IAnnotationValueProvider} should be based on {@link DerivedAnnotationValueProviderBase}.
</ul>"/> + </eAnnotations> + <eTypeParameters name="T"/> + <eOperations name="getValue"> + <eGenericType eTypeParameter="#//element/IDerivedAnnotation/T"/> + </eOperations> + </eClassifiers> </eSubpackages> <eSubpackages name="layout" nsURI="http://www.fortiss.org/tooling/base/model/layout" nsPrefix="org-fortiss-tooling-base-model-layout"> @@ -294,16 +304,5 @@ </eAnnotations> </eOperations> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DerivedAnnotationBase" abstract="true" - eSuperTypes="#//element/IAnnotatedSpecification #//element/IHiddenSpecification"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Base class for {@link IAnnotationSpecification}s that are derived from the state of other annotations and/or model elements.

<ul>
<li>Concrete specifications must provide a specialized getValue() {@link EOperation}s that perform the required calculation. Example: Calculation of {@link Component} WCET for current deployment (if available) based on {@link Component} instruction count and performance (e.g., MIPS) of {@link ExecutionUnit}, some warning indicator otherwise. </li>
<li>Concrete specifications may provide additional {@link EOperation} that provide an advanced query interface to the annoation. Example: WCET for an explicitly specified {@link ExecutionUnit}. This can be used e.g. in a DSE to explore different deployments.</li>
<li>The corresponding {@link IAnnotationValueProvider} should be based on {@link DerivedAnnotationValueProviderBase}.
</ul>"/> - </eAnnotations> - <eOperations name="getValue" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="body" value="return null;"/> - </eAnnotations> - </eOperations> - </eClassifiers> </eSubpackages> </ecore:EPackage> diff --git a/org.fortiss.tooling.base/trunk/model/base.genmodel b/org.fortiss.tooling.base/trunk/model/base.genmodel index ea8a322df4e56a64d3067e5000b19a62d8c255ad..f21f947c872edc44d05d76b532c84a1ca4dcf881 100644 --- a/org.fortiss.tooling.base/trunk/model/base.genmodel +++ b/org.fortiss.tooling.base/trunk/model/base.genmodel @@ -48,6 +48,10 @@ </genClasses> <genClasses image="false" ecoreClass="base.ecore#//element/IHiddenSpecification"/> <genClasses ecoreClass="base.ecore#//element/IAnnotatedSpecification"/> + <genClasses image="false" ecoreClass="base.ecore#//element/IDerivedAnnotation"> + <genTypeParameters ecoreTypeParameter="base.ecore#//element/IDerivedAnnotation/T"/> + <genOperations ecoreOperation="base.ecore#//element/IDerivedAnnotation/getValue"/> + </genClasses> </nestedGenPackages> <nestedGenPackages prefix="Layout" basePackage="org.fortiss.tooling.base.model" disposableProviderFactory="true" ecorePackage="base.ecore#//layout"> @@ -97,9 +101,6 @@ <genOperations ecoreOperation="base.ecore#//base/LibraryElementBase/getURI"/> <genOperations ecoreOperation="base.ecore#//base/LibraryElementBase/getName"/> </genClasses> - <genClasses image="false" ecoreClass="base.ecore#//base/DerivedAnnotationBase"> - <genOperations ecoreOperation="base.ecore#//base/DerivedAnnotationBase/getValue"/> - </genClasses> </nestedGenPackages> </genPackages> </genmodel:GenModel>