Skip to content
Snippets Groups Projects
Commit d126b869 authored by Mayank Chaudhary's avatar Mayank Chaudhary
Browse files

Model element factory created

refs 2507
parent c735f556
No related branches found
No related tags found
No related merge requests found
......@@ -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
/*--------------------------------------------------------------------------+
$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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment