Commit 351a5120 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

added operator panel example

refs 896
parent c876ab39
......@@ -182,6 +182,12 @@
id="org.fortiss.af3.rcp.application.loadPacemakerExample"
name="LoadPacemakerExample">
</command>
<command
categoryId="org.eclipse.ui.category.file"
defaultHandler="org.fortiss.af3.rcp.application.handler.ApplicationCommandHandler$LoadOperatorPanelExampleCommandHandler"
id="org.fortiss.af3.rcp.application.loadOperatorPanelExample"
name="LoadOperatorPanelExample">
</command>
</extension>
<extension
point="org.eclipse.help.toc">
......
......@@ -45,7 +45,7 @@ import org.eclipse.ui.internal.registry.IActionSetDescriptor;
* @author ratiu
* @author $Author: ratiu $
* @version $Rev: 2691 $
* @ConQAT.Rating GREEN Hash: D855BDC280614F72E7E18D9E810A5BBD
* @ConQAT.Rating YELLOW Hash: B0B40457F8341617A83E582F6499BAE3
*/
@SuppressWarnings("restriction")
public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
......@@ -146,6 +146,9 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
/** AF3-Specific Action to open the Pacemaker-Example. */
private static WorkbenchCommandAction openPacemakerExampleAction;
/** AF3-Specific Action to open the Pacemaker-Example. */
private static WorkbenchCommandAction openOperatorPanelExampleAction;
/** Class used to define an command action. */
private static class WorkbenchCommandAction extends CommandAction implements IWorkbenchAction {
......@@ -348,6 +351,19 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
register(openPacemakerExampleAction);
}
// Load Operator Example.
{
actionText = "Load Operator Panel Example";
openOperatorPanelExampleAction =
new WorkbenchCommandAction(
"org.fortiss.af3.rcp.application.loadOperatorPanelExample", window);
openOperatorPanelExampleAction.setText(actionText);
openOperatorPanelExampleAction.setToolTipText(actionText);
openOperatorPanelExampleAction.setDescription(actionText);
openOperatorPanelExampleAction.setId(actionText.replaceAll(" ", ""));
register(openOperatorPanelExampleAction);
}
// Import an AF3-Project.
{
actionText = "Import AF3-Project";
......@@ -535,6 +551,7 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
openAF3ExampleMenuManager.add(openECarExampleAction);
openAF3ExampleMenuManager.add(openEmergencyStopExampleAction);
openAF3ExampleMenuManager.add(openPacemakerExampleAction);
openAF3ExampleMenuManager.add(openOperatorPanelExampleAction);
fileMenu.add(new Separator());
fileMenu.add(refreshWorkspaceAction);
fileMenu.add(saveAction);
......
......@@ -63,7 +63,7 @@ import org.fortiss.tooling.kernel.utils.EMFResourceUtils;
* @author wandinger
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: E5841A072EF826A843C49C4187D12C8A
* @ConQAT.Rating YELLOW Hash: EBADB106F3B0A387C3A36DBF46D54FD8
*/
public class ApplicationCommandHandler {
......@@ -385,6 +385,23 @@ public class ApplicationCommandHandler {
}
}
/**
* Handles the command action to create the Operator-Panel-Example project.
*/
public static final class LoadOperatorPanelExampleCommandHandler extends AbstractHandler {
/**
* Execute definition that creates the Pacemaker-Example project and, if
* required, a new general project directory.
*/
@Override
public Object execute(ExecutionEvent event) {
loadExistingModel(AF3ApplicationActivator.PLUGIN_ID,
"test-data/operator_panel_tutorial.af3_20", "OperatorPanel");
return null;
}
}
/**
* Handles the command action to import an existing AF3-Project.
*/
......
<?xml version="1.0" encoding="UTF-8"?>
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-operatorpanel="http://www.fortiss.org/af3/operatorpanel" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-project-development="http://www.fortiss.org/af3/project/development" xmlns:org-fortiss-af3-project-execution="http://www.fortiss.org/af3/project/execution" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" name="Operator Panel Tutorial">
<rootElements xsi:type="org-fortiss-af3-project:ProjectConfiguration" id="1">
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" id="3">
<development xsi:type="org-fortiss-af3-project-development:DummyDevelopmentProcess"/>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-expression:DataDictionary" id="4"/>
<rootElements xsi:type="org-fortiss-af3-component:ComponentArchitecture" id="5" name="Component Architecture">
<containedElements xsi:type="org-fortiss-af3-component:Component" id="6" name="Component Architecture Root" comment="">
<containedElements xsi:type="org-fortiss-af3-component:Component" id="7" name="AreaInputs" comment="">
<specifications xsi:type="org-fortiss-af3-component:CausalityComponentSpecification" stronglyCausal="true"/>
<specifications xsi:type="org-fortiss-af3-operatorpanel:OperatorPanelSpecification" id="8" name="Operator Panel">
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="27" name="Label" comment="2-dimensional boolean input">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="265" height="25"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPAreaInput" id="28" name="Area Input">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="48" y="36"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="157" height="157"/>
<output>
<variable identifier="boolX"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_X"/>
</output>
<output>
<variable identifier="boolY"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_Y"/>
</output>
<type xsi:type="org-fortiss-af3-expression-types:TBool"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="29" name="Label" comment="2-dimensional int input">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" y="204"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="265" height="25"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPAreaInput" id="30" name="Area Input">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="48" y="240"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="157" height="157"/>
<output>
<variable identifier="intX"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_X"/>
</output>
<output>
<variable identifier="intY"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_Y"/>
</output>
<type xsi:type="org-fortiss-af3-expression-types:TInt"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPLabel" id="31" name="Label" comment="2-dimensional double input">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" y="408"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="265" height="25"/>
</containedElements>
<containedElements xsi:type="org-fortiss-af3-operatorpanel:OPAreaInput" id="32" name="Area Input">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="48" y="444"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="157" height="157"/>
<output>
<variable identifier="doubleX"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_X"/>
</output>
<output>
<variable identifier="doubleY"/>
<value xsi:type="org-fortiss-af3-expression-terms:Var" identifier="_this_Y"/>
</output>
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
</containedElements>
</specifications>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="9" name="boolX" comment="" outgoing="//@rootElements.2/@containedElements.0/@connections.0">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TBool"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:OffsetOrientation" key="coffsetorient" offset="24" orientation="EAST"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="12" name="boolY" comment="" outgoing="//@rootElements.2/@containedElements.0/@connections.1">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TBool"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:OffsetOrientation" key="coffsetorient" offset="60" orientation="EAST"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="15" name="intX" comment="" outgoing="//@rootElements.2/@containedElements.0/@connections.2">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TInt"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:OffsetOrientation" key="coffsetorient" offset="96" orientation="EAST"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="18" name="doubleX" comment="" outgoing="//@rootElements.2/@containedElements.0/@connections.4">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:OffsetOrientation" key="coffsetorient" offset="168" orientation="EAST"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="19" name="intY" comment="" outgoing="//@rootElements.2/@containedElements.0/@connections.3">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TInt"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:OffsetOrientation" key="coffsetorient" offset="132" orientation="EAST"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="24" name="doubleY" comment="" outgoing="//@rootElements.2/@containedElements.0/@connections.5">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:OffsetOrientation" key="coffsetorient" offset="204" orientation="EAST"/>
</connectors>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="12" y="12"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="193" height="253"/>
</containedElements>
<specifications xsi:type="org-fortiss-af3-component:CausalityComponentSpecification"/>
<connections xsi:type="org-fortiss-af3-component:Channel" id="11" name="boolX" comment="" source="//@rootElements.2/@containedElements.0/@containedElements.0/@connectors.0" target="//@rootElements.2/@containedElements.0/@connectors.0">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points"/>
</connections>
<connections xsi:type="org-fortiss-af3-component:Channel" id="14" name="boolY" comment="" source="//@rootElements.2/@containedElements.0/@containedElements.0/@connectors.1" target="//@rootElements.2/@containedElements.0/@connectors.1">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points"/>
</connections>
<connections xsi:type="org-fortiss-af3-component:Channel" id="17" name="intX" comment="" source="//@rootElements.2/@containedElements.0/@containedElements.0/@connectors.2" target="//@rootElements.2/@containedElements.0/@connectors.2">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points"/>
</connections>
<connections xsi:type="org-fortiss-af3-component:Channel" id="21" name="intY" comment="" source="//@rootElements.2/@containedElements.0/@containedElements.0/@connectors.4" target="//@rootElements.2/@containedElements.0/@connectors.3">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points"/>
</connections>
<connections xsi:type="org-fortiss-af3-component:Channel" id="23" name="doubleX" comment="" source="//@rootElements.2/@containedElements.0/@containedElements.0/@connectors.3" target="//@rootElements.2/@containedElements.0/@connectors.4">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points"/>
</connections>
<connections xsi:type="org-fortiss-af3-component:Channel" id="26" name="doubleY" comment="" source="//@rootElements.2/@containedElements.0/@containedElements.0/@connectors.5" target="//@rootElements.2/@containedElements.0/@connectors.5">
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points"/>
</connections>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="10" name="boolX" comment="" incoming="//@rootElements.2/@containedElements.0/@connections.0">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TBool"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="360" y="36"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="13" name="boolY" comment="" incoming="//@rootElements.2/@containedElements.0/@connections.1">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TBool"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="360" y="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="16" name="intX" comment="" incoming="//@rootElements.2/@containedElements.0/@connections.2">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TInt"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="360" y="108"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="20" name="intY" comment="" incoming="//@rootElements.2/@containedElements.0/@connections.3">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TInt"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="360" y="144"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="22" name="doubleX" comment="" incoming="//@rootElements.2/@containedElements.0/@connections.4">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="360" y="180"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
</connectors>
<connectors xsi:type="org-fortiss-af3-component:OutputPort" id="25" name="doubleY" comment="" incoming="//@rootElements.2/@containedElements.0/@connections.5">
<specifications xsi:type="org-fortiss-af3-component:PortSpecification">
<type xsi:type="org-fortiss-af3-expression-types:TDouble"/>
<initialValue xsi:type="org-fortiss-af3-expression-terms:DefinedConst" value="NoVal"/>
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos" x="360" y="216"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="cpos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="cdim" width="0" height="0"/>
</connectors>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Dimension" key="dim" width="108" height="72"/>
</containedElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-project-execution:ExecutionConfigurationStore" id="33">
<configurations id="34" name="Execonf" comment="" idReference="5"/>
</rootElements>
</org-fortiss-af3-project:FileProject>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment