Skip to content

Commit d592063

Browse files
committed
adds export
2 parents a5b361d + e429ba8 commit d592063

54 files changed

Lines changed: 2896 additions & 181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

src/main/conf/module.properties

Lines changed: 129 additions & 40 deletions
Large diffs are not rendered by default.

src/main/conf/module.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<Module id="${project.name}" class="fr.softeam.cameldesigner.impl.CamelDesignerModule" binaryversion="4.1.0" version="${project.version}" schema-level="2" uid="dc1688c2-8bd2-4585-a786-b1b5877996d7" author="Softeam" image="" url="">
33
<ClassPath>
44
<PathEntry path="lib/${project.artifactId}-${project.version}.jar"/>
5+
<<<<<<< HEAD
56
<PathEntry path="lib/com.google.guava-21.0.0-SNAPSHOT.jar"/>
67
<PathEntry path="lib/org.eclipse.emf.mwe.core-1.3.21-SNAPSHOT.jar"/>
78
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
@@ -47,6 +48,8 @@
4748
<PathEntry path="lib/org.eclipse.emf.mwe2.runtime-2.9.1-SNAPSHOT.jar"/>
4849
<PathEntry path="lib/org.eclipse.emf.mwe.utils-1.3.21-SNAPSHOT.jar"/>
4950
<PathEntry path="lib/CamelDSLExporter-3.0.0-SNAPSHOT.jar"/>
51+
=======
52+
>>>>>>> e429ba8cf675faca5e300c08c52247687d794213
5053
<PathEntry path="lib/inject-3.0.0.jar"/>
5154
<PathEntry path="lib/registry-3.7.0.jar"/>
5255
<PathEntry path="lib/xtext-2.12.0.jar"/>
@@ -219,7 +222,11 @@
219222
<Icon path=""/>
220223
<Image path=""/>
221224
</Stereotype>
225+
<<<<<<< HEAD
222226
<Stereotype name="DeploymentTypeModelDiagram" metaclass="Standard.ClassDiagram" owner-stereotype="mref#'' {c147d6d3-8bd0-4b94-a9d6-164a947fa0b4} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.DeploymentTypeModelDiagram.label" uid="b78ff0fe-e31c-4034-ba6a-7a3d0626819e" is-abstract="false">
227+
=======
228+
<Stereotype name="DeploymentModelDiagram" metaclass="Standard.ClassDiagram" owner-stereotype="mref#'' {c147d6d3-8bd0-4b94-a9d6-164a947fa0b4} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.DeploymentModelDiagram.label" uid="b78ff0fe-e31c-4034-ba6a-7a3d0626819e" is-abstract="false">
229+
>>>>>>> e429ba8cf675faca5e300c08c52247687d794213
223230
<Icon path="res/icon/gui/DeploymentTypeModelDiagram_24.png"/>
224231
<Image path="res/icon/gui/DeploymentTypeModelDiagram_48.png"/>
225232
</Stereotype>
@@ -1330,7 +1337,7 @@
13301337
<Scope metaclass="Standard.Package" stereotype="CamelDesigner#DeploymentModel"/>
13311338
<Handler class="DiagramCreate">
13321339
<HParameter name="name" value="Diagram"/>
1333-
<HParameter name="stereotype" value="CamelDesigner#DeploymentTypeModelDiagram"/>
1340+
<HParameter name="stereotype" value="CamelDesigner#DeploymentModelDiagram"/>
13341341
<HParameter name="metaclass" value="Standard.ClassDiagram"/>
13351342
<HParameter name="style" value="CamelStyle"/>
13361343
</Handler>
@@ -2626,7 +2633,7 @@
26262633
<HParameter name="metaclass" value="Standard.ClassDiagram"/>
26272634
</Handler>
26282635
</DiagramType>
2629-
<DiagramType base-diagram="Standard.ClassDiagram" stereotype="CamelDesigner#DeploymentTypeModelDiagram">
2636+
<DiagramType base-diagram="Standard.ClassDiagram" stereotype="CamelDesigner#DeploymentModelDiagram">
26302637
<Palette keepBasePalette="false">
26312638
<ToolRef refid="Software_Component" group="%group.Deployment_Type.label"/>
26322639
<ToolRef refid="RequirementSet" group="%group.Deployment_Type.label"/>
@@ -2655,7 +2662,11 @@
26552662
<ToolRef refid="Deployment_Instance_Model" group="%group.Deployment_Instance.label"/>
26562663
</Palette>
26572664
<Handler class="StandardCustomizer">
2665+
<<<<<<< HEAD
26582666
<HParameter name="stereotype" value="CamelDesigner#DeploymentTypeModelDiagram"/>
2667+
=======
2668+
<HParameter name="stereotype" value="CamelDesigner#DeploymentModelDiagram"/>
2669+
>>>>>>> e429ba8cf675faca5e300c08c52247687d794213
26592670
<HParameter name="metaclass" value="Standard.ClassDiagram"/>
26602671
</Handler>
26612672
</DiagramType>
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
/*
2+
* WARNING: GENERATED FILE - DO NOT EDIT
3+
* Module: CamelDesigner v1.0.05
4+
5+
* This file was generated on 11/23/21 5:02 PM by Modelio Studio.
6+
*/
7+
package fr.softeam.cameldesigner.api.cameldiagrams.standard.classdiagram;
8+
9+
import java.util.ArrayList;
10+
import java.util.Collections;
11+
import java.util.List;
12+
import java.util.Objects;
13+
import com.modeliosoft.modelio.javadesigner.annotations.objid;
14+
import fr.softeam.cameldesigner.api.CamelDesignerProxyFactory;
15+
import fr.softeam.cameldesigner.api.ICamelDesignerPeerModule;
16+
import fr.softeam.cameldesigner.api.camelcore.infrastructure.modelelement.CamelElement;
17+
import fr.softeam.cameldesigner.api.cameldiagrams.infrastructure.abstractdiagram.AbstractCamelDiagram;
18+
import fr.softeam.cameldesigner.api.executionmodel.standard.package_.ExecutionModel;
19+
import fr.softeam.cameldesigner.impl.CamelDesignerModule;
20+
import org.modelio.api.modelio.model.IModelingSession;
21+
import org.modelio.api.modelio.model.PropertyConverter;
22+
import org.modelio.api.module.context.IModuleContext;
23+
import org.modelio.metamodel.diagrams.ClassDiagram;
24+
import org.modelio.metamodel.mmextensions.infrastructure.ExtensionNotFoundException;
25+
import org.modelio.metamodel.uml.infrastructure.Dependency;
26+
import org.modelio.metamodel.uml.infrastructure.ModelElement;
27+
import org.modelio.metamodel.uml.infrastructure.Stereotype;
28+
import org.modelio.metamodel.uml.infrastructure.TagType;
29+
import org.modelio.metamodel.uml.infrastructure.properties.PropertyDefinition;
30+
import org.modelio.metamodel.uml.infrastructure.properties.PropertyTableDefinition;
31+
import org.modelio.vcore.smkernel.mapi.MObject;
32+
33+
/**
34+
* Proxy class to handle a {@link ClassDiagram} with << ExecutionModelDiagram >> stereotype.
35+
* <p>Stereotype description:
36+
* <br/><i>null</i></p>
37+
*/
38+
@objid ("81054f40-4a19-4bee-8959-d5f552c3e112")
39+
public class ExecutionModelDiagram extends AbstractCamelDiagram {
40+
@objid ("efe196d7-6329-4033-acfa-fc6e964031e6")
41+
public static final String STEREOTYPE_NAME = "ExecutionModelDiagram";
42+
43+
/**
44+
* Tells whether a {@link ExecutionModelDiagram proxy} can be instantiated from a {@link MObject} checking it is a {@link ClassDiagram} stereotyped << ExecutionModelDiagram >>.
45+
* <p>
46+
* The method returns <code>false</code> if the instantiation cannot be carried out.
47+
*
48+
* @param elt a model object
49+
* @return <code>true</code> if the instantiation can be carried out else <code>false</code>.
50+
*/
51+
@objid ("0c99142a-1fc7-4aa6-8045-325efa4e0941")
52+
public static boolean canInstantiate(final MObject elt) {
53+
return ((elt instanceof ClassDiagram) && ((ClassDiagram) elt).isStereotyped(ICamelDesignerPeerModule.MODULE_NAME, ExecutionModelDiagram.STEREOTYPE_NAME));
54+
}
55+
56+
/**
57+
* Create a new {@link ClassDiagram} stereotyped << ExecutionModelDiagram >> then instantiate a {@link ExecutionModelDiagram} proxy.
58+
*
59+
* @return a {@link ExecutionModelDiagram} proxy on the created {@link ClassDiagram}.
60+
*/
61+
@objid ("aaf86775-d3ab-4211-b9a8-2bd3ba2d4a2b")
62+
public static ExecutionModelDiagram create() {
63+
ModelElement e = (ModelElement)CamelDesignerModule.getInstance().getModuleContext().getModelingSession().getModel().createElement("Standard.ClassDiagram");
64+
e.addStereotype(ICamelDesignerPeerModule.MODULE_NAME, ExecutionModelDiagram.STEREOTYPE_NAME);
65+
return ExecutionModelDiagram.instantiate((ClassDiagram)e);
66+
}
67+
68+
/**
69+
* Tries to instantiate a {@link ExecutionModelDiagram} proxy from a {@link ClassDiagram} stereotyped << ExecutionModelDiagram >> checking its metaclass and its stereotype.
70+
* <p>
71+
* The method returns <i>null</i> if the instantiation cannot be carried out.
72+
* @param obj a ClassDiagram
73+
* @return a {@link ExecutionModelDiagram} proxy or <i>null</i>.
74+
*/
75+
@objid ("bf0b0d0f-de47-41b8-b785-d1e5ab41a939")
76+
public static ExecutionModelDiagram instantiate(final ClassDiagram obj) {
77+
return ExecutionModelDiagram.canInstantiate(obj) ? new ExecutionModelDiagram(obj) : null;
78+
}
79+
80+
/**
81+
* Tries to instantiate a {@link ExecutionModelDiagram} proxy from a {@link ClassDiagram} stereotyped << ExecutionModelDiagram >> checking its metaclass and its stereotype.
82+
* <p>
83+
* The method throws an {@link IllegalArgumentException} if the instantiation cannot be carried out.
84+
* @param obj a {@link ClassDiagram}
85+
* @return a {@link ExecutionModelDiagram} proxy.
86+
* @throws IllegalArgumentException if the instantiation cannot be carried out.
87+
*/
88+
@objid ("11457041-11e1-4f3e-bee4-b4451a75f1fe")
89+
public static ExecutionModelDiagram safeInstantiate(final ClassDiagram obj) throws IllegalArgumentException {
90+
if (ExecutionModelDiagram.canInstantiate(obj))
91+
return new ExecutionModelDiagram(obj);
92+
else
93+
throw new IllegalArgumentException("ExecutionModelDiagram: Cannot instantiate "+obj+": wrong element type or stereotype");
94+
}
95+
96+
@objid ("16cf1c0b-12f6-4391-9903-112578e5cf23")
97+
@Override
98+
public boolean equals(final Object obj) {
99+
if (this == obj) {
100+
return true;
101+
}
102+
if (obj == null) {
103+
return false;
104+
}
105+
if (getClass() != obj.getClass()) {
106+
return false;
107+
}
108+
ExecutionModelDiagram other = (ExecutionModelDiagram) obj;
109+
return java.util.Objects.equals(getElement(), other.getElement());
110+
}
111+
112+
/**
113+
* Get the underlying {@link ClassDiagram}.
114+
* @return the ClassDiagram represented by this proxy, never null.
115+
*/
116+
@objid ("9fb21d8d-7e70-41ae-a5ee-6f41148ca453")
117+
@Override
118+
public ClassDiagram getElement() {
119+
return (ClassDiagram)super.getElement();
120+
}
121+
122+
/**
123+
* Get the value of the 'Origin' role.<p>
124+
* Role description:
125+
* null
126+
*
127+
*/
128+
@objid ("6b430a2d-af96-45cd-a714-f29d0eabd956")
129+
public ExecutionModel getOrigin() {
130+
for (Dependency d : this.elt.getImpactedDependency()) {
131+
if (d.isStereotyped(ExecutionModelDiagram.MdaTypes.MDAASSOCDEP)
132+
&& Objects.equals(d.getTagValue(ExecutionModelDiagram.MdaTypes.MDAASSOCDEP_ROLE), "Diagram")
133+
&& ExecutionModel.canInstantiate(d.getImpacted())) {
134+
return (ExecutionModel)CamelDesignerProxyFactory.instantiate(d.getImpacted(), ExecutionModel.MdaTypes.STEREOTYPE_ELT.getName());
135+
}
136+
}
137+
return null;
138+
}
139+
140+
@objid ("8d088545-5f00-4582-8e30-3f11c73c70d1")
141+
@Override
142+
public int hashCode() {
143+
return 23 + ((this.elt == null) ? 0 : this.elt.hashCode());
144+
}
145+
146+
/**
147+
* Set the value of the 'Origin' role.<p>
148+
* Role description:
149+
* null
150+
*
151+
*/
152+
@objid ("d61a787f-e4f2-4cf0-afd1-42a264da6db5")
153+
public void setOrigin(final ExecutionModel obj) {
154+
Dependency dep = null;
155+
for (Dependency d : this.elt.getImpactedDependency())
156+
if (d.isStereotyped(ExecutionModelDiagram.MdaTypes.MDAASSOCDEP) && Objects.equals(d.getTagValue(ExecutionModelDiagram.MdaTypes.MDAASSOCDEP_ROLE), "Diagram")) {
157+
dep = d;
158+
break;
159+
}
160+
if (obj == null) {
161+
if (dep != null) dep.delete();
162+
} else {
163+
if (dep == null) {
164+
IModelingSession session = CamelDesignerModule.getInstance().getModuleContext().getModelingSession();
165+
dep = session.getModel().createDependency(obj.getElement(), this.elt, ExecutionModelDiagram.MdaTypes.MDAASSOCDEP);
166+
dep.setName("Diagram");
167+
dep.putTagValue(ExecutionModelDiagram.MdaTypes.MDAASSOCDEP_ROLE, "Diagram");
168+
}
169+
dep.setImpacted(obj.getElement());
170+
}
171+
}
172+
173+
@objid ("2f80f04c-df61-48c6-9945-4f635ce676b9")
174+
@Override
175+
public List<CamelElement> getChilds() {
176+
List<CamelElement> result = new ArrayList<>();
177+
return result;
178+
}
179+
180+
@objid ("8a7a2cc5-50c5-44cf-8446-9d4b3ea1617b")
181+
protected ExecutionModelDiagram(final ClassDiagram elt) {
182+
super(elt);
183+
}
184+
185+
@objid ("ab4c82f7-565e-4087-a077-3c41552a0525")
186+
public static final class MdaTypes {
187+
@objid ("be5310a2-1499-4e67-9806-fdf8a761edea")
188+
public static Stereotype STEREOTYPE_ELT;
189+
190+
@objid ("480b5b74-6ced-43b2-8dc1-c0d67f24fcb8")
191+
private static Stereotype MDAASSOCDEP;
192+
193+
@objid ("cafd4fb7-1e60-471a-b8fd-fb55fbaf15b8")
194+
private static TagType MDAASSOCDEP_ROLE;
195+
196+
@objid ("6d0d7da6-35c1-4808-bed1-76a8fb4609f2")
197+
public static void init(final IModuleContext ctx) {
198+
STEREOTYPE_ELT = ctx.getModelingSession().findElementById(Stereotype.class, "40a6ab6a-6df9-40b0-a877-d1de85918a7d");
199+
MDAASSOCDEP = ctx.getModelingSession().findElementById(Stereotype.class, "94b7efa5-f94c-4d1d-896f-f103e56a8e2e");
200+
MDAASSOCDEP_ROLE = ctx.getModelingSession().findElementById(TagType.class, "7637f2fd-b750-43c1-a15c-5d0b084ca1cd");
201+
}
202+
203+
204+
static {
205+
if(CamelDesignerModule.getInstance() != null) {
206+
init(CamelDesignerModule.getInstance().getModuleContext());
207+
}
208+
}
209+
}
210+
211+
}

src/main/java/fr/softeam/cameldesigner/api/CamelDesignerAbstractProxy.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,17 @@
2929
import fr.softeam.cameldesigner.api.metricmodel.standard.class_.RawMetric;
3030
import fr.softeam.cameldesigner.api.metricmodel.standard.class_.RawMetricContext;
3131
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.class_.EventPattern;
32+
<<<<<<< HEAD
3233
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.class_.SingleEvent;
3334
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.instance.FunctionalEventInstance;
3435
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.instance.NonFunctionalEventInstance;
3536
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.namespace.ScalingAction;
37+
=======
38+
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.class_.ScalingAction;
39+
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.class_.SingleEvent;
40+
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.instance.FunctionalEventInstance;
41+
import fr.softeam.cameldesigner.api.scalabilitymodel.standard.instance.NonFunctionalEventInstance;
42+
>>>>>>> e429ba8cf675faca5e300c08c52247687d794213
3643
import fr.softeam.cameldesigner.api.typemodel.standard.datatype.Range;
3744
import fr.softeam.cameldesigner.api.unitmodel.standard.datatype.CompositeUnit;
3845
import fr.softeam.cameldesigner.api.unitmodel.standard.datatype.Dimensionless;

0 commit comments

Comments
 (0)