Skip to content

Commit d565e10

Browse files
Change TopologyTemplate metaclass from Package to Class + change of reference to package in tools
1 parent 61bd31f commit d565e10

File tree

105 files changed

+2184
-2161
lines changed

Some content is hidden

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

105 files changed

+2184
-2161
lines changed

ToscaDesigner/src/main/conf/module.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@
941941
<Icon path=""/>
942942
<Image path=""/>
943943
</Stereotype>
944-
<Stereotype name="TTopologyTemplate" metaclass="Standard.Package" owner-stereotype="mref#'' {1aad84ed-4c30-40ec-a4d8-6712bb6bd018} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TTopologyTemplate.label" uid="a52f433c-cf19-4033-99c2-81b4af708744" is-abstract="false">
944+
<Stereotype name="TTopologyTemplate" metaclass="Standard.Class" owner-stereotype="mref#'' {1aad84ed-4c30-40ec-a4d8-6712bb6bd018} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TTopologyTemplate.label" uid="a52f433c-cf19-4033-99c2-81b4af708744" is-abstract="false">
945945
<Icon path="res/icon/gui/topology_template24.png"/>
946946
<Image path="res/icon/gui/topology_template48.png"/>
947947
</Stereotype>
@@ -1057,7 +1057,7 @@
10571057
<Command id="Export" label="%command.Export.label" tooltip="%command.Export.tooltip" image="res/icon/gui/export.png" modify-model="false">
10581058
<Scope metaclass="Standard.Package" stereotype="ToscaDesigner#ToscaModel"/>
10591059
<Scope metaclass="Standard.Class" stereotype="ToscaDesigner#TNodeType"/>
1060-
<Scope metaclass="Standard.Package" stereotype="ToscaDesigner#TTopologyTemplate"/>
1060+
<Scope metaclass="Standard.Class" stereotype="ToscaDesigner#TTopologyTemplate"/>
10611061
<Handler class="fr.softeam.toscadesigner.handlers.commands.ExportToscaModelCommand">
10621062
<HParameter name="name" value=""/>
10631063
</Handler>
@@ -1122,15 +1122,15 @@
11221122
</Tool>
11231123
<Tool id="Import" label="%tool.Import.label" tooltip="%tool.Import.tooltip" image="res/icon/gui/import24.ICON.png">
11241124
<Scope-source metaclass="Standard.Class" stereotype="ToscaDesigner#TNodeType"/>
1125-
<Scope-source metaclass="Standard.Package" stereotype="ToscaDesigner#TTopologyTemplate"/>
1125+
<Scope-source metaclass="Standard.Class" stereotype="ToscaDesigner#TTopologyTemplate"/>
11261126
<Handler class="Box">
11271127
<HParameter name="stereotype" value="ToscaDesigner#ImportElement"/>
11281128
<HParameter name="metaclass" value="Standard.Attribute"/>
11291129
<HParameter name="name" value="Import"/>
11301130
</Handler>
11311131
</Tool>
11321132
<Tool id="Metadata" label="%tool.Metadata.label" tooltip="%tool.Metadata.tooltip" image="res/icon/gui/metadata24.png">
1133-
<Scope-source metaclass="Standard.Package" stereotype="ToscaDesigner#TTopologyTemplate"/>
1133+
<Scope-source metaclass="Standard.Class" stereotype="ToscaDesigner#TTopologyTemplate"/>
11341134
<Scope-source metaclass="Standard.Class" stereotype="ToscaDesigner#TNodeTemplate"/>
11351135
<Scope-source metaclass="Standard.Class" stereotype="ToscaDesigner#TNodeType"/>
11361136
<Handler class="Box">
@@ -1140,7 +1140,7 @@
11401140
</Handler>
11411141
</Tool>
11421142
<Tool id="NodeTemplate" label="%tool.NodeTemplate.label" tooltip="%tool.NodeTemplate.tooltip" image="res/icon/gui/node_template24.png">
1143-
<Scope-source metaclass="Standard.Package" stereotype=""/>
1143+
<Scope-source metaclass="Infrastructure.ModelElement" stereotype=""/>
11441144
<Handler class="Box">
11451145
<HParameter name="stereotype" value="ToscaDesigner#TNodeTemplate"/>
11461146
<HParameter name="metaclass" value="Standard.Class"/>
@@ -1260,9 +1260,9 @@
12601260
</Tool>
12611261
<Tool id="TopologyTemplate" label="%tool.TopologyTemplate.label" tooltip="%tool.TopologyTemplate.tooltip" image="res/icon/gui/topology_template24.png">
12621262
<Scope-source metaclass="Standard.Package" stereotype="ToscaDesigner#TServiceTemplate"/>
1263-
<Handler class="fr.softeam.toscadesigner.handlers.tools.CreateTopologyTemplateTool">
1263+
<Handler class="Box">
12641264
<HParameter name="stereotype" value="ToscaDesigner#TTopologyTemplate"/>
1265-
<HParameter name="metaclass" value="Standard.Package"/>
1265+
<HParameter name="metaclass" value="Standard.Class"/>
12661266
<HParameter name="name" value="TopologyTemplate"/>
12671267
</Handler>
12681268
</Tool>
67 Bytes
Binary file not shown.

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/ToscaDesignerProxyFactory.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* WARNING: GENERATED FILE - DO NOT EDIT
33
* Module: ToscaDesigner v0.0.1
44
5-
* This file was generated on 17/02/2025 15:39 by Modelio Studio.
5+
* This file was generated on 17/02/2025 18:02 by Modelio Studio.
66
*/
77
package fr.softeam.toscadesigner.api;
88

