Skip to content
Snippets Groups Projects
Commit 9c37d791 authored by Markus Hamann's avatar Markus Hamann
Browse files

Add first version of the pipeline

parent e87dab8b
No related branches found
No related tags found
No related merge requests found
Showing
with 1684 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>examples-graphical</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.sirius.nature.modelingproject</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<statemachine:StateMachine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:statemachine="http://www.swt.org/most/statemachine" name="Garage Door">
<states name="Closed"/>
<states name="Open"/>
<states name="Opening"/>
<states name="Closing"/>
<finalstates name="final"/>
<initialstate name="initial"/>
<transitions from="//@initialstate" to="//@states.0"/>
<transitions from="//@states.0" to="//@states.2">
<trigger content="openDoor"/>
<action content="motor.upwards"/>
</transitions>
<transitions from="//@states.2" to="//@states.1">
<guard content="stopper"/>
<action content="motor.stop"/>
</transitions>
<transitions from="//@states.1" to="//@states.3">
<trigger content="closeDoor"/>
<action content="motor.downwards"/>
</transitions>
<transitions from="//@states.3" to="//@states.0">
<guard content="stopper"/>
<action content="motor.stop"/>
</transitions>
<transitions from="//@states.3" to="//@states.2">
<trigger content="openDoor"/>
<action content="motor.upwards"/>
</transitions>
<transitions from="//@states.2" to="//@states.3">
<trigger content="closeDoor"/>
<action content="motor.downwards"/>
</transitions>
<transitions from="//@states.0" to="//@finalstates.0">
<guard content="shutdown"/>
</transitions>
<transitions from="//@states.0" to="//@states.0">
<trigger content="closeDoor"/>
</transitions>
<transitions from="//@states.3" to="//@states.3">
<trigger content="closeDoor"/>
</transitions>
<transitions from="//@states.1" to="//@states.1">
<trigger content="openDoor"/>
</transitions>
<transitions from="//@states.2" to="//@states.2">
<trigger content="openDoor"/>
</transitions>
</statemachine:StateMachine>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<statemachine:StateMachine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:statemachine="http://www.swt.org/most/statemachine" name="Switch">
<states name="on">
<do_ content="do_something"/>
</states>
<states name="off">
<do_ content="do_nothing"/>
</states>
<initialstate name="initial"/>
<transitions from="initial" to="off"/>
<transitions from="off" to="on">
<trigger content="flip"/>
</transitions>
<transitions from="on" to="off">
<trigger content="flip"/>
</transitions>
</statemachine:StateMachine>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
/bin/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>swt.most.sirius.petrinet</name>
<comment></comment>
<projects></projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments></arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: swt.most.sirius.petrinet;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: swt.most.sirius.petrinet.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.sirius,
org.eclipse.sirius.common.acceleo.aql
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: %providerName
Automatic-Module-Name: swt.most.sirius.petrinet
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
description/,\
plugin.properties,\
plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" name="petrinet" version="12.0.0.2017041100">
<ownedViewpoints name="Viewer" modelFileExtension="petrinet">
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="Petrinet Viewer" domainClass="petrinet::PetriNet" enablePopupBars="true">
<metamodel href="http://www.example.org/petrinet#/"/>
<defaultLayer name="Default">
<nodeMappings name="Place" semanticCandidatesExpression="feature:elements" domainClass="petrinet::Place">
<borderedNodeMappings name="Token" semanticCandidatesExpression="feature:token" domainClass="petrinet::Token">
<style xsi:type="style:DotDescription" labelSize="12" showIcon="false" labelExpression="''" labelAlignment="LEFT" sizeComputationExpression="2" labelPosition="node">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<forbiddenSides>WEST</forbiddenSides>
<forbiddenSides>SOUTH</forbiddenSides>
<forbiddenSides>NORTH</forbiddenSides>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</borderedNodeMappings>
<style xsi:type="style:DotDescription" borderSizeComputationExpression="1" labelSize="12" showIcon="false" labelExpression="feature:identifier" strokeSizeComputationExpression="3">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_yellow']"/>
</style>
</nodeMappings>
<nodeMappings name="Transition" semanticCandidatesExpression="feature:elements" domainClass="petrinet::Transition">
<style xsi:type="style:SquareDescription" borderSizeComputationExpression="1" labelSize="12" showIcon="false" labelExpression="feature:identifier" width="2" height="6">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_orange']"/>
</style>
</nodeMappings>
<edgeMappings name="IncomingArc" sourceMapping="//@ownedViewpoints[name='Viewer']/@ownedRepresentations[name='Petrinet%20Viewer']/@defaultLayer/@nodeMappings[name='Place']" targetMapping="//@ownedViewpoints[name='Viewer']/@ownedRepresentations[name='Petrinet%20Viewer']/@defaultLayer/@nodeMappings[name='Transition']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="petrinet::IncomingArc" useDomainElement="true">
<style sizeComputationExpression="2" routingStyle="manhattan">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<centerLabelStyleDescription labelSize="12">
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<edgeMappings name="OutgoingArc" sourceMapping="//@ownedViewpoints[name='Viewer']/@ownedRepresentations[name='Petrinet%20Viewer']/@defaultLayer/@nodeMappings[name='Transition']" targetMapping="//@ownedViewpoints[name='Viewer']/@ownedRepresentations[name='Petrinet%20Viewer']/@defaultLayer/@nodeMappings[name='Place']" targetFinderExpression="feature:target" sourceFinderExpression="feature:source" domainClass="petrinet::OutgoingArc" useDomainElement="true">
<style sizeComputationExpression="2" routingStyle="manhattan">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<centerLabelStyleDescription labelSize="12">
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
</defaultLayer>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
</ownedRepresentations>
<ownedJavaExtensions qualifiedClassName="swt.most.sirius.petrinet.Services"/>
</ownedViewpoints>
</description:Group>
pluginName = swt.most.sirius.petrinet
providerName = Eclipse Modeling Project
viewpointName = MyViewpoint
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension point="org.eclipse.sirius.componentization">
<component class="swt.most.sirius.petrinet.Activator"
id="swt.most.sirius.petrinet"
name="petrinet">
</component>
</extension>
</plugin>
package swt.most.sirius.petrinet;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.sirius.business.api.componentization.ViewpointRegistry;
import org.eclipse.sirius.viewpoint.description.Viewpoint;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "swt.most.sirius.petrinet";
// The shared instance
private static Activator plugin;
private static Set<Viewpoint> viewpoints;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
viewpoints = new HashSet<Viewpoint>();
viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/petrinet.odesign"));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
if (viewpoints != null) {
for (final Viewpoint viewpoint: viewpoints) {
ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
}
viewpoints.clear();
viewpoints = null;
}
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
package swt.most.sirius.petrinet;
import org.eclipse.emf.ecore.EObject;
/**
* The services class used by VSM.
*/
public class Services {
/**
* See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.html&cp=24 for documentation on how to write service methods.
*/
public EObject myService(EObject self, String arg) {
// TODO Auto-generated code
return self;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
/bin/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>swt.most.sirius.statemachine</name>
<comment></comment>
<projects></projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments></arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding/<project>=UTF-8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: swt.most.sirius.statemachine;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: swt.most.sirius.statemachine.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.sirius,
org.eclipse.sirius.common.acceleo.aql
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: %providerName
Automatic-Module-Name: swt.most.sirius.statemachine
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment