Skip to content

Commit 09cfa6e

Browse files
Fixed: Missing property "derivedFrom" in the property pages of following type: EntityType
1 parent 94960dc commit 09cfa6e

File tree

10 files changed

+82
-73
lines changed

10 files changed

+82
-73
lines changed

ToscaDesigner/src/main/conf/module.properties

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ propertydefinition.TEntityTemplatePropertyTable.type.description=
176176
propertydefinition.TEntityTemplatePropertyTable.type.label=type
177177
propertydefinition.TEntityTypePropertyTable.abstract.description=
178178
propertydefinition.TEntityTypePropertyTable.abstract.label=abstract
179-
propertydefinition.TEntityTypePropertyTable.derivedFrom.description=
180-
propertydefinition.TEntityTypePropertyTable.derivedFrom.label=derivedFrom
181179
propertydefinition.TEntityTypePropertyTable.description.description=
182180
propertydefinition.TEntityTypePropertyTable.description.label=description
183181
propertydefinition.TEntityTypePropertyTable.final.description=
@@ -459,6 +457,8 @@ stereotype.TExtension.description=
459457
stereotype.TExtension.label=TExtension
460458
stereotype.TExtensions.description=
461459
stereotype.TExtensions.label=TExtensions
460+
stereotype.TGroupType.description=
461+
stereotype.TGroupType.label=TGroupType
462462
stereotype.TImplementationArtifact.description=
463463
stereotype.TImplementationArtifact.label=TImplementationArtifact
464464
stereotype.TImplementationArtifacts.description=
@@ -513,8 +513,6 @@ stereotype.TargetInterfacesType.description=
513513
stereotype.TargetInterfacesType.label=TargetInterfacesType
514514
stereotype.Tgroup.description=
515515
stereotype.Tgroup.label=Tgroup
516-
stereotype.TgroupType.description=
517-
stereotype.TgroupType.label=TgroupType
518516
stereotype.TopologyTemplateDiagram.description=
519517
stereotype.TopologyTemplateDiagram.label=TopologyTemplateDiagram
520518
stereotype.ToscaDiagram.description=

