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 7bbca4b861a33713496145dc6534f69df344633e..bd0c349249c211d80b9d5208799749f7309d802e 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF +++ b/org.fortiss.af3.platform.raspberry/trunk/META-INF/MANIFEST.MF @@ -18,5 +18,9 @@ Require-Bundle: org.fortiss.af3.project, org.fortiss.tooling.base;visibility:=reexport, org.fortiss.af3.expression, org.eclipse.jface;bundle-version="3.9.1" +Export-Package: org.fortiss.af3.platform.raspberry.compositor, + org.fortiss.af3.platform.raspberry.model, + org.fortiss.af3.platform.raspberry.utils Import-Package: org.fortiss.af3.deployment.generator, org.fortiss.af3.platform.model + diff --git a/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryModelElementFactory.java b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryModelElementFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..51ec9f238d030ef22659be268d640df8488a118d --- /dev/null +++ b/org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/utils/RaspberryModelElementFactory.java @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2016 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.utils; + +import org.fortiss.af3.platform.raspberry.model.BusMasterInterface; +import org.fortiss.af3.platform.raspberry.model.BusMasterPort; +import org.fortiss.af3.platform.raspberry.model.CANBusMasterInterface; +import org.fortiss.af3.platform.raspberry.model.CANBusMasterPort; +import org.fortiss.af3.platform.raspberry.model.ModelFactory; +import org.fortiss.tooling.base.utils.LayoutModelElementFactory; + +/** + * + * @author chaudhary + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating RED Hash: + */ +public class RaspberryModelElementFactory { + + public static CANBusMasterPort createCANBusMasterPort(String name) { + CANBusMasterPort canBusMasterPort = ModelFactory.eINSTANCE.createCANBusMasterPort(); + canBusMasterPort.setName(name); + LayoutModelElementFactory.createConnectorLayout(canBusMasterPort); + return canBusMasterPort; + } + + public static CANBusMasterInterface createCANBusMasterInterface(String name) { + CANBusMasterInterface canBusMasterInterface = + ModelFactory.eINSTANCE.createCANBusMasterInterface(); + canBusMasterInterface.setName(name); + LayoutModelElementFactory.createConnectorLayout(canBusMasterInterface); + return canBusMasterInterface; + } + + public static BusMasterPort createBusMasterPort(String name) { + BusMasterPort busMasterPort = ModelFactory.eINSTANCE.createBusMasterPort(); + busMasterPort.setName(name); + LayoutModelElementFactory.createConnectorLayout(busMasterPort); + return busMasterPort; + } + + public static BusMasterInterface createBusMasterInterface(String name) { + BusMasterInterface busMasterInterface = ModelFactory.eINSTANCE.createBusMasterInterface(); + busMasterInterface.setName(name); + LayoutModelElementFactory.createConnectorLayout(busMasterInterface); + return busMasterInterface; + } + +}