Bug 527384 - Create specific layers for palette tools in OSLC Domain and Vocabulary Diagram. Created separate functionality specific layers that can be enabled/disabled by the users as per the requirements. Change-Id: Ia146c97edce5531ec1a7dde0655200855c154424 Signed-off-by: Yash Khatri <yash.khatri@scania.com>
diff --git a/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign b/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign index 39b8550..498c65a 100644 --- a/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign +++ b/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign
@@ -1,10 +1,10 @@ <?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" 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" name="ToolchainModel" version="11.1.1.201610211630"> <ownedViewpoints name="ToolchainViewpoint"> - <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DropDomainSpecification']" name="SpecificationDiagram" initialisation="true" domainClass="adaptorinterface.Specification" rootExpression="[if (self.eClass().name = 'Toolchain') then self.eGet('specification').oclAsType(Specification) else self endif/]" enablePopupBars="true"> + <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DropDomainSpecification']" name="SpecificationDiagram" initialisation="true" domainClass="adaptorinterface.Specification" rootExpression="[if (self.eClass().name = 'Toolchain') then self.eGet('specification').oclAsType(Specification) else self endif/]" enablePopupBars="true"> <diagramInitialisation/> <defaultLayer name="Default"> - <edgeMappings name="Specification.ResourceToReferenceProperty" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DeleteResourceToReferenceProperty']" semanticElements="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::Resource}->includes(p.valueType))->select(p : ResourceProperty | p.range->includes(view.targetNode.oclAsType(DNodeList).target.oclAsType(Resource)))/]" sourceMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetFinderExpression="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::Resource}->includes(p.valueType)).range /]"> + <edgeMappings name="Specification.ResourceToReferenceProperty" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DeleteResourceToReferenceProperty']" semanticElements="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::Resource}->includes(p.valueType))->select(p : ResourceProperty | p.range->includes(view.targetNode.oclAsType(DNodeList).target.oclAsType(Resource)))/]" sourceMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetFinderExpression="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::Resource}->includes(p.valueType)).range /]"> <style sizeComputationExpression="2"> <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> <centerLabelStyleDescription labelSize="9" showIcon="false" labelExpression="[view.semanticElements.oclAsType(ResourceProperty).name/]"> @@ -15,7 +15,7 @@ </endLabelStyleDescription> </style> </edgeMappings> - <edgeMappings name="Specification.ResourceToLocalReferenceProperty" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DeleteResourceToReferenceProperty']" semanticElements="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::LocalResource}->includes(p.valueType))->select(p : ResourceProperty | p.range->includes(view.targetNode.oclAsType(DNodeList).target.oclAsType(Resource)))/]" sourceMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetFinderExpression="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::LocalResource}->includes(p.valueType)).range /]"> + <edgeMappings name="Specification.ResourceToLocalReferenceProperty" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DeleteResourceToReferenceProperty']" semanticElements="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::LocalResource}->includes(p.valueType))->select(p : ResourceProperty | p.range->includes(view.targetNode.oclAsType(DNodeList).target.oclAsType(Resource)))/]" sourceMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" targetFinderExpression="[self.resourceProperties->select(p : ResourceProperty | Sequence{ResourcePropertyValueType::LocalResource}->includes(p.valueType)).range /]"> <style lineStyle="dot" sizeComputationExpression="2"> <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> <centerLabelStyleDescription labelSize="9" showIcon="false" labelExpression="['Local: ' + view.semanticElements.oclAsType(ResourceProperty).name/]"> @@ -34,9 +34,9 @@ </centerLabelStyleDescription> </style> </edgeMappings> - <containerMappings name="Specification.DomainSpecification" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DeleteDomainSpecification']" labelDirectEdit="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DirectEditName']" createElements="false" semanticElements="[Set{self, self.generationSetting}/]" domainClass="adaptorinterface.DomainSpecification" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.MoveResource'] //@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.MoveProperty']"> - <subContainerMappings name="Specification.DomainSpecification.Resource" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DeleteResource']" semanticCandidatesExpression="feature:eAllContents" domainClass="adaptorinterface.Resource" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.RelatePropertyToResource']" childrenPresentation="List"> - <subNodeMappings name="Specification.DomainSpecification.Resource.LiteralProperty" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DeleteResourceLiteralPropertySubnode']" semanticCandidatesExpression="[self.resourceProperties->select(p : ResourceProperty | (not Sequence{ResourcePropertyValueType::Resource, ResourcePropertyValueType::LocalResource}->includes(p.valueType))._or((Sequence{ResourcePropertyValueType::Resource, ResourcePropertyValueType::LocalResource}->includes(p.valueType))._and(p.range->size() = 0)))/]" domainClass="adaptorinterface.ResourceProperty"> + <containerMappings name="Specification.DomainSpecification" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DeleteDomainSpecification']" labelDirectEdit="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DirectEditName']" createElements="false" semanticElements="[Set{self, self.generationSetting}/]" domainClass="adaptorinterface.DomainSpecification" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.MoveResource'] //@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.MoveProperty']"> + <subContainerMappings name="Specification.DomainSpecification.Resource" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DeleteResource']" semanticCandidatesExpression="feature:eAllContents" domainClass="adaptorinterface.Resource" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.RelatePropertyToResource']" childrenPresentation="List"> + <subNodeMappings name="Specification.DomainSpecification.Resource.LiteralProperty" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DeleteResourceLiteralPropertySubnode']" semanticCandidatesExpression="[self.resourceProperties->select(p : ResourceProperty | (not Sequence{ResourcePropertyValueType::Resource, ResourcePropertyValueType::LocalResource}->includes(p.valueType))._or((Sequence{ResourcePropertyValueType::Resource, ResourcePropertyValueType::LocalResource}->includes(p.valueType))._and(p.range->size() = 0)))/]" domainClass="adaptorinterface.ResourceProperty"> <style xsi:type="style:SquareDescription" labelSize="9" showIcon="false" labelExpression="[(if (self.eContainer(DomainSpecification) = view.eContainer().oclAsType(DNodeList).target.oclAsType(Resource).eContainer(DomainSpecification)) then '' else self.eContainer(DomainSpecification).namespacePrefix.name + ':' endif) + name + ': ' + valueType + (if (Sequence{ResourcePropertyOccurs::oneOrMany, ResourcePropertyOccurs::zeroOrMany}->includes(occurs)) then ' []' else '' endif)/]" labelAlignment="LEFT" 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']"/> @@ -58,7 +58,7 @@ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/> </style> </subContainerMappings> - <subContainerMappings name="Specification.DomainSpecification.PropertiesList" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.DeletePropertiesList']" semanticCandidatesExpression="[self/]" domainClass="adaptorinterface.DomainSpecification" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.2/@ownedTools[name='Specification.MoveProperty']" childrenPresentation="List"> + <subContainerMappings name="Specification.DomainSpecification.PropertiesList" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.DeletePropertiesList']" semanticCandidatesExpression="[self/]" domainClass="adaptorinterface.DomainSpecification" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@toolSections.1/@ownedTools[name='Specification.MoveProperty']" childrenPresentation="List"> <subNodeMappings name="Specification.DomainSpecification.PropertiesList.Property" semanticCandidatesExpression="feature:eAllContents" domainClass="adaptorinterface.ResourceProperty"> <conditionnalStyles predicateExpression="[not Sequence{ResourcePropertyValueType::Resource, ResourcePropertyValueType::LocalResource}->includes(self.valueType)/]"> <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="[name + ': ' + valueType/]" labelAlignment="LEFT" labelPosition="node" resizeKind="NSEW"> @@ -116,120 +116,6 @@ </firstModelOperations> </initialOperation> </ownedTools> - <ownedTools xsi:type="tool:ContainerCreationDescription" name="Specification.CreateResource" label="Resource" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconResource.png"> - <variable name="container"/> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.Resource" referenceName="resources"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Resource' + container.resources->size()/]"/> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLiteralProperty" label="Literal Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/literalProperty_icon.png"> - <variable name="container"/> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Property' + container.resourceProperties->size()/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::String /]"/> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateReferenceProperty" label="Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/referenceProperty_icon.png"> - <variable name="container"> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> - </variable> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::Resource /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['relatesTo' + propertyRange.name.toUpperFirst()/]"/> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLocalReferenceProperty" label="Local Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/localReferenceProperty_icon.png"> - <variable name="container"> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> - </variable> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::LocalResource /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['relatesTo' + instance.range.name.toUpperFirst()/]"/> - </firstModelOperations> - </initialOperation> - </ownedTools> - </toolSections> - <toolSections name="CreateFromVocabulary" label="Create from Vocabulary"> - <ownedTools xsi:type="tool:ContainerCreationDescription" name="Specification.CreateResourceFromVocabulary" label="Resource" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconResource.png"> - <variable name="container"> - <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="classToBeDescribed" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Class))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Class))/]" message="Select the rdfs:Class being described"/> - </variable> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:If" conditionExpression="[classToBeDescribed.oclIsTypeOf(Class)/]"> - <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.Resource" referenceName="resources"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[classToBeDescribed.name/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="describes" valueExpression="[classToBeDescribed/]"/> - </subModelOperations> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLiteralPropertyFromVocabulary" label="Literal Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/literalProperty_icon.png"> - <variable name="container"> - <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyToBeReferenced" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Property))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Property))/]" message="Select the rdf:Property being referenced"/> - </variable> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:If" conditionExpression="[propertyToBeReferenced.oclIsTypeOf(Property)/]"> - <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[propertyToBeReferenced.name/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::String /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="propertyDefinition" valueExpression="[propertyToBeReferenced/]"/> - </subModelOperations> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateReferencePropertyFromVocabulary" label="Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/referenceProperty_icon.png"> - <variable name="container"> - <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyToBeReferenced" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Property))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Property))/]" message="Select the rdf:Property being referenced"/> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> - </variable> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:If" conditionExpression="[propertyToBeReferenced.oclIsTypeOf(Property)/]"> - <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::Resource /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[propertyToBeReferenced.name/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="propertyDefinition" valueExpression="[propertyToBeReferenced/]"/> - </subModelOperations> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLocalReferencePropertyFromVocabulary" label="Local Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/localReferenceProperty_icon.png"> - <variable name="container"> - <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyToBeReferenced" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Property))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Property))/]" message="Select the rdf:Property being referenced"/> - <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> - </variable> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:If" conditionExpression="[propertyToBeReferenced.oclIsTypeOf(Property)/]"> - <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::LocalResource /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[propertyToBeReferenced.name/]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="propertyDefinition" valueExpression="[propertyToBeReferenced/]"/> - </subModelOperations> - </firstModelOperations> - </initialOperation> - </ownedTools> </toolSections> <toolSections name="Operations"> <ownedTools xsi:type="tool:ContainerDropDescription" name="Specification.DropDomainSpecification" mappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']" dragSource="BOTH"> @@ -390,6 +276,126 @@ </ownedTools> </toolSections> </defaultLayer> + <additionalLayers name="Specification.CreateDefault" label="Default Layer" activeByDefault="true"> + <toolSections name="Create"> + <ownedTools xsi:type="tool:ContainerCreationDescription" name="Specification.CreateResource" label="Resource" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconResource.png"> + <variable name="container"/> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.Resource" referenceName="resources"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Resource' + container.resources->size()/]"/> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLiteralProperty" label="Literal Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/literalProperty_icon.png"> + <variable name="container"/> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Property' + container.resourceProperties->size()/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::String /]"/> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateReferenceProperty" label="Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/referenceProperty_icon.png"> + <variable name="container"> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> + </variable> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::Resource /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['relatesTo' + propertyRange.name.toUpperFirst()/]"/> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLocalReferenceProperty" label="Local Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/localReferenceProperty_icon.png"> + <variable name="container"> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> + </variable> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::LocalResource /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['relatesTo' + instance.range.name.toUpperFirst()/]"/> + </firstModelOperations> + </initialOperation> + </ownedTools> + </toolSections> + </additionalLayers> + <additionalLayers name="Specification.CreateFromVocabulary" label="Vocabulary Layer"> + <toolSections name="CreateFromVocabulary" label="Create from Vocabulary"> + <ownedTools xsi:type="tool:ContainerCreationDescription" name="Specification.CreateResourceFromVocabulary" label="Resource" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.Resource']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconResource.png"> + <variable name="container"> + <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="classToBeDescribed" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Class))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Class))/]" message="Select the rdfs:Class being described"/> + </variable> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:If" conditionExpression="[classToBeDescribed.oclIsTypeOf(Class)/]"> + <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.Resource" referenceName="resources"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[classToBeDescribed.name/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="describes" valueExpression="[classToBeDescribed/]"/> + </subModelOperations> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLiteralPropertyFromVocabulary" label="Literal Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/literalProperty_icon.png"> + <variable name="container"> + <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyToBeReferenced" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Property))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Property))/]" message="Select the rdf:Property being referenced"/> + </variable> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:If" conditionExpression="[propertyToBeReferenced.oclIsTypeOf(Property)/]"> + <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[propertyToBeReferenced.name/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::String /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="propertyDefinition" valueExpression="[propertyToBeReferenced/]"/> + </subModelOperations> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateReferencePropertyFromVocabulary" label="Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/referenceProperty_icon.png"> + <variable name="container"> + <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyToBeReferenced" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Property))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Property))/]" message="Select the rdf:Property being referenced"/> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> + </variable> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:If" conditionExpression="[propertyToBeReferenced.oclIsTypeOf(Property)/]"> + <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::Resource /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[propertyToBeReferenced.name/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="propertyDefinition" valueExpression="[propertyToBeReferenced/]"/> + </subModelOperations> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:NodeCreationDescription" name="Specification.CreateLocalReferencePropertyFromVocabulary" label="Local Reference Property" nodeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']/@subContainerMappings[name='Specification.DomainSpecification.PropertiesList']/@subNodeMappings[name='Specification.DomainSpecification.PropertiesList.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/localReferenceProperty_icon.png"> + <variable name="container"> + <subVariables xsi:type="tool_1:AcceleoVariable" name="loadedVocabularies" computationExpression="service:getLoadedVocabularies()"/> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyToBeReferenced" candidatesExpression="[loadedVocabularies->collect(v : Vocabulary | Set{v}->union(v.terms))->flatten()->asSet()/]" tree="true" rootExpression="[loadedVocabularies->select(v : Vocabulary | v.terms->select(t : Term | t.oclIsTypeOf(Property))->notEmpty() ) /]" childrenExpression="[self.oclAsType(Vocabulary).terms->select (t : Term | t.oclIsTypeOf(Property))/]" message="Select the rdf:Property being referenced"/> + <subVariables xsi:type="tool_1:SelectModelElementVariable" name="propertyRange" candidatesExpression="[container.oclAsType(DomainSpecification).eContainer(Specification).domainSpecifications.resources/]" message="Select range of the reference property"/> + </variable> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:If" conditionExpression="[propertyToBeReferenced.oclIsTypeOf(Property)/]"> + <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.ResourceProperty" referenceName="resourceProperties"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="valueType" valueExpression="[ResourcePropertyValueType::LocalResource /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="range" valueExpression="[propertyRange/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="[propertyToBeReferenced.name/]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="propertyDefinition" valueExpression="[propertyToBeReferenced/]"/> + </subModelOperations> + </firstModelOperations> + </initialOperation> + </ownedTools> + </toolSections> + </additionalLayers> </ownedRepresentations> <ownedRepresentations xsi:type="description_1:DiagramDescription" name="ToolchainDiagram" initialisation="true" domainClass="toolchain.Toolchain"> <diagramInitialisation> @@ -899,7 +905,7 @@ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/> </style> </containerMappings> - <toolSections name="Vocabularies.Create" label="Create"> + <toolSections name="Vocabularies.CreateVocabulary" label="Create"> <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateVocabulary" label="Vocabulary" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/VocabularyIcon.png"> <variable name="container"/> <viewVariable name="containerView"/> @@ -913,28 +919,6 @@ </firstModelOperations> </initialOperation> </ownedTools> - <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateClass" label="Class" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Class']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconClass.png"> - <variable name="container"/> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="vocabulary.Class" referenceName="terms"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="['Class ' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Class'))->size() /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Class' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Class'))->size() /]"/> - </firstModelOperations> - </initialOperation> - </ownedTools> - <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateProperty" label="Property" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconProperty.png"> - <variable name="container"/> - <viewVariable name="containerView"/> - <initialOperation> - <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container"> - <subModelOperations xsi:type="tool_1:CreateInstance" typeName="vocabulary.Property" referenceName="terms"> - <subModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="['Property ' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Property'))->size() /]"/> - <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Property' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Property'))->size() /]"/> - </subModelOperations> - </firstModelOperations> - </initialOperation> - </ownedTools> </toolSections> <toolSections name="Operations"> <ownedTools xsi:type="tool:DirectEditLabel" name="Vocabularies.EditVocabularyLabel"> @@ -1049,6 +1033,32 @@ </ownedTools> </toolSections> </defaultLayer> + <additionalLayers name="Vocabulary.CreateDefault" label="Default Layer" activeByDefault="true"> + <toolSections name="Vocabularies.CreateTerms" label="Create"> + <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateClass" label="Class" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Class']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconClass.png"> + <variable name="container"/> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:CreateInstance" typeName="vocabulary.Class" referenceName="terms"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="['Class ' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Class'))->size() /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Class' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Class'))->size() /]"/> + </firstModelOperations> + </initialOperation> + </ownedTools> + <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateProperty" label="Property" containerMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Property']" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconProperty.png"> + <variable name="container"/> + <viewVariable name="containerView"/> + <initialOperation> + <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container"> + <subModelOperations xsi:type="tool_1:CreateInstance" typeName="vocabulary.Property" referenceName="terms"> + <subModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="['Property ' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Property'))->size() /]"/> + <subModelOperations xsi:type="tool_1:SetValue" featureName="name" valueExpression="['Property' + container.terms->select(c | c.eClass().name.equalsIgnoreCase('Property'))->size() /]"/> + </subModelOperations> + </firstModelOperations> + </initialOperation> + </ownedTools> + </toolSections> + </additionalLayers> </ownedRepresentations> <ownedJavaExtensions qualifiedClassName="org::eclipse::lyo::tools::toolchain::design::queries"/> <ownedJavaExtensions qualifiedClassName="org::eclipse::lyo::tools::toolchain::design::DialogInputServices"/>