Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sirius Project #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dart-designer-configuration/dart.design/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?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>
35 changes: 35 additions & 0 deletions dart-designer-configuration/dart.design/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dart.design</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>
<buildCommand>
<name>org.eclipse.acceleo.ide.ui.acceleoBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.acceleo.ide.ui.acceleoNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

13 changes: 13 additions & 0 deletions dart-designer-configuration/dart.design/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: dart.design
Bundle-SymbolicName: dart.design;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: dart.design.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.sirius,
org.eclipse.sirius.common.acceleo.mtl
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Binary file not shown.
7 changes: 7 additions & 0 deletions dart-designer-configuration/dart.design/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
description/,\
plugin.xml
customBuildCallbacks = build.acceleo
154 changes: 154 additions & 0 deletions dart-designer-configuration/dart.design/description/dart.odesign
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?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:filter="http://www.eclipse.org/sirius/diagram/description/filter/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http://www.eclipse.org/sirius/description/tool/1.1.0" xmlns:validation="http://www.eclipse.org/sirius/description/validation/1.1.0" name="dart" version="8.1.0">
<ownedViewpoints name="dart">
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="dart diagram" domainClass="dart.Project">
<filters xsi:type="filter:CompositeFilterDescription" name="filter"/>
<validationSet name="validationRule">
<ownedRules xsi:type="validation:SemanticValidationRule">
<audits auditExpression="[/]"/>
</ownedRules>
</validationSet>
<defaultLayer name="Default">
<nodeMappings name="PackageNode" domainClass="dart.Package">
<borderedNodeMappings semanticCandidatesExpression="feature:eAllContents"/>
<style xsi:type="style:SquareDescription" resizeKind="NSEW">
<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_gray']"/>
</style>
</nodeMappings>
<nodeMappings name="classNode" domainClass="dart.Class">
<style xsi:type="style:SquareDescription" resizeKind="NSEW">
<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='dark_blue']"/>
</style>
</nodeMappings>
<nodeMappings name="Function" domainClass="dart.Function">
<style xsi:type="style:SquareDescription" resizeKind="NSEW">
<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_green']"/>
</style>
</nodeMappings>
<nodeMappings name="Parameter" domainClass="dart.Parameter"/>
<nodeMappings name="Variable" domainClass="dart.Variable">
<style xsi:type="style:SquareDescription" resizeKind="NSEW">
<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_yellow']"/>
</style>
</nodeMappings>
<edgeMappings name="extends" sourceMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='classNode']" targetMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='classNode']" targetFinderExpression="[ extends/]">
<style sizeComputationExpression="2">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='purple']"/>
<centerLabelStyleDescription>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<edgeMappings name="packagesRelation" sourceMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='PackageNode']" targetMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='PackageNode']" targetFinderExpression="[dependencies/]">
<style sizeComputationExpression="2">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
<centerLabelStyleDescription>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<edgeMappings name="classesRelation" sourceMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='PackageNode']" targetMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='classNode']" targetFinderExpression="[assets/]">
<style sizeComputationExpression="2">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
<centerLabelStyleDescription>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<edgeMappings name="FunctionsRelation" sourceMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='classNode']" targetMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='Function']" targetFinderExpression="[methods/]">
<style sizeComputationExpression="2">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
<centerLabelStyleDescription>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<edgeMappings name="attributesRelation" sourceMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='classNode']" targetMapping="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='Variable']" targetFinderExpression="[fields/]">
<style sizeComputationExpression="2">
<strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
<centerLabelStyleDescription>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</centerLabelStyleDescription>
</style>
</edgeMappings>
<toolSections>
<ownedTools xsi:type="tool:NodeCreationDescription" name="createPackage" label="Package" nodeMappings="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='PackageNode']">
<variable name="container"/>
<viewVariable name="containerView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="dart.Package"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool:EdgeCreationDescription" name="association">
<sourceVariable name="source"/>
<targetVariable name="target"/>
<sourceViewVariable name="sourceView"/>
<targetViewVariable name="targetView"/>
<initialOperation/>
</ownedTools>
<ownedTools xsi:type="tool_1:ToolDescription" name="directTool">
<element name="element"/>
<elementView name="elementView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="dart.Package" referenceName="package"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool:NodeCreationDescription" name="createClass" label="Class" nodeMappings="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='classNode']">
<variable name="container"/>
<viewVariable name="containerView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="dart.Class"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool:NodeCreationDescription" name="createFunction" label="Function" nodeMappings="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='Function']">
<variable name="container"/>
<viewVariable name="containerView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="dart.Function"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
<ownedTools xsi:type="tool:NodeCreationDescription" name="createAttribute" label="Attribute" nodeMappings="//@ownedViewpoints[name='dart']/@ownedRepresentations[name='dart%20diagram']/@defaultLayer/@nodeMappings[name='Variable']">
<variable name="container"/>
<viewVariable name="containerView"/>
<initialOperation>
<firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
<subModelOperations xsi:type="tool_1:CreateInstance" typeName="dart.Variable"/>
</firstModelOperations>
</initialOperation>
</ownedTools>
</toolSections>
</defaultLayer>
<additionalLayers>
<nodeMappings/>
<nodeMappings/>
</additionalLayers>
</ownedRepresentations>
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="additional diagram" domainClass="dart.Project">
<defaultLayer name="Default">
<nodeMappings name="folderNode" domainClass="dart.Folder">
<style xsi:type="style:SquareDescription" resizeKind="NSEW">
<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='red']"/>
</style>
</nodeMappings>
</defaultLayer>
</ownedRepresentations>
</ownedViewpoints>
</description:Group>
10 changes: 10 additions & 0 deletions dart-designer-configuration/dart.design/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension point="org.eclipse.sirius.componentization">
<component class="dart.design.Activator"
id="dart.design"
name="dart">
</component>
</extension>
</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package dart.design;

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 = "dart.design";

// 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/dart.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;
}
}
12 changes: 12 additions & 0 deletions dart-designer-configuration/dart.sample/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dart.sample</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>org.eclipse.sirius.nature.modelingproject</nature>
</natures>
</projectDescription>
10 changes: 10 additions & 0 deletions dart-designer-configuration/dart.sample/dart.dartspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<dart:Project xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dart="http://www.obeo.fr/dsl/2014/dart" name="">
<packages name="One" license="" dependencies="//@packages.1">
<assets xsi:type="dart:Class" name="entity">
<fields name="attribute"/>
<methods name="Function"/>
</assets>
</packages>
<packages name="Two"/>
</dart:Project>
Loading