@@ -115,7 +115,7 @@
115115
* <li><< TRequirementRef >> on a {@link org.modelio.metamodel.uml.infrastructure.ModelElement}: instantiates a {@link TRequirementRef}
116116
* <li><< TServiceTemplate >> on a {@link org.modelio.metamodel.uml.statik.Package}: instantiates a {@link TServiceTemplate}
117117
* <li><< TTopologyElementInstanceStates >> on a {@link org.modelio.metamodel.uml.statik.Class}: instantiates a {@link TTopologyElementInstanceStates}
118-
* <li><< TTopologyTemplate >> on a {@link org.modelio.metamodel.uml.statik.Package}: instantiates a {@link TTopologyTemplate}
118+
* <li><< TTopologyTemplate >> on a {@link org.modelio.metamodel.uml.statik.Class}: instantiates a {@link TTopologyTemplate}
119119
* <li><< TargetElementType >> on a {@link org.modelio.metamodel.uml.statik.DataType}: instantiates a {@link TargetElementType}
120120
* <li><< TargetInterfacesType >> on a {@link org.modelio.metamodel.uml.infrastructure.ModelElement}: instantiates a {@link TargetInterfacesType}
121121
* <li><< ToscaElement >> on a {@link org.modelio.metamodel.uml.infrastructure.ModelElement}: instantiates a {@link ToscaElement}
@@ -126,16 +126,16 @@
126126
*/
127127
@objid ("344538da-8f7b-4820-bee7-fad3a6c1b7e1")
128128
public class ToscaDesignerProxyFactory {
129-
@objid ("66689ef4-4eea-488b-b09e-aad99d2a04f4")
129+
@objid ("1dcd93e4-d958-49dd-a257-8d3aa85e8221")
130130
private static final String ASSETNAME = "ToscaDesigner";
131131

132-
@objid ("3b24624b-94aa-480a-856c-91f801d222fe")
132+
@objid ("4856371a-dcb7-4cc7-8182-e2cdac8c85f0")
133133
private static final InstantiateVisitor instantiateVisitor = new InstantiateVisitor();
134134

135135
/**
136136
* @param session The modeling session this factory is operating in.
137137
*/
138-
@objid ("94300c09-1952-430e-87f9-4a0d892914b3")
138+
@objid ("457c3179-f752-4f0b-8226-69cc8c8bf969")
139139
public static final void initialize(final IModelingSession session) throws MdaProxyException {
140140
fr.softeam.toscadesigner.api.automatic.standard.staticdiagram.ToscaDiagram.MdaTypes.init(session);
141141
fr.softeam.toscadesigner.api.automatic.standard.staticdiagram.ServiceTemplateDiagram.MdaTypes.init(session);
@@ -223,7 +223,7 @@ public static final void initialize(final IModelingSession session) throws MdaPr
223223
fr.softeam.toscadesigner.api.tosca.infrastructure.modelelement.TRequirementRef.MdaTypes.init(session);
224224
fr.softeam.toscadesigner.api.tosca.standard.package_.TServiceTemplate.MdaTypes.init(session);
225225
fr.softeam.toscadesigner.api.tosca.standard.class_.TTopologyElementInstanceStates.MdaTypes.init(session);
226-
fr.softeam.toscadesigner.api.tosca.standard.package_.TTopologyTemplate.MdaTypes.init(session);
226+
fr.softeam.toscadesigner.api.tosca.standard.class_.TTopologyTemplate.MdaTypes.init(session);
227227
fr.softeam.toscadesigner.api.tosca.standard.datatype.TargetElementType.MdaTypes.init(session);
228228
fr.softeam.toscadesigner.api.tosca.infrastructure.modelelement.TargetInterfacesType.MdaTypes.init(session);
229229
fr.softeam.toscadesigner.api.tosca.infrastructure.modelelement.ToscaElement.MdaTypes.init(session);
@@ -241,7 +241,7 @@ public static final void initialize(final IModelingSession session) throws MdaPr
241241
* @param e A model element
242242
* @return the right proxy or <i>null</i>.
243243
*/
244-
@objid ("0a0f32f4-7a01-46ed-8070-1fdddccf8ddc")
244+
@objid ("3fa1d786-d0b6-4a3c-94d7-4a50b7a46713")
245245
public static final Object instantiate(final ModelElement e) {
246246
for (Stereotype s : e.getExtension()) {
247247
ModuleComponent module = s.getModule();
@@ -261,23 +261,23 @@ public static final Object instantiate(final ModelElement e) {
261261
* @param stName A stereotype name.
262262
* @return the right proxy or <i>null</i>.
263263
*/
264-
@objid ("3880fc45-f47b-401f-9699-994ddf2d6266")
264+
@objid ("9fa912ba-7cc5-4976-a57b-efb03fc1814b")
265265
public static final Object instantiate(final Element e, final String stName) {
266266
instantiateVisitor.setStereotype(stName);
267267
return e.accept(instantiateVisitor);
268268
}
269269

270-
@objid ("f6d85653-6701-4351-979c-a153ebdc6c84")
270+
@objid ("e24ba44e-864e-478f-95fe-a9e8eaa7e107")
271271
private static class InstantiateVisitor implements IDefaultModelVisitor, IDefaultInfrastructureVisitor {
272-
@objid ("dd645f62-13a1-4ebb-b908-1769c1e39969")
272+
@objid ("aa11b52c-b416-4440-bff4-a8374b6811b8")
273273
private String stName;
274274

275-
@objid ("01c1e186-4386-426c-941b-3683f3347f87")
275+
@objid ("3954763c-29c5-4b2c-a201-187de41683f0")
276276
public final void setStereotype(final String stName) {
277277
this.stName = stName;
278278
}
279279

280-
@objid ("f951b714-8607-4400-8389-0d6e6aab4467")
280+
@objid ("8e8c9082-7adf-453c-977f-5e243495e00b")
281281
@Override
282282
public final Object visitAssociation(Association obj) {
283283
switch (this.stName) {
@@ -290,7 +290,7 @@ public final Object visitAssociation(Association obj) {
290290

291291
}
292292

293-
@objid ("32ed36fc-a0cd-48f5-894e-d2b787ed3c0f")
293+
@objid ("a960b119-40ba-49a6-9737-aa30c1e447c4")
294294
@Override
295295
public final Object visitAttribute(Attribute obj) {
296296
switch (this.stName) {
@@ -305,13 +305,12 @@ public final Object visitAttribute(Attribute obj) {
305305

306306
}
307307

308-
@objid ("9d6f8183-3366-48c7-afd2-0b2bf0d14bc9")
308+
@objid ("000e45b0-7eca-470b-b7b7-c6bfc99b3c81")
309309
@Override
310310
public final Object visitPackage(Package obj) {
311311
switch (this.stName) {
312312
case fr.softeam.toscadesigner.api.tosca.standard.package_.TGroup.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.package_.TGroup.instantiate(obj);
313313
case fr.softeam.toscadesigner.api.tosca.standard.package_.TServiceTemplate.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.package_.TServiceTemplate.instantiate(obj);
314-
case fr.softeam.toscadesigner.api.tosca.standard.package_.TTopologyTemplate.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.package_.TTopologyTemplate.instantiate(obj);
315314
case fr.softeam.toscadesigner.api.tosca.standard.package_.ToscaModel.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.package_.ToscaModel.instantiate(obj);
316315
default:
317316
break;
@@ -321,7 +320,7 @@ public final Object visitPackage(Package obj) {
321320

322321
}
323322

324-
@objid ("30f65c0c-edb4-4a86-9d07-94d8f9f18403")
323+
@objid ("ca1e7cc0-db89-4d13-931a-8c0450ec728b")
325324
@Override
326325
public final Object visitAssociationEnd(AssociationEnd obj) {
327326
switch (this.stName) {
@@ -334,7 +333,7 @@ public final Object visitAssociationEnd(AssociationEnd obj) {
334333

335334
}
336335

337-
@objid ("173e00d2-6a6b-441e-9f8e-bd110593e24f")
336+
@objid ("8e22ed0e-26a0-46ae-bfb9-57bc7265f519")
338337
@Override
339338
public final Object visitDataType(DataType obj) {
340339
switch (this.stName) {
@@ -348,7 +347,7 @@ public final Object visitDataType(DataType obj) {
348347

349348
}
350349

351-
@objid ("30c9994c-752f-41bf-906e-cea9d82a42a7")
350+
@objid ("ba0153af-43ff-4992-9aff-666b8f887d8b")
352351
@Override
353352
public final Object visitClass(Class obj) {
354353
switch (this.stName) {
@@ -378,6 +377,7 @@ public final Object visitClass(Class obj) {
378377
case fr.softeam.toscadesigner.api.tosca.standard.class_.TRequirementDefinition.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.class_.TRequirementDefinition.instantiate(obj);
379378
case fr.softeam.toscadesigner.api.tosca.standard.class_.TRequirementDefinitionType.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.class_.TRequirementDefinitionType.instantiate(obj);
380379
case fr.softeam.toscadesigner.api.tosca.standard.class_.TTopologyElementInstanceStates.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.class_.TTopologyElementInstanceStates.instantiate(obj);
380+
case fr.softeam.toscadesigner.api.tosca.standard.class_.TTopologyTemplate.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.class_.TTopologyTemplate.instantiate(obj);
381381
case fr.softeam.toscadesigner.api.tosca.standard.class_.Trigger.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.class_.Trigger.instantiate(obj);
382382
case fr.softeam.toscadesigner.api.tosca.standard.class_.CapabilityStereotype.STEREOTYPE_NAME: return fr.softeam.toscadesigner.api.tosca.standard.class_.CapabilityStereotype.instantiate(obj);
383383
default:
@@ -388,7 +388,7 @@ public final Object visitClass(Class obj) {
388388

389389
}
390390

391-
@objid ("ce3c86a9-ad98-45bc-b3a3-1a08ce1cc56c")
391+
@objid ("73b71efa-c4e7-4f46-a57f-e03a7f36a95d")
392392
@Override
393393
public final Object visitStaticDiagram(StaticDiagram obj) {
394394
switch (this.stName) {
@@ -403,7 +403,7 @@ public final Object visitStaticDiagram(StaticDiagram obj) {
403403

404404
}
405405

406-
@objid ("a0726e73-b09c-4796-b1d5-0e57a504737f")
406+
@objid ("d7d49f8d-1f7f-44da-9c5f-89c9c1e47ae7")
407407
@Override
408408
public final Object visitModelElement(ModelElement obj) {
409409
switch (this.stName) {
@@ -471,7 +471,7 @@ public final Object visitModelElement(ModelElement obj) {
471471
* <p>If null is returned the caller will return null.
472472
* @return the {@link IInfrastructureVisitor} visitor or <i>null</i>.
473473
*/
474-
@objid ("850637e4-fc48-4c34-bb88-ea2231a613e0")
474+
@objid ("35ff7b54-aab4-4865-a765-aaa94bcdf72a")
475475
@Override
476476
public IInfrastructureVisitor getInfrastructureVisitor() {
477477
return this;

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/api/automatic/standard/staticdiagram/ServiceTemplateDiagram.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* WARNING: GENERATED FILE - DO NOT EDIT
33
* Module: ToscaDesigner v0.0.1
44
5-
* This file was generated on 17/02/2025 15:39 by Modelio Studio.
5+
* This file was generated on 17/02/2025 18:02 by Modelio Studio.
66
*/
77
package fr.softeam.toscadesigner.api.automatic.standard.staticdiagram;
88

@@ -40,13 +40,13 @@
4040
*/
4141
@objid ("ed792b19-3a0d-46f3-b2a8-c885af3a1414")
4242
public class ServiceTemplateDiagram implements IMdaProxy {
43-
@objid ("9db11505-0789-4809-b6d8-2e50464cf98b")
43+
@objid ("04762a51-c997-44a9-83df-d45a82b91ff3")
4444
public static final String STEREOTYPE_NAME = "ServiceTemplateDiagram";
4545

4646
/**
4747
* The underlying {@link StaticDiagram} represented by this proxy, never null.
4848
*/
49-
@objid ("e2771c34-ba3d-4a2e-9ed7-4caaaf2571fd")
49+
@objid ("28441f6b-ac9d-4ea0-97a1-02ff5954d1ca")
5050
protected final StaticDiagram elt;
5151

5252
/**
@@ -56,7 +56,7 @@ public class ServiceTemplateDiagram implements IMdaProxy {
5656
* @param elt a model object
5757
* @return <code>true</code> if the instantiation can be carried out else <code>false</code>.
5858
*/
59-
@objid ("2efac9fa-14d7-41eb-ab6c-d319e6ef4115")
59+
@objid ("f4ab80f5-c961-4a75-9555-b4e60e3e1d10")
6060
public static boolean canInstantiate(final MObject elt) {
6161
return ((elt instanceof StaticDiagram) && (ServiceTemplateDiagram.MdaTypes.STEREOTYPE_ELT!=null) && ((StaticDiagram) elt).isStereotyped(ServiceTemplateDiagram.MdaTypes.STEREOTYPE_ELT));
6262
}
@@ -66,7 +66,7 @@ public static boolean canInstantiate(final MObject elt) {
6666
*
6767
* @return a {@link ServiceTemplateDiagram} proxy on the created {@link StaticDiagram}.
6868
*/
69-
@objid ("02938537-0bee-40a2-a9fb-cae7bc7830eb")
69+
@objid ("23e90bf8-a37f-4507-a25c-2a9557636062")
7070
public static ServiceTemplateDiagram create(final IModelingSession session) {
7171
ModelElement e = (ModelElement)session.getModel().createElement("Standard.StaticDiagram");
7272
e.getExtension().add(ServiceTemplateDiagram.MdaTypes.STEREOTYPE_ELT);
@@ -80,7 +80,7 @@ public static ServiceTemplateDiagram create(final IModelingSession session) {
8080
* @param obj a StaticDiagram
8181
* @return a {@link ServiceTemplateDiagram} proxy or <i>null</i>.
8282
*/
83-
@objid ("6603d103-c1f7-4d9e-b1c1-6e742bfa9d77")
83+
@objid ("8a007889-f31f-4fef-8aff-a67f3fd20b8d")
8484
public static ServiceTemplateDiagram instantiate(final StaticDiagram obj) {
8585
return ServiceTemplateDiagram.canInstantiate(obj) ? new ServiceTemplateDiagram(obj) : null;
8686
}
@@ -93,15 +93,15 @@ public static ServiceTemplateDiagram instantiate(final StaticDiagram obj) {
9393
* @return a {@link ServiceTemplateDiagram} proxy.
9494
* @throws IllegalArgumentException if the instantiation cannot be carried out.
9595
*/
96-
@objid ("93210afc-5fb0-4a64-822a-0b7b1baf437b")
96+
@objid ("f8817348-af74-4793-9ee5-f11c4ba7c558")
9797
public static ServiceTemplateDiagram safeInstantiate(final StaticDiagram obj) throws IllegalArgumentException {
9898
if (ServiceTemplateDiagram.canInstantiate(obj))
9999
return new ServiceTemplateDiagram(obj);
100100
else
101101
throw new IllegalArgumentException("ServiceTemplateDiagram: Cannot instantiate "+obj+": wrong element type or stereotype");
102102
}
103103

104-
@objid ("607ee1a1-ec29-46b8-b793-106265b785bc")
104+
@objid ("e1034e73-1528-4756-9133-549a6a6e9c72")
105105
@Override
106106
public boolean equals(final Object obj) {
107107
if (this == obj) {
@@ -121,35 +121,35 @@ public boolean equals(final Object obj) {
121121
* Get the underlying {@link StaticDiagram}.
122122
* @return the StaticDiagram represented by this proxy, never null.
123123
*/
124-
@objid ("b7ec321a-e4fb-4a56-a0c9-f1f8a0d85abc")
124+
@objid ("242690af-23e0-4b45-9aa0-562d3129ac6f")
125125
public StaticDiagram getElement() {
126126
return this.elt;
127127
}
128128

129-
@objid ("70800595-a562-425e-9460-4e168b855b51")
129+
@objid ("0925bb5b-224e-454c-a599-cf608e3989f0")
130130
@Override
131131
public int hashCode() {
132132
return 23 + ((this.elt == null) ? 0 : this.elt.hashCode());
133133

134134
}
135135

136-
@objid ("14976226-93f5-4e9d-868d-97121da23d26")
136+
@objid ("9d1209cb-d726-4a43-85ae-d4810da30416")
137137
protected ServiceTemplateDiagram(final StaticDiagram elt) {
138138
this.elt = elt;
139139
}
140140

141141
@objid ("4b6fef3f-101c-4384-86b5-c7c7a22b250c")
142142
public static final class MdaTypes {
143-
@objid ("a47db882-c9b5-4372-82a2-75c69f714b74")
143+
@objid ("71f15e24-d7e3-42b1-a070-e808faf1553e")
144144
public static Stereotype STEREOTYPE_ELT;
145145

146-
@objid ("f8bbc61e-a73b-4f2c-b020-3736c0deb752")
146+
@objid ("dc893ba4-1bb8-4f4e-8667-b35878aaea40")
147147
private static Stereotype MDAASSOCDEP;
148148

149-
@objid ("63a1d8f4-ae98-4d0b-a0ab-5489a011d83e")
149+
@objid ("378c4e41-0d6d-44b2-af1f-0db8b6c5d7e4")
150150
private static TagType MDAASSOCDEP_ROLE;
151151

152-
@objid ("f9f1c645-2763-4723-a9d9-8f194595e58e")
152+
@objid ("b1c16a24-23b4-44fc-9dbc-4310613c0014")
153153
public static void init(final IModelingSession session) throws MdaProxyException {
154154
List <MRef> missingRefs = new ArrayList<>();
155155
MRef mRef;

0 commit comments

Comments
 (0)