ToscaDesigner/src/main/conf/module.xml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
</PropertyDefinition>
236236
</PropertyTable>
237237
</Stereotype>
238-
<Stereotype name="RequirementsType" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.RequirementsType.label" uid="1a39bd85-e28f-4e17-b2e9-a1803359cd83" is-abstract="false">
238+
<Stereotype name="RequirementsType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.RequirementsType.label" uid="1a39bd85-e28f-4e17-b2e9-a1803359cd83" is-abstract="false">
239239
<Icon path="res/icon/gui/requirements2.ICON.png"/>
240240
<Image path="res/icon/gui/requirements2.IMAGE.png"/>
241241
</Stereotype>
@@ -295,7 +295,7 @@
295295
</PropertyTable>
296296
</Stereotype>
297297
<Stereotype name="TArtifactType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TArtifactType.label" uid="08c1d0af-1987-4d3f-8dda-3b28c1aadcb9" is-abstract="false">
298-
<Icon path="res/icon/gui/TartifactType24.ICON.png"/>
298+
<Icon path="res/icon/gui/TartifactType24 .png"/>
299299
<Image path="res/icon/gui/TartifactType48.IMAGE.png"/>
300300
</Stereotype>
301301
<Stereotype name="TBoundaryDefinitions" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.TBoundaryDefinitions.label" uid="58396175-2147-4077-9121-3076b97cc177" is-abstract="false">
@@ -354,7 +354,7 @@
354354
</PropertyDefinition>
355355
</PropertyTable>
356356
</Stereotype>
357-
<Stereotype name="TCapabilityDefinitionsType" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.TCapabilityDefinitionsType.label" uid="ac0418b1-a726-46e6-ac59-310f0055050f" is-abstract="false">
357+
<Stereotype name="TCapabilityDefinitionsType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TCapabilityDefinitionsType.label" uid="ac0418b1-a726-46e6-ac59-310f0055050f" is-abstract="false">
358358
<Icon path="res/icon/gui/capabilityDefinitions24.png"/>
359359
<Image path="res/icon/gui/capabilityDefinitions48.png"/>
360360
</Stereotype>
@@ -556,18 +556,14 @@
556556
</PropertyDefinition>
557557
</PropertyTable>
558558
</Stereotype>
559-
<Stereotype name="TEntityType" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.TEntityType.label" uid="fecd81a5-da41-4a07-a507-6bfaf5bbadd2" is-abstract="false">
559+
<Stereotype name="TEntityType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TEntityType.label" uid="fecd81a5-da41-4a07-a507-6bfaf5bbadd2" is-abstract="false">
560560
<Icon path=""/>
561561
<Image path=""/>
562562
<PropertyTable id="TEntityTypePropertyTable" label="%propertytable.TEntityTypePropertyTable.label" uid="e8f30f06-d953-4192-a783-d2a57c96564c">
563563
<PropertyDefinition id="tags" label="%propertydefinition.TEntityTypePropertyTable.tags.label" default-value="" is-editable="true" uid="9d69d99b-499b-4753-be0a-7267d4a368ec">
564564
<TypeRef id="mref#'MultiElement' {1bdf9f87-e9ad-4849-ab22-c25147e8d00c} Infrastructure.PropertyType"/>
565565
<Description>%propertydefinition.TEntityTypePropertyTable.tags.description</Description>
566566
</PropertyDefinition>
567-
<PropertyDefinition id="derivedFrom" label="%propertydefinition.TEntityTypePropertyTable.derivedFrom.label" default-value="" is-editable="true" uid="1bb27208-5a4c-4ef2-a52e-94718a97c61c">
568-
<TypeRef id="mref#'Text' {01a40888-0000-002a-0000-000000000000} Infrastructure.PropertyType"/>
569-
<Description>%propertydefinition.TEntityTypePropertyTable.derivedFrom.description</Description>
570-
</PropertyDefinition>
571567
<PropertyDefinition id="propertiesDefinition" label="%propertydefinition.TEntityTypePropertyTable.propertiesDefinition.label" default-value="" is-editable="true" uid="8e60acb6-8df2-4d2b-bb91-d0b944eb9d28">
572568
<TypeRef id="mref#'MultiElement' {1bdf9f87-e9ad-4849-ab22-c25147e8d00c} Infrastructure.PropertyType"/>
573569
<Description>%propertydefinition.TEntityTypePropertyTable.propertiesDefinition.description</Description>
@@ -647,6 +643,14 @@
647643
<Icon path=""/>
648644
<Image path=""/>
649645
</Stereotype>
646+
<Stereotype name="TGroup" metaclass="Standard.Package" owner-stereotype="" is-hidden="false" label="%stereotype.Tgroup.label" uid="572d5cb4-54c7-45d0-a9c8-3dc3677f9ef3" is-abstract="false">
647+
<Icon path="res/icon/gui/Tgroup48.ICON.png"/>
648+
<Image path="res/icon/gui/Tgroup48.png"/>
649+
</Stereotype>
650+
<Stereotype name="TGroupType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TGroupType.label" uid="94a5619a-6aed-4b34-a0d8-03e85419ad55" is-abstract="false">
651+
<Icon path="res/icon/gui/TgroupType24.ICON.png"/>
652+
<Image path="res/icon/gui/TgroupType48.png"/>
653+
</Stereotype>
650654
<Stereotype name="TImplementationArtifact" metaclass="Infrastructure.ModelElement" owner-stereotype="mref#'' {1aad84ed-4c30-40ec-a4d8-6712bb6bd018} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TImplementationArtifact.label" uid="0b27c72d-e3eb-4877-a3ab-c3c962ec28b1" is-abstract="false">
651655
<Icon path=""/>
652656
<Image path=""/>
@@ -673,7 +677,7 @@
673677
<Icon path=""/>
674678
<Image path=""/>
675679
</Stereotype>
676-
<Stereotype name="TInterface" metaclass="Infrastructure.ModelElement" owner-stereotype="" is-hidden="false" label="%stereotype.TInterface.label" uid="7a56a78f-21b0-463d-b927-b9a3a461b565" is-abstract="false">
680+
<Stereotype name="TInterface" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TInterface.label" uid="7a56a78f-21b0-463d-b927-b9a3a461b565" is-abstract="false">
677681
<Icon path="res/icon/gui/TInterface24.png"/>
678682
<Image path="res/icon/gui/TInterface48.IMAGE.png"/>
679683
<PropertyTable id="TInterfaceTable" label="%propertytable.TInterfaceTable.label" uid="204ebc96-ec6b-46d3-9f88-bcec349cadc7">
@@ -687,7 +691,7 @@
687691
</PropertyDefinition>
688692
</PropertyTable>
689693
</Stereotype>
690-
<Stereotype name="TNodeTemplate" metaclass="Standard.Class" owner-stereotype="mref#'' {11eac153-1560-420f-a4f6-f5387b6c8a98} Infrastructure.Stereotype" is-hidden="true" label="%stereotype.TNodeTemplate.label" uid="1a20bf91-0a92-434a-9d1f-35c86788784e" is-abstract="false">
694+
<Stereotype name="TNodeTemplate" metaclass="Standard.Class" owner-stereotype="" is-hidden="true" label="%stereotype.TNodeTemplate.label" uid="1a20bf91-0a92-434a-9d1f-35c86788784e" is-abstract="false">
691695
<Icon path="res/icon/gui/node_template24.png"/>
692696
<Image path="res/icon/gui/node_template48.png"/>
693697
<PropertyTable id="TNodeTemplatePropertyTable" label="%propertytable.TNodeTemplateProperty.label" uid="de74defe-d419-4c01-9b11-563b796c0e6c">
@@ -769,7 +773,7 @@
769773
</PropertyDefinition>
770774
</PropertyTable>
771775
</Stereotype>
772-
<Stereotype name="TPolicyType" metaclass="Infrastructure.ModelElement" owner-stereotype="" is-hidden="false" label="%stereotype.TPolicyType.label" uid="b76dbc7d-8b6f-46f8-89d4-f0ea8eea40d2" is-abstract="false">
776+
<Stereotype name="TPolicyType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TPolicyType.label" uid="b76dbc7d-8b6f-46f8-89d4-f0ea8eea40d2" is-abstract="false">
773777
<Icon path="res/icon/gui/tpolicytype24.ICON.png"/>
774778
<Image path="res/icon/gui/tpolicytype48.IMAGE.png"/>
775779
<PropertyTable id="TPolicyTypePropertyPage" label="%propertytable.TPolicyTypePropertyPage.label" uid="89cd71c7-7594-4686-a240-f8226a802249">
@@ -857,7 +861,7 @@
857861
</PropertyDefinition>
858862
</PropertyTable>
859863
</Stereotype>
860-
<Stereotype name="TRequirementDefinitionType" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.TRequirementDefinitionType.label" uid="622c76d1-f337-471e-984a-2af659417163" is-abstract="false">
864+
<Stereotype name="TRequirementDefinitionType" metaclass="Standard.Class" owner-stereotype="mref#'' {fecd81a5-da41-4a07-a507-6bfaf5bbadd2} Infrastructure.Stereotype" is-hidden="false" label="%stereotype.TRequirementDefinitionType.label" uid="622c76d1-f337-471e-984a-2af659417163" is-abstract="false">
861865
<Icon path="res/icon/gui/RequirementDefinitionsType48.ICON.png"/>
862866
<Image path="res/icon/gui/RequirementDefinitionsType48.IMAGE.png"/>
863867
</Stereotype>
@@ -927,19 +931,11 @@
927931
<Icon path=""/>
928932
<Image path=""/>
929933
</Stereotype>
930-
<Stereotype name="Tgroup" metaclass="Standard.Package" owner-stereotype="" is-hidden="false" label="%stereotype.Tgroup.label" uid="572d5cb4-54c7-45d0-a9c8-3dc3677f9ef3" is-abstract="false">
931-
<Icon path="res/icon/gui/Tgroup48.ICON.png"/>
932-
<Image path="res/icon/gui/Tgroup48.png"/>
933-
</Stereotype>
934-
<Stereotype name="ToscaModel" metaclass="Standard.Package" owner-stereotype="" is-hidden="false" label="%stereotype.ToscaModel.label" uid="20565008-115d-4fad-800f-134ab276f611" is-abstract="false">
934+
<Stereotype name="ToscaElement" metaclass="Infrastructure.ModelElement" owner-stereotype="" is-hidden="false" label="%stereotype.ToscaElement.label" uid="11eac153-1560-420f-a4f6-f5387b6c8a98" is-abstract="false">
935935
<Icon path=""/>
936936
<Image path=""/>
937937
</Stereotype>
938-
<Stereotype name="TgroupType" metaclass="Standard.Class" owner-stereotype="" is-hidden="false" label="%stereotype.TgroupType.label" uid="94a5619a-6aed-4b34-a0d8-03e85419ad55" is-abstract="false">
939-
<Icon path="res/icon/gui/TgroupType24.ICON.png"/>
940-
<Image path="res/icon/gui/TgroupType48.png"/>
941-
</Stereotype>
942-
<Stereotype name="ToscaElement" metaclass="Infrastructure.ModelElement" owner-stereotype="" is-hidden="false" label="%stereotype.ToscaElement.label" uid="11eac153-1560-420f-a4f6-f5387b6c8a98" is-abstract="false">
938+
<Stereotype name="ToscaModel" metaclass="Standard.Package" owner-stereotype="" is-hidden="false" label="%stereotype.ToscaModel.label" uid="20565008-115d-4fad-800f-134ab276f611" is-abstract="false">
943939
<Icon path=""/>
944940
<Image path=""/>
945941
</Stereotype>

