diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF b/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF index 9736b3ff68b53913d31a1463f1a8a85ca58d96b9..f68305a2aeb4a5efeafbfb0e3b0a87fb57c5ef99 100644 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF +++ b/org.fortiss.af3.platform.raspberry.ui/trunk/META-INF/MANIFEST.MF @@ -7,7 +7,8 @@ Bundle-Activator: org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIAc Require-Bundle: org.eclipse.ui.ide;bundle-version="3.7.0";visibility:=reexport, org.fortiss.af3.project.ui;bundle-version="1.0.0";visibility:=reexport, org.fortiss.tooling.base.ui;bundle-version="1.0.0";visibility:=reexport, - org.fortiss.af3.platform.ui + org.fortiss.af3.platform.ui, + org.fortiss.af3.platform.raspberry;bundle-version="2.9.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: fortiss GmbH @@ -16,6 +17,4 @@ Import-Package: org.fortiss.af3.platform.compose, org.fortiss.af3.platform.compose.base.hierarchical, org.fortiss.af3.platform.compose.base.hierarchical.elements, org.fortiss.af3.platform.model, - org.fortiss.af3.platform.raspberry.model, - org.fortiss.af3.platform.ui.editor, org.fortiss.af3.platform.utils diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/plugin.xml b/org.fortiss.af3.platform.raspberry.ui/trunk/plugin.xml index cb6d00740e9570d21e60d292bf398b88ad0fbb58..f06adbb2bb3f2f4de108790f8f7eee26f428c9d6 100644 --- a/org.fortiss.af3.platform.raspberry.ui/trunk/plugin.xml +++ b/org.fortiss.af3.platform.raspberry.ui/trunk/plugin.xml @@ -11,74 +11,22 @@ <extension point="org.fortiss.tooling.kernel.modelPrototypeProvider"> <modelPrototypeProvider - provider="org.fortiss.af3.platform.raspberry.ui.prototypes.PrototypeProvider"> + provider="org.fortiss.af3.platform.raspberry.ui.prototype.ProtoypeProvider"> </modelPrototypeProvider> </extension> - <extension - point="org.fortiss.tooling.kernel.modelElementCompositor"> - <modelElementCompositor - compositor="org.fortiss.af3.platform.raspberry.ui.compose.elements.RaspberryPi3Compositor"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi3"> - </modelElementClass> - </modelElementCompositor> - <modelElementCompositor - compositor="org.fortiss.af3.platform.raspberry.ui.compose.elements.CANBusCompositor"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CANBus"> - </modelElementClass> - </modelElementCompositor> - <modelElementCompositor - compositor="org.fortiss.af3.platform.raspberry.ui.compose.RaspberryPlatformArchitectureCompositor"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.model.PlatformArchitecture"> - </modelElementClass> - </modelElementCompositor> - </extension> - <extension - point="org.fortiss.tooling.kernel.modelConnectionCompositor"> - <modelConnectionCompositor - modelConnectionCompositor="org.fortiss.af3.platform.raspberry.ui.compose.connections.RaspberryPi3ToCANBusConnectionCompositor"> - <source> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi3"> - </modelElementClass> - </source> - <target> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CANBus"> - </modelElementClass> - </target> - </modelConnectionCompositor> - </extension> - <extension - point="org.fortiss.tooling.kernel.ui.modelEditorBinding"> - <modelEditorBinding - binding="org.fortiss.af3.platform.raspberry.ui.editor.binding.CoreStructureEditorBinding"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.Core"> - </modelElementClass> - </modelEditorBinding> - <modelEditorBinding - binding="org.fortiss.af3.platform.raspberry.ui.editor.binding.RaspberryPi3StructureEditorBinding"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi3"> - </modelElementClass> - </modelEditorBinding> - </extension> - <extension - point="org.fortiss.tooling.kernel.ui.modelElementHandler"> - <modelElementHandler - handler="org.fortiss.af3.platform.raspberry.ui.handler.RaspberryPI3Handler"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi3"> - </modelElementClass> - </modelElementHandler> - <modelElementHandler - handler="org.fortiss.af3.platform.raspberry.ui.handler.CANBusHandler"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.CANBus"> - </modelElementClass> - </modelElementHandler> - </extension> +<extension + point="org.fortiss.tooling.kernel.ui.modelElementHandler"> + <modelElementHandler + handler="org.fortiss.af3.platform.raspberry.ui.handler.RaspberryPiHandler"> + <modelElementClass + modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi"> + </modelElementClass> + </modelElementHandler> + <modelElementHandler + handler="org.fortiss.af3.platform.raspberry.ui.handler.CanBusHandler"> + <modelElementClass + modelElementClass="org.fortiss.af3.platform.raspberry.model.CanBus"> + </modelElementClass> + </modelElementHandler> +</extension> </plugin> diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/CanBusHandler.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/CanBusHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..a2f04af3dbdd43bc603c0b11a7755933badccf16 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/CanBusHandler.java @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 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.raspberry.ui.handler; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.fortiss.af3.platform.raspberry.model.CanBus; +import org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator; +import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase; + +/** + * {@link ModelElementHandlerBase} for {@link CanBus}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class CanBusHandler extends ModelElementHandlerBase<CanBus> { + + /** {@inheritDoc} */ + @Override + public String getName(CanBus element) { + String name = element.getName(); + return name != null ? name : "CanBus"; + } + + /** {@inheritDoc} */ + @Override + public ImageDescriptor getIconImageDescriptor() { + return AF3PlatformRaspberryUIActivator.getImageDescriptor("icons/can-logo.jpeg"); + } + +} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPiHandler.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPiHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..1c6fe05bba31d8ada6b53780e824377f5ba08296 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/handler/RaspberryPiHandler.java @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 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.raspberry.ui.handler; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.fortiss.af3.platform.raspberry.model.RaspberryPi; +import org.fortiss.af3.platform.raspberry.ui.AF3PlatformRaspberryUIActivator; +import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase; + +/** + * {@link ModelElementHandlerBase} for {@link RaspberryPi}. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class RaspberryPiHandler extends ModelElementHandlerBase<RaspberryPi> { + + /** {@inheritDoc} */ + @Override + public String getName(RaspberryPi element) { + final String name = element.getName(); + return name != null ? name : "RaspberryPi"; + } + + /** {@inheritDoc} */ + @Override + public ImageDescriptor getIconImageDescriptor() { + return AF3PlatformRaspberryUIActivator.getImageDescriptor("icons/raspberry-pi-logo.png"); + } + +} diff --git a/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/prototype/ProtoypeProvider.java b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/prototype/ProtoypeProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..06c079bec4ed02fd75510022dfec3dfdb52c9979 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry.ui/trunk/src/org/fortiss/af3/platform/raspberry/ui/prototype/ProtoypeProvider.java @@ -0,0 +1,46 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 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.raspberry.ui.prototype; + +import org.fortiss.af3.platform.raspberry.model.CanBus; +import org.fortiss.af3.platform.raspberry.model.RaspberryPi; +import org.fortiss.af3.platform.raspberry.util.RaspberryModelElementFactory; +import org.fortiss.tooling.kernel.extension.base.PrototypeProviderBase; + +/** + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class ProtoypeProvider extends PrototypeProviderBase { + + /** Stores the category to display for these prototypes. */ + protected final static String CATEGORY_NAME = "RaspberryPI Platform"; + + /** {@inheritDoc} */ + @Override + protected void registerPrototypes() { + RaspberryPi pi = RaspberryModelElementFactory.createRaspberryPi(); + registerPrimaryPrototype("RaspberryPi", pi, CATEGORY_NAME); + + CanBus bus = RaspberryModelElementFactory.createCanBus(); + registerPrototype("CanBus", bus, CATEGORY_NAME); + } +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF b/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF index 6e9c4d69289062a4fc87964c94f5cb72e81499c6..1a01d6f3b4833c9ea3620c672e3f65315b01eaa3 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF +++ b/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF @@ -7,17 +7,19 @@ Bundle-ClassPath: . Bundle-Vendor: fortiss GmbH Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.fortiss.af3.platform.raspberry.model, + org.fortiss.af3.platform.raspberry.model.impl, + org.fortiss.af3.platform.raspberry.model.util, + org.fortiss.af3.platform.raspberry.util Bundle-ActivationPolicy: lazy Bundle-Activator: org.fortiss.af3.platform.raspberry.AF3PlatformRaspberryActivator Require-Bundle: org.fortiss.af3.project, org.fortiss.tooling.kernel;visibility:=reexport, - org.fortiss.af3.platform;bundle-version="2.5.0";visibility:=reexport -Export-Package: org.fortiss.af3.platform.raspberry.model, - org.fortiss.af3.platform.raspberry.model.annotation, - org.fortiss.af3.platform.raspberry.model.annotation.impl, - org.fortiss.af3.platform.raspberry.model.annotation.util, - org.fortiss.af3.platform.raspberry.model.impl, - org.fortiss.af3.platform.raspberry.model.util + org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.fortiss.tooling.base;visibility:=reexport, + org.fortiss.af3.platform;bundle-version="2.5.0";visibility:=reexport, + org.fortiss.tooling.base.ui;bundle-version="2.11.0" Import-Package: org.fortiss.af3.deployment.generator, org.fortiss.af3.platform.model diff --git a/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.ecore b/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.ecore index 66c2f48fd4f8b017135703cee5b48c7abe242f1a..92d3da59a4daf5678bea21be5c742aaf0540b45e 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.ecore +++ b/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.ecore @@ -2,42 +2,6 @@ <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http://www.fortiss.org/af3/platform/raspberry" nsPrefix="org-fortiss-af3-platform-raspberry"> - <eClassifiers xsi:type="ecore:EClass" name="CANBus" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//TransmissionUnit platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IBoardPlatformArchitectureElement #//IBoardDomain"/> - <eClassifiers xsi:type="ecore:EClass" name="IProcessorDomain" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IArchitectureDomain"> - <eOperations name="getArchitectureDomainName" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Returns the architecture domain's name."/> - <details key="body" value="return "Processor";"/> - </eAnnotations> - </eOperations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="IBoardDomain" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IArchitectureDomain"> - <eOperations name="getArchitectureDomainName" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Returns the architecture domain's name."/> - <details key="body" value="return "Board";"/> - </eAnnotations> - </eOperations> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="RaspberryPi3" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//GenericPlatformUnit platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IBoardPlatformArchitectureElement #//IBoardDomain platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ExecutionUnit"/> - <eClassifiers xsi:type="ecore:EClass" name="Sensor" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Receiver platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IBoardPlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IBoardDomain platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformPort platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformIOResource"/> - <eClassifiers xsi:type="ecore:EClass" name="Actuator" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Transmitter platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IBoardPlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IBoardDomain platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformPort platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformIOResource"/> - <eClassifiers xsi:type="ecore:EClass" name="SensorIn" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Receiver platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IIpCorePlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IProcessorDomain platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformPort platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformIOResource"/> - <eClassifiers xsi:type="ecore:EClass" name="ActuatorOut" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Transmitter platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IIpCorePlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IProcessorDomain platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformPort platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformIOResource"/> - <eClassifiers xsi:type="ecore:EClass" name="BusMasterInterface" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Transceiver platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IIpCorePlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformInterface platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IProcessorDomain"/> - <eClassifiers xsi:type="ecore:EClass" name="BusMasterPort" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Transceiver platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IIpCorePlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformPort platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IProcessorDomain"/> - <eClassifiers xsi:type="ecore:EClass" name="CANBusMasterPort" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Transceiver platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IBoardPlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformPort platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IBoardDomain"/> - <eClassifiers xsi:type="ecore:EClass" name="CANBusMasterInterface" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//Transceiver platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IBoardPlatformArchitectureElement platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformInterface platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ICommunicationMaster #//IBoardDomain"/> - <eSubpackages name="annotation" nsURI="http://www.fortiss.org/af3/platform/raspberry/annotation" - nsPrefix="org-fortiss-af3-platform-raspberry-annotation"> - <eClassifiers xsi:type="ecore:EClass" name="CoreAddress" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IAnnotatedSpecification platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHiddenSpecification"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="coreAddress" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="PinNumber" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IAnnotatedSpecification platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHiddenSpecification"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="pinNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="PeripheralAddress" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IAnnotatedSpecification platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHiddenSpecification"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="peripheralAddress" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - </eClassifiers> - </eSubpackages> + <eClassifiers xsi:type="ecore:EClass" name="RaspberryPi" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//ExecutionUnit"/> + <eClassifiers xsi:type="ecore:EClass" name="CanBus" eSuperTypes="platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//TransmissionUnit"/> </ecore:EPackage> diff --git a/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.genmodel b/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.genmodel index dc24d886c6402aac7b6a608dded57a2ff5675219..a575b391614f7c9d518914ce602ddf9a729f4bdd 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.genmodel +++ b/org.fortiss.af3.platform.raspberry/trunk/model/raspberry.genmodel @@ -1,39 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" - xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.fortiss.af3.platform.raspberry/generated-src" +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" + modelDirectory="/org.fortiss.af3.platform.raspberry/generated-src" modelPluginID="org.fortiss.af3.platform.raspberry" modelName="Raspberry" importerID="org.eclipse.emf.importer.ecore" containmentProxies="true" arrayAccessors="true" complianceLevel="7.0" copyrightFields="false" - usedGenPackages="platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model"> + usedGenPackages="../../org.fortiss.tooling.base/model/base.genmodel#//model ../../org.fortiss.af3.platform/model/platform.genmodel#//model ../../org.fortiss.tooling.kernel/model/kernel.genmodel#//model"> <foreignModel>raspberry.ecore</foreignModel> <genPackages prefix="Model" basePackage="org.fortiss.af3.platform.raspberry" disposableProviderFactory="true" ecorePackage="raspberry.ecore#/"> - <genClasses ecoreClass="raspberry.ecore#//CANBus"/> - <genClasses ecoreClass="raspberry.ecore#//IProcessorDomain"> - <genOperations ecoreOperation="raspberry.ecore#//IProcessorDomain/getArchitectureDomainName"/> - </genClasses> - <genClasses ecoreClass="raspberry.ecore#//IBoardDomain"> - <genOperations ecoreOperation="raspberry.ecore#//IBoardDomain/getArchitectureDomainName"/> - </genClasses> - <genClasses ecoreClass="raspberry.ecore#//RaspberryPi3"/> - <genClasses ecoreClass="raspberry.ecore#//Sensor"/> - <genClasses ecoreClass="raspberry.ecore#//Actuator"/> - <genClasses ecoreClass="raspberry.ecore#//SensorIn"/> - <genClasses ecoreClass="raspberry.ecore#//ActuatorOut"/> - <genClasses ecoreClass="raspberry.ecore#//BusMasterInterface"/> - <genClasses ecoreClass="raspberry.ecore#//BusMasterPort"/> - <genClasses ecoreClass="raspberry.ecore#//CANBusMasterPort"/> - <genClasses ecoreClass="raspberry.ecore#//CANBusMasterInterface"/> - <nestedGenPackages prefix="Annotation" basePackage="org.fortiss.af3.platform.raspberry.model" - disposableProviderFactory="true" ecorePackage="raspberry.ecore#//annotation"> - <genClasses ecoreClass="raspberry.ecore#//annotation/CoreAddress"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute raspberry.ecore#//annotation/CoreAddress/coreAddress"/> - </genClasses> - <genClasses ecoreClass="raspberry.ecore#//annotation/PinNumber"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute raspberry.ecore#//annotation/PinNumber/pinNumber"/> - </genClasses> - <genClasses ecoreClass="raspberry.ecore#//annotation/PeripheralAddress"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute raspberry.ecore#//annotation/PeripheralAddress/peripheralAddress"/> - </genClasses> - </nestedGenPackages> + <genClasses ecoreClass="raspberry.ecore#//RaspberryPi"/> + <genClasses ecoreClass="raspberry.ecore#//CanBus"/> </genPackages> </genmodel:GenModel> diff --git a/org.fortiss.af3.platform.raspberry/trunk/plugin.xml b/org.fortiss.af3.platform.raspberry/trunk/plugin.xml index ac16f745165febdb3f96b1b59b4bd0a0e30e3013..57f73114b144ae7dd06883e3c894126bbd980486 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/plugin.xml +++ b/org.fortiss.af3.platform.raspberry/trunk/plugin.xml @@ -17,326 +17,23 @@ class="org.fortiss.af3.platform.raspberry.model.ModelPackage" genModel="model/raspberry.genmodel"/> </extension> - - <extension point="org.eclipse.emf.ecore.generated_package"> - <!-- @generated raspberry --> - <package - uri="http://www.fortiss.org/af3/platform/raspberry/annotation" - class="org.fortiss.af3.platform.raspberry.model.annotation.AnnotationPackage" - genModel="model/raspberry.genmodel"/> - </extension> - - <extension - point="org.fortiss.tooling.kernel.transformationProvider"> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.RaspberryPi3ExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi3"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.RaspberryPi3Executable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.BusExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.Bus"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.BusExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.BusMasterInterfaceExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.BusMasterInterface"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.BusMasterInterfaceExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.BusMasterPortExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.BusMasterPort"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.BusMasterPortExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CANBusExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CANBus"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CANBusExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CANBusMasterInterfaceExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CANBusMasterInterfaceExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CANBusMasterPortExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CANBusMasterPort"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.CANBusMasterPortExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.SensorExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.Sensor"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.SensorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.SensorInExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.SensorIn"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.SensorInExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.ActuatorExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.Actuator"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.ActuatorExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.ActuatorOutExecutableTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.ActuatorOut"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.generator.executable.ActuatorOutExecutable"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.ActuatorExecutableTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.Actuator"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.ActuatorOutExecutableTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.ActuatorOut"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.BusMasterInterfaceTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.BusMasterInterface"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider><transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.BusMasterPortTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.BusMasterPort"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.BusTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.Bus"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CANBusTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CANBus"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CANBusMasterInterfaceTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.CANBusMasterPortTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.CANBusMasterPort"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.SensorExecutableTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.Sensor"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - <transformationProvider - transformationProvider="org.fortiss.af3.platform.raspberry.generator.transform.SensorInExecutableTransmissionCatalogTransformation"> - <source> - <objectClass - objectClass="org.fortiss.af3.platform.raspberry.model.SensorIn"> - </objectClass> - </source> - <target> - <objectClass - objectClass="org.fortiss.af3.deployment.generator.TransmissionCatalog"> - </objectClass> - </target> - </transformationProvider> - </extension> <extension - point="org.fortiss.tooling.base.annotation"> - <annotation - binding="org.fortiss.af3.platform.raspberry.annotation.valueprovider.PinNumberValueProvider"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.Sensor"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.Actuator"> - </modelElementClass> + point="org.fortiss.tooling.kernel.modelElementCompositor"> + <modelElementCompositor + compositor="org.fortiss.af3.platform.raspberry.compose.RaspberryPiCompositor.java"> <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.SensorIn"> + modelElementClass="org.fortiss.af3.platform.raspberry.model.RaspberryPi"> </modelElementClass> + </modelElementCompositor> + <modelElementCompositor + compositor="org.fortiss.af3.platform.raspberry.compose.CanBusCompositor"> <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.ActuatorOut"> + modelElementClass="org.fortiss.af3.platform.raspberry.model.CanBus"> </modelElementClass> - </annotation> + </modelElementCompositor> </extension> + + - <extension - point="org.fortiss.tooling.base.annotation"> - <annotation - binding="org.fortiss.af3.platform.raspberry.annotation.valueprovider.PeripheralAddressValueProvider"> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.Sensor"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.Actuator"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.SensorIn"> - </modelElementClass> - <modelElementClass - modelElementClass="org.fortiss.af3.platform.raspberry.model.ActuatorOut"> - </modelElementClass> - </annotation> - </extension> </plugin> diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compose/CanBusCompositor.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compose/CanBusCompositor.java new file mode 100644 index 0000000000000000000000000000000000000000..30771359911aca6b3a68720a25ec9c536682c967 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compose/CanBusCompositor.java @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 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.raspberry.compose; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.af3.platform.compose.PlatformArchitectureElementCompositorBase; +import org.fortiss.af3.platform.model.IPlatformArchitectureElement; + +/** + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class CanBusCompositor extends + PlatformArchitectureElementCompositorBase<IPlatformArchitectureElement> { + + /** {@inheritDoc} */ + @Override + protected boolean isCorrectElementClass(IPlatformArchitectureElement container, + EObject contained) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compose/RaspberryPiCompositor.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compose/RaspberryPiCompositor.java new file mode 100644 index 0000000000000000000000000000000000000000..083f65b92d02b81aefed69a67bec1d94415a471d --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/compose/RaspberryPiCompositor.java @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 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.raspberry.compose; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.af3.platform.compose.PlatformArchitectureElementCompositorBase; +import org.fortiss.af3.platform.model.IPlatformArchitectureElement; + +/** + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class RaspberryPiCompositor extends + PlatformArchitectureElementCompositorBase<IPlatformArchitectureElement> { + + /** {@inheritDoc} */ + @Override + protected boolean isCorrectElementClass(IPlatformArchitectureElement container, + EObject contained) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..8f2b4fb0f0828f322e5b63185e2a7821f21a4e92 --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2017 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.raspberry.util; + +import org.fortiss.af3.platform.raspberry.model.CanBus; +import org.fortiss.af3.platform.raspberry.model.ModelFactory; +import org.fortiss.af3.platform.raspberry.model.RaspberryPi; + +/** + * Model Element for RaspberryPi and related models. + * + * @author eder + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class RaspberryModelElementFactory { + + /** Creates a RaspberryPi. */ + public static RaspberryPi createRaspberryPi() { + final RaspberryPi pi = ModelFactory.eINSTANCE.createRaspberryPi(); + pi.setName("RaspberryPI"); + return pi; + } + + /** Creates a CanBus. */ + public static CanBus createCanBus() { + final CanBus bus = ModelFactory.eINSTANCE.createCanBus(); + bus.setName("CanBus"); + return bus; + } +}