Commit ac0ad7f3 authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch '3746' into 'master'

3746

See merge request af3/af3!224
parents d15e4f62 2044fc12
AF3AllocationFactoryImplCustom.java 36f55f6cc9ab49c09223a7b0c0163157b137aeb3 GREEN
AllocationEntryStaticImpl.java 49e2c1390029f9652e8d891a1ce281f30e941d5b GREEN
AllocationTableCollectionStaticImpl.java d1ebdc08e00373ca5940853c1fb7c1b0a5b19c43 GREEN
AllocationTableStaticImpl.java 81c556aad96385789a251c19e5ec92db1f07bae8 GREEN
AllocationTableStaticImpl.java 374938800d794e34416f5cc15f04cc825e705e5e GREEN
ParameterEntryStaticImpl.java 81f62de67eaeac99da628853f31ae13bc6a33cc4 GREEN
ParameterTableStaticImpl.java 92c80d863c44ebabe82fed3ab78ed600156d6faf GREEN
......@@ -172,9 +172,8 @@ public class AllocationTableStaticImpl {
if(ae.getSourceElement() == sourceElement) {
if(IBidirectional.class.isAssignableFrom(type)) {
return ae.getTargetElements();
} else if(IUnidirectional.class.isAssignableFrom(type)) {
rval.addAll(ae.getTargetElements());
}
rval.addAll(ae.getTargetElements());
}
}
} else if(OneToOneAllocationEntry.class.isAssignableFrom(type)) {
......@@ -183,9 +182,8 @@ public class AllocationTableStaticImpl {
if(ae.getSourceElement() == sourceElement) {
if(IBidirectional.class.isAssignableFrom(type)) {
return singletonEList(ae.getTargetElement());
} else if(IUnidirectional.class.isAssignableFrom(type)) {
rval.add(ae.getTargetElement());
}
rval.add(ae.getTargetElement());
}
}
} else if(ManyToOneAllocationEntry.class.isAssignableFrom(type)) {
......@@ -194,9 +192,8 @@ public class AllocationTableStaticImpl {
if(ae.getSourceElements().contains(sourceElement)) {
if(IBidirectional.class.isAssignableFrom(type)) {
return singletonEList(ae.getTargetElement());
} else if(IUnidirectional.class.isAssignableFrom(type)) {
rval.add(ae.getTargetElement());
}
rval.add(ae.getTargetElement());
}
}
}
......@@ -351,9 +348,8 @@ public class AllocationTableStaticImpl {
if(ae.getTargetElement() == targetElement) {
if(IBidirectional.class.isAssignableFrom(type)) {
return ae.getSourceElements();
} else if(IUnidirectional.class.isAssignableFrom(type)) {
rval.addAll(ae.getSourceElements());
}
rval.addAll(ae.getSourceElements());
}
}
} else if(OneToOneAllocationEntry.class.isAssignableFrom(type)) {
......@@ -362,9 +358,8 @@ public class AllocationTableStaticImpl {
if(ae.getTargetElement() == targetElement) {
if(IBidirectional.class.isAssignableFrom(type)) {
return singletonEList(ae.getSourceElement());
} else if(IUnidirectional.class.isAssignableFrom(type)) {
rval.add(ae.getSourceElement());
}
rval.add(ae.getSourceElement());
}
}
} else if(OneToManyAllocationEntry.class.isAssignableFrom(type)) {
......@@ -373,9 +368,8 @@ public class AllocationTableStaticImpl {
if(ae.getTargetElements().contains(targetElement)) {
if(IBidirectional.class.isAssignableFrom(type)) {
return singletonEList(ae.getSourceElement());
} else if(IUnidirectional.class.isAssignableFrom(type)) {
rval.add(ae.getSourceElement());
}
rval.add(ae.getSourceElement());
}
}
}
......
AllocationModelElementFactory.java 9aba183708290c741ebbbe2897bbfcc51ea33fb6 GREEN
AllocationUtils.java 51864f85b91a3f4bc84bbdf7d43e129f37a5a414 GREEN
AllocationUtils.java 365a1b904d7eaa9d22b723307ae0dd2892a925a2 GREEN
......@@ -22,6 +22,7 @@ import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.cre
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.createAllocationTableCollection;
import static org.fortiss.af3.project.utils.ProjectUtils.getFileProject;
import static org.fortiss.tooling.common.util.LambdaUtils.asStream;
import static org.fortiss.tooling.common.util.LambdaUtils.getFirst;
import static org.fortiss.tooling.common.util.LambdaUtils.isAssignableFromAny;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copyToRefMap;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
......@@ -509,6 +510,36 @@ public class AllocationUtils {
return null;
}
/**
* Returns the first found {@link AllocationTable} from the given
* {@link AllocationTableCollection} whose source view has the given type. If none is found
* {@code null} is returned.
*/
public static AllocationTable getAllocationTableWithSourceView(AllocationTableCollection atc,
Class<?> sourceViewType) {
for(AllocationTable at : atc.getAllocationTables()) {
if(sourceViewType.isAssignableFrom(at.getSourceView().getClass())) {
return at;
}
}
return null;
}
/**
* Returns the first found {@link AllocationTable} from the given
* {@link AllocationTableCollection} whose target view has the given type. If none is found
* {@code null} is returned.
*/
public static AllocationTable getAllocationTableWithTargetView(AllocationTableCollection atc,
Class<?> targetViewType) {
for(AllocationTable at : atc.getAllocationTables()) {
if(targetViewType.isAssignableFrom(at.getTargetView().getClass())) {
return at;
}
}
return null;
}
/**
* Returns all {@link AllocationTable} specializations of the given {@code type} in the model
* that contains the given {@code element}.
......@@ -547,6 +578,100 @@ public class AllocationUtils {
return null;
}
/**
* For a given {@code targetElement} this method collects all of its transient allocation
* sources of the given type {@code sourceType}. Therefore, it examines other
* {@link AllocationTable}s until tables pointing to elements of the source type are
* reached. The examination logic is implemented on a per-element basis.
*/
@SuppressWarnings("unchecked")
public static <T extends IModelElement> Collection<T> getAllocationSourcesTransitive(
AllocationTableCollection atc, IModelElement targetElement, Class<T> sourceType) {
AllocationTable at = getAllocationTableWithTargetElement(atc, targetElement);
Collection<IModelElement> intermediateSrcs = getAllocationSources(targetElement, at);
// Directly return target elements if the current allocation table defines them as its
// target type.
Optional<IModelElement> firstSrc = getFirst(intermediateSrcs);
if(firstSrc.isPresent() && sourceType.isAssignableFrom(firstSrc.get().getClass())) {
return (Collection<T>)intermediateSrcs;
}
// Descend to further tables until a table pointing to the target type is reached.
Collection<T> srcElements = new ArrayList<>();
for(IModelElement me : intermediateSrcs) {
srcElements.addAll(getAllocationSourcesTransitive(atc, me, sourceType));
}
return srcElements;
}
/**
* Returns the source {@link IModelElement} that are allocated to the given
* {@code targetElement} in the given {@link AllocationTable}.
*/
private static Collection<IModelElement> getAllocationSources(IModelElement targetElement,
AllocationTable at) {
Collection<IModelElement> sources =
at.getSourceElements(targetElement, OneToManyAllocationEntry.class);
if(!sources.isEmpty()) {
return sources;
}
sources = at.getSourceElements(targetElement, OneToOneAllocationEntry.class);
if(!sources.isEmpty()) {
return sources;
}
return at.getSourceElements(targetElement, ManyToOneAllocationEntry.class);
}
/**
* For a given {@code sourceElement}, this method collects all of its transitive allocation
* targets of the given type {@code sourceType}. Therefore, it examines other
* {@link AllocationTable}s until tables pointing to elements of the target type
* are reached. The examination logic is implemented on a per-element basis.
*/
@SuppressWarnings("unchecked")
public static <T extends IModelElement> Collection<T> getAllocationTargetsTransitive(
AllocationTableCollection atc, IModelElement sourceElement, Class<T> targetType) {
AllocationTable at = getAllocationTableWithTargetElement(atc, sourceElement);
Collection<IModelElement> intermediateTgts = getAllocationTargets(sourceElement, at);
// Directly return target elements if the current allocation table defines them as its
// target type.
Optional<IModelElement> firstTgt = getFirst(intermediateTgts);
if(firstTgt.isPresent() && targetType.isAssignableFrom(firstTgt.get().getClass())) {
return (Collection<T>)intermediateTgts;
}
// Descend to further tables until a table pointing to the target type is reached.
Collection<T> tgtElements = new ArrayList<>();
for(IModelElement me : intermediateTgts) {
tgtElements.addAll(getAllocationTargetsTransitive(atc, me, targetType));
}
return tgtElements;
}
/**
* Returns the target {@link IModelElement}s to which the given {@code sourceElement} is mapped
* in the given {@link AllocationTable}.
*/
private static Collection<IModelElement> getAllocationTargets(IModelElement sourceElement,
AllocationTable at) {
Collection<IModelElement> targets =
at.getTargetElements(sourceElement, OneToManyAllocationEntry.class);
if(!targets.isEmpty()) {
return targets;
}
targets = at.getTargetElements(sourceElement, OneToOneAllocationEntry.class);
if(!targets.isEmpty()) {
return targets;
}
return at.getTargetElements(sourceElement, ManyToOneAllocationEntry.class);
}
/**
* Retrieves the {@link AllocationTable} specialization of the given {@code allocationTableType}
* that references the given {@code sourceView} and {@code targetView} (at most one of these
......
......@@ -5,9 +5,9 @@ Bundle-Name: AF3 Platform UI
Bundle-SymbolicName: org.fortiss.af3.platform.ui;singleton:=true
Bundle-Version: 2.15.0.qualifier
Bundle-Activator: org.fortiss.af3.platform.ui.AF3PlatformUIActivator
Require-Bundle: org.fortiss.af3.platform;bundle-version="2.15.0";visibility:=reexport,
org.fortiss.af3.component.ui;bundle-version="2.15.0";visibility:=reexport,
org.fortiss.af3.allocation.ui
Require-Bundle: org.fortiss.af3.platform;visibility:=reexport,
org.fortiss.af3.component.ui;visibility:=reexport,
org.fortiss.af3.allocation.ui;visibility:=reexport
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: fortiss GmbH
......@@ -20,4 +20,5 @@ Export-Package: org.fortiss.af3.platform.ui,
org.fortiss.af3.platform.ui.generator,
org.fortiss.af3.platform.ui.handler,
org.fortiss.af3.platform.ui.handler.generic,
org.fortiss.af3.platform.ui.properties,
org.fortiss.af3.platform.ui.prototypes
......@@ -80,4 +80,42 @@
<extension point="org.fortiss.tooling.kernel.ui.contextMenuContribution">
<contextMenuContribution contributor="org.fortiss.af3.platform.ui.generator.BareMetalGeneratorEasyStartMenu"/>
</extension>
<!-- Property sections -->
<extension
point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
<propertyTabs
contributorId="org.fortiss.tooling.kernel.ui.properties.Contributor">
<propertyTab
category="main"
id="org.fortiss.af3.platform.ui.properties.characteristics"
label="Arch Characteristics">
</propertyTab>
</propertyTabs>
</extension>
<extension
point="org.eclipse.ui.views.properties.tabbed.propertySections">
<propertySections
contributorId="org.fortiss.tooling.kernel.ui.properties.Contributor">
<propertySection
class="org.fortiss.af3.platform.ui.properties.TypeSizePropertySection"
enablesFor="1"
id="org.fortiss.af3.platform.ui.properties.TypeSizePropertySection"
tab="org.fortiss.af3.platform.ui.properties.characteristics">
<input
type="org.fortiss.af3.platform.model.ExecutionUnit">
</input>
</propertySection>
<propertySection
class="org.fortiss.af3.platform.ui.properties.TypeSizePropertySection"
enablesFor="1"
id="org.fortiss.af3.platform.ui.properties.TypeSizePropertySection"
tab="org.fortiss.af3.platform.ui.properties.characteristics">
<input
type="org.fortiss.af3.platform.model.PlatformArchitecture">
</input>
</propertySection>
</propertySections>
</extension>
</plugin>
TypeSizePropertySection.java 5131a44d2f75e024df45b555c1f7f7ab255e80b6 GREEN
/*-------------------------------------------------------------------------+
| Copyright 2019 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.ui.properties;
import static org.fortiss.tooling.kernel.ui.util.ObservableUtils.observeValue;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.platform.model.annotation.AF3PlatformAnnotationPackage;
import org.fortiss.af3.platform.model.annotation.BooleanSize;
import org.fortiss.af3.platform.model.annotation.FloatSize;
import org.fortiss.af3.platform.model.annotation.IntegerSize;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
/**
* Simple property editor to define the size of types within the {@link PlatformArchitecture}.
*
* @author diewald
*/
public class TypeSizePropertySection extends PropertySectionBase {
/** Architecture-dependent size of Booleans (in bits) for an {@link ExecutionUnit}. */
private BooleanSize booleanSize;
/** Architecture-dependent size of Integers (in bits) for an {@link ExecutionUnit}. */
private IntegerSize integerSize;
/** Architecture-dependent size of Floats (in bits) for an {@link ExecutionUnit}. */
private FloatSize floatSize;
/** Text field for defining the size of booleans. */
private Text booleanSizeText;
/** Text field for defining the size of integers. */
private Text integerSizeText;
/** Text field for defining the size of doubles. */
private Text floatSizeText;
/** {@inheritDoc} */
@Override
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
super.createControls(parent, aTabbedPropertySheetPage);
booleanSizeText = createFormText("Boolean size [bits]");
integerSizeText = createFormText("Integer size [bits]");
floatSizeText = createFormText("Float size [bits]\n" + "(IEEE-754: 32 bits)");
}
/** {@inheritDoc} */
@Override
protected void setSectionInput(Object input) {
if(!(input instanceof ExecutionUnit) && !(input instanceof PlatformArchitecture)) {
return;
}
IModelElement element = (IModelElement)input;
booleanSize = pickFirstInstanceOf(BooleanSize.class, element.getSpecifications());
integerSize = pickFirstInstanceOf(IntegerSize.class, element.getSpecifications());
floatSize = pickFirstInstanceOf(FloatSize.class, element.getSpecifications());
}
/** {@inheritDoc} */
@Override
public void refresh() {
super.refresh();
bindPositiveIntegerValue(booleanSizeText,
observeValue(booleanSize, AF3PlatformAnnotationPackage.Literals.TYPE_SIZE__SIZE));
bindPositiveIntegerValue(integerSizeText,
observeValue(integerSize, AF3PlatformAnnotationPackage.Literals.TYPE_SIZE__SIZE));
bindPositiveIntegerValue(floatSizeText,
observeValue(floatSize, AF3PlatformAnnotationPackage.Literals.TYPE_SIZE__SIZE));
}
}
deployment.ecore 28d5a45bf242f09044f30bf34aee407fc22162db GREEN
platform.ecore efeb964a25cfe78ca86e04a2af69f3badeff77f9 GREEN
platform.ecore 202a4c23ba0c53f29170390ce9a392f5d72139ab GREEN
......@@ -842,7 +842,7 @@
</eAnnotations>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="maxMessageSizeBytes"
lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eGenericSuperTypes eClassifier="ecore:EClass platform:/resource/org.fortiss.tooling.base/model/base.ecore#//base/DerivedAnnotationBase">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eGenericSuperTypes>
......@@ -896,6 +896,105 @@
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELongObject"/>
</eGenericSuperTypes>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TypeSize" abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Base annotation class for the specification of platform-specific type sizes."/>
</eAnnotations>
<eOperations name="getDerivedValue" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return TypeSizeStaticImpl.getDerivedValue(this);"/>
</eAnnotations>
</eOperations>
<eOperations name="getUserAnnotatedValue" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return size;"/>
</eAnnotations>
</eOperations>
<eOperations name="getDefaultSize" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eOperations name="getAF3Type" lowerBound="1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Returns the corresponding AF3 Type that this size annotation represents. Must be implemented by concrete classes!"/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
<eTypeArguments/>
</eGenericType>
</eOperations>
<eOperations name="getValueOf" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Used to query type sizes. They can also be derived ones such as double that is derived from float. Such converisons have to be implemented in the specializations of the {@link TypeSize} annotation. Defaults to &quot;getValue()&quot;."/>
<details key="body" value="return getValue();"/>
</eAnnotations>
<eParameters name="type" lowerBound="1" eType="ecore:EClass platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/IType"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eGenericSuperTypes eClassifier="ecore:EClass platform:/resource/org.fortiss.tooling.base/model/base.ecore#//base/DerivedAnnotationBase">
<eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eGenericSuperTypes>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="BooleanSize" eSuperTypes="#//annotation/TypeSize">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Annotation class for the specification of platform-specific size of Booleans."/>
</eAnnotations>
<eOperations name="getDefaultSize" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return 1;"/>
</eAnnotations>
</eOperations>
<eOperations name="getAF3Type" lowerBound="1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Returns the corresponding AF3 Type that this size annotation represents. Must be implemented by concrete classes!"/>
<details key="body" value="return org.fortiss.af3.expression.model.types.TBool.class;"/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
<eTypeArguments/>
</eGenericType>
</eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IntegerSize" eSuperTypes="#//annotation/TypeSize">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Annotation class for the specification of platform-specific size of Integers."/>
</eAnnotations>
<eOperations name="getDefaultSize" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return 32;"/>
</eAnnotations>
</eOperations>
<eOperations name="getAF3Type" lowerBound="1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Returns the corresponding AF3 Type that this size annotation represents. Must be implemented by concrete classes!"/>
<details key="body" value="return org.fortiss.af3.expression.model.types.TInt.class;"/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
<eTypeArguments/>
</eGenericType>
</eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FloatSize" eSuperTypes="#//annotation/TypeSize">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Annotation class for the specification of platform-specific size of Floats."/>
</eAnnotations>
<eOperations name="getDefaultSize" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="return 32;"/>
</eAnnotations>
</eOperations>
<eOperations name="getAF3Type" lowerBound="1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Returns the corresponding AF3 Type that this size annotation represents. Must be implemented by concrete classes!"/>
<details key="body" value="return org.fortiss.af3.expression.model.types.TDouble.class;"/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
<eTypeArguments/>
</eGenericType>
</eOperations>
<eOperations name="getValueOf" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Used to query type sizes. They can also be derived ones such as double that is derived from float. Such converisons have to be implemented in the specializations of the {@link TypeSize} annotation. Defaults to &quot;getValue()&quot;."/>
<details key="body" value="return FloatSizeStaticImpl.getValueOf(this, type);"/>
</eAnnotations>
<eParameters name="type" lowerBound="1" eType="ecore:EClass platform:/resource/org.fortiss.af3.project/model/project.ecore#//typesystem/IType"/>
</eOperations>
</eClassifiers>
</eSubpackages>
<eSubpackages name="generic" nsURI="http://www.fortiss.org/af3/platform/generic"
nsPrefix="org-fortiss-af3-platform-generic">
......
......@@ -277,6 +277,41 @@
<genOperations ecoreOperation="platform.ecore#//annotation/RamSize/getUserAnnotatedValue"
body="return RamSizeStaticImpl.getUserAnnotatedValue(this);"/>
</genClasses>
<genClasses ecoreClass="platform.ecore#//annotation/TypeSize">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform.ecore#//annotation/TypeSize/size"/>
<genOperations ecoreOperation="platform.ecore#//annotation/TypeSize/getDerivedValue"
body="return TypeSizeStaticImpl.getDerivedValue(this);"/>
<genOperations ecoreOperation="platform.ecore#//annotation/TypeSize/getUserAnnotatedValue"
body="return size;"/>
<genOperations ecoreOperation="platform.ecore#//annotation/TypeSize/getDefaultSize"/>
<genOperations ecoreOperation="platform.ecore#//annotation/TypeSize/getAF3Type"/>
<genOperations ecoreOperation="platform.ecore#//annotation/TypeSize/getValueOf"
body="return getValue();">
<genParameters ecoreParameter="platform.ecore#//annotation/TypeSize/getValueOf/type"/>
</genOperations>
</genClasses>
<genClasses ecoreClass="platform.ecore#//annotation/BooleanSize">
<genOperations ecoreOperation="platform.ecore#//annotation/BooleanSize/getDefaultSize"
body="return 1;"/>
<genOperations ecoreOperation="platform.ecore#//annotation/BooleanSize/getAF3Type"
body="return org.fortiss.af3.expression.model.types.TBool.class;"/>
</genClasses>
<genClasses ecoreClass="platform.ecore#//annotation/IntegerSize">
<genOperations ecoreOperation="platform.ecore#//annotation/IntegerSize/getDefaultSize"
body="return 32;"/>
<genOperations ecoreOperation="platform.ecore#//annotation/IntegerSize/getAF3Type"
body="return org.fortiss.af3.expression.model.types.TInt.class;"/>
</genClasses>
<genClasses ecoreClass="platform.ecore#//annotation/FloatSize">
<genOperations ecoreOperation="platform.ecore#//annotation/FloatSize/getDefaultSize"
body="return 32;"/>
<genOperations ecoreOperation="platform.ecore#//annotation/FloatSize/getAF3Type"
body="return org.fortiss.af3.expression.model.types.TDouble.class;"/>
<genOperations ecoreOperation="platform.ecore#//annotation/FloatSize/getValueOf"
body="return FloatSizeStaticImpl.getValueOf(this, type);">
<genParameters ecoreParameter="platform.ecore#//annotation/FloatSize/getValueOf/type"/>
</genOperations>
</genClasses>
</nestedGenPackages>
<nestedGenPackages prefix="AF3Generic" basePackage="org.fortiss.af3.platform.model"
disposableProviderFactory="true" ecorePackage="platform.ecore#//generic">
......
......@@ -185,6 +185,24 @@
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.RamSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.ExecutionUnit"/>
</annotation>
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.BooleanSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.ExecutionUnit"/>
</annotation>
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.BooleanSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.PlatformArchitecture"/>
</annotation>
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.IntegerSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.ExecutionUnit"/>
</annotation>
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.IntegerSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.PlatformArchitecture"/>
</annotation>
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.FloatSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.ExecutionUnit"/>
</annotation>
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.FloatSizeValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.platform.model.PlatformArchitecture"/>
</annotation>
<!-- Generic Platform -->
<annotation binding="org.fortiss.af3.platform.annotation.valueprovider.PowerConsumptionValueProvider">
......
ArchitectureDomainLabelValueProvider.java 160f770988e9faaa006febb8b959110f23e1bab2 GREEN
BooleanSizeValueProvider.java 70cd0cd98be962052f32b187d6fd88da6d0afaeb GREEN