ToscaDesigner/src/main/conf/module_fr.properties

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ propertydefinition.TEntityTemplatePropertyTable.type.description=
176176
propertydefinition.TEntityTemplatePropertyTable.type.label=type
177177
propertydefinition.TEntityTypePropertyTable.abstract.description=
178178
propertydefinition.TEntityTypePropertyTable.abstract.label=abstract
179-
propertydefinition.TEntityTypePropertyTable.derivedFrom.description=
180-
propertydefinition.TEntityTypePropertyTable.derivedFrom.label=derivedFrom
181179
propertydefinition.TEntityTypePropertyTable.description.description=
182180
propertydefinition.TEntityTypePropertyTable.description.label=description
183181
propertydefinition.TEntityTypePropertyTable.final.description=
@@ -459,6 +457,8 @@ stereotype.TExtension.description=
459457
stereotype.TExtension.label=TExtension
460458
stereotype.TExtensions.description=
461459
stereotype.TExtensions.label=TExtensions
460+
stereotype.TGroupType.description=
461+
stereotype.TGroupType.label=TgroupType
462462
stereotype.TImplementationArtifact.description=
463463
stereotype.TImplementationArtifact.label=TImplementationArtifact
464464
stereotype.TImplementationArtifacts.description=
@@ -513,8 +513,6 @@ stereotype.TargetInterfacesType.description=
513513
stereotype.TargetInterfacesType.label=TargetInterfacesType
514514
stereotype.Tgroup.description=
515515
stereotype.Tgroup.label=Tgroup
516-
stereotype.TgroupType.description=
517-
stereotype.TgroupType.label=TgroupType
518516
stereotype.TopologyTemplateDiagram.description=
519517
stereotype.TopologyTemplateDiagram.label=TopologyTemplateDiagram
520518
stereotype.ToscaDiagram.description=

ToscaDesigner/src/main/conf/res/icon/gui/TartifactType24 (2).png renamed to ToscaDesigner/src/main/conf/res/icon/gui/TartifactType24 .png

File renamed without changes.
-576 Bytes
Binary file not shown.
484 Bytes
Binary file not shown.

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/handlers/propertypages/core/TPolicyTypePropertyPage.java

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,50 +11,49 @@
1111
import org.modelio.vcore.smkernel.mapi.MObject;
1212

1313
public class TPolicyTypePropertyPage<T extends TPolicyType> extends ToscaElementPropertyPage<T> {
14-
public TPolicyTypePropertyPage(T elt) {
15-
super(elt);
16-
// TODO Auto-generated constructor stub
17-
}
14+
public TPolicyTypePropertyPage(T elt) {
15+
super(elt);
16+
// TODO Auto-generated constructor stub
17+
}
1818

19-
@Override
20-
public void changeProperty(int row, String value) {
21-
switch (row) {
22-
23-
case 1:
24-
this._element.getElement().setName(value);
25-
;
26-
break;
27-
case 2:
28-
for (ModelElement el : TPolicyType.MdaTypes.STEREOTYPE_ELT.getExtendedElement()) {
29-
if (value.contains(el.getUuid())) {
30-
this._element.setDerivedFrom(
31-
TPolicyType.instantiate((org.modelio.metamodel.uml.statik.Attribute) el));
32-
}
33-
}
34-
break;
35-
case 3:
36-
this._element.setPolicyLanguage(value);
37-
break;
38-
39-
}
40-
}
19+
@Override
20+
public void changeProperty(int row, String value) {
21+
switch (row) {
4122

42-
@objid ("57cdfc80-a690-495d-ab16-2e8759bdd7e0")
43-
@Override
44-
public void update(IModulePropertyTable table) {
45-
super.update(table);
46-
table.addProperty("Name", _element.getElement().getName());
47-
table.addProperty("Description", _element.getDescription());
48-
table.addProperty("Derived From",
49-
this._element.getDerivedFrom() != null ? this._element.getDerivedFrom().getElement()
50-
: null,
51-
Arrays.asList(Metamodel.getMClass("Attribute")), new IMObjectFilter() {
52-
@Override
53-
public boolean accept(MObject element) {
54-
return TPolicyType.canInstantiate(element);
55-
}
56-
});
57-
table.addProperty("Policy Language", _element.getPolicyLanguage());
58-
}
23+
case 1:
24+
this._element.getElement().setName(value);
25+
;
26+
break;
27+
case 2:
28+
for (ModelElement el : TPolicyType.MdaTypes.STEREOTYPE_ELT.getExtendedElement()) {
29+
if (value.contains(el.getUuid())) {
30+
this._element
31+
.setDerivedFrom(TPolicyType.instantiate((org.modelio.metamodel.uml.statik.Attribute) el));
32+
}
33+
}
34+
break;
35+
case 3:
36+
this._element.setPolicyLanguage(value);
37+
break;
38+
39+
}
40+
}
41+
42+
@objid("57cdfc80-a690-495d-ab16-2e8759bdd7e0")
43+
@Override
44+
public void update(IModulePropertyTable table) {
45+
super.update(table);
46+
table.addProperty("Name", _element.getElement().getName());
47+
table.addProperty("Description", _element.getDescription());
48+
table.addProperty("Derived From",
49+
this._element.getDerivedFrom() != null ? this._element.getDerivedFrom().getElement() : null,
50+
Arrays.asList(Metamodel.getMClass("Attribute")), new IMObjectFilter() {
51+
@Override
52+
public boolean accept(MObject element) {
53+
return TPolicyType.canInstantiate(element);
54+
}
55+
});
56+
table.addProperty("Policy Language", _element.getPolicyLanguage());
57+
}
5958

6059
}

ToscaDesigner/src/main/java/fr/softeam/toscadesigner/handlers/propertypages/serviceTemplate/TCapabilityDefinitionsTypePropertyPage.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
package fr.softeam.toscadesigner.handlers.propertypages.serviceTemplate;
22

33
import com.modeliosoft.modelio.javadesigner.annotations.objid;
4+
5+
import fr.softeam.toscadesigner.api.tosca.infrastructure.modelelement.TPolicyType;
46
import fr.softeam.toscadesigner.api.tosca.standard.class_.TCapabilityDefinitionsType;
57
import fr.softeam.toscadesigner.handlers.propertypages.core.ToscaElementPropertyPage;
8+
9+
import java.util.Arrays;
10+
611
import org.modelio.api.module.propertiesPage.IModulePropertyTable;
12+
import org.modelio.metamodel.Metamodel;
13+
import org.modelio.vcore.session.api.model.IMObjectFilter;
14+
import org.modelio.vcore.smkernel.mapi.MObject;
715

816
@objid ("0f47e5e9-4fff-49ec-86bc-786016f24d85")
917
public class TCapabilityDefinitionsTypePropertyPage<T extends TCapabilityDefinitionsType> extends ToscaElementPropertyPage<T> {
@@ -29,6 +37,16 @@ public void changeProperty(int row, String value) {
2937
public void update(IModulePropertyTable table) {
3038
super.update(table);
3139
table.addProperty("Name", _element.getElement().getName());
40+
/*
41+
table.addProperty("Derived From",
42+
this._element.getElement().getDerivedFrom() != null ? this._element.getElement().getDerivedFrom() : null,
43+
Arrays.asList(Metamodel.getMClass("Attribute")), new IMObjectFilter() {
44+
@Override
45+
public boolean accept(MObject element) {
46+
return TPolicyType.canInstantiate(element);
47+
}
48+
});
49+
*/
3250
}
3351

3452
}
-87 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)