Merge "Bug 526716 - codegenerator.ui plugin fails to compile due to missing classpath"
diff --git a/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.ecore b/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.ecore
index 1a800bb..c9f38ad 100644
--- a/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.ecore
+++ b/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.ecore
@@ -8,5 +8,7 @@
eType="ecore:EClass adaptorInterface.ecore#//AdaptorInterface" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="specification" lowerBound="1"
eType="ecore:EClass adaptorInterface.ecore#//Specification" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="vocabularies" lowerBound="1"
+ eType="ecore:EClass vocabulary.ecore#//Vocabularies" containment="true"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.genmodel b/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.genmodel
index c41035f..149ee81 100644
--- a/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.genmodel
+++ b/org.eclipse.lyo.oslc4j.adaptormodel/model/toolchain.genmodel
@@ -5,14 +5,15 @@
modelName="Toolchain" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="7.0" copyrightFields="false"
editPluginID="org.eclipse.lyo.tools.toolchain.edit" editorPluginID="org.eclipse.lyo.tools.toolchain.editor"
- usedGenPackages="adaptorInterface.genmodel#//adaptorinterface" interfaceNamePattern=""
- operationReflection="true" importOrganizing="true">
+ usedGenPackages="adaptorInterface.genmodel#//adaptorinterface vocabulary.genmodel#//vocabulary"
+ interfaceNamePattern="" operationReflection="true" importOrganizing="true">
<foreignModel>toolchain.ecore</foreignModel>
<genPackages prefix="Toolchain" disposableProviderFactory="true" ecorePackage="toolchain.ecore#/">
<genClasses ecoreClass="toolchain.ecore#//Toolchain">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute toolchain.ecore#//Toolchain/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference toolchain.ecore#//Toolchain/adaptorInterfaces"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference toolchain.ecore#//Toolchain/specification"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference toolchain.ecore#//Toolchain/vocabularies"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.aird b/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.aird
new file mode 100644
index 0000000..50c6833
--- /dev/null
+++ b/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.aird
@@ -0,0 +1,438 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI 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:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis xmi:id="_kjA5YJI3EeeVY5ObIOy2aA" selectedViews="_mX-28JI3EeeVY5ObIOy2aA _mYqzcJI3EeeVY5ObIOy2aA _qk7YgJI3EeeVY5ObIOy2aA _qlD7YJI3EeeVY5ObIOy2aA" version="12.0.0.201704271200">
+ <semanticResources>vocabulary.ecore</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_mX-28JI3EeeVY5ObIOy2aA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_Ca4aV65uEee4_qDD-Ly9Og" name="vocabulary class diagram" repPath="#_Ca4aUK5uEee4_qDD-Ly9Og">
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
+ <target xmi:type="ecore:EPackage" href="vocabulary.ecore#/"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_mYqzcJI3EeeVY5ObIOy2aA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/resource/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign#//@ownedViewpoints[name='ToolchainViewpoint']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_qk7YgJI3EeeVY5ObIOy2aA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Review']"/>
+ </ownedViews>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_qlD7YJI3EeeVY5ObIOy2aA">
+ <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']"/>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram xmi:id="_Ca4aUK5uEee4_qDD-Ly9Og" name="vocabulary class diagram">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_Ca4aUa5uEee4_qDD-Ly9Og" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_Ca4aUq5uEee4_qDD-Ly9Og">
+ <computedStyleDescriptions xmi:type="style:BundledImageDescription" xmi:id="_Cq82rq5uEee4_qDD-Ly9Og" labelExpression="service:render" labelAlignment="LEFT" tooltipExpression="service:renderTooltip" sizeComputationExpression="1">
+ <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelFormat>bold</labelFormat>
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </computedStyleDescriptions>
+ <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_Cq82xa5uEee4_qDD-Ly9Og" sourceArrow="FillDiamond" routingStyle="manhattan">
+ <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_Cq82xq5uEee4_qDD-Ly9Og" showIcon="false" labelExpression="service:render">
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_Cq82x65uEee4_qDD-Ly9Og" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
+ <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
+ </endLabelStyleDescription>
+ </computedStyleDescriptions>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_Ca4aWK5uEee4_qDD-Ly9Og" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_Ca4aWa5uEee4_qDD-Ly9Og" type="Sirius" element="_Ca4aUK5uEee4_qDD-Ly9Og" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_CrGAm65uEee4_qDD-Ly9Og" type="2003" element="_Cq82oK5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrGAnq5uEee4_qDD-Ly9Og" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_CrGAn65uEee4_qDD-Ly9Og" type="7004">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CrGAoK5uEee4_qDD-Ly9Og"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CrGAoa5uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CrGAnK5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGAna5uEee4_qDD-Ly9Og" x="405" y="45"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAoq5uEee4_qDD-Ly9Og" type="2003" element="_Cq82oq5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrGApa5uEee4_qDD-Ly9Og" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_CrGApq5uEee4_qDD-Ly9Og" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_CrGAxa5uEee4_qDD-Ly9Og" type="3010" element="_Cq82ra5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGAxq5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGAx65uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAyK5uEee4_qDD-Ly9Og" type="3010" element="_Cq82sK5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGAya5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGAyq5uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAy65uEee4_qDD-Ly9Og" type="3010" element="_Cq82sq5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGAzK5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGAza5uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAzq5uEee4_qDD-Ly9Og" type="3010" element="_Cq82tK5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGAz65uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGA0K5uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGA0a5uEee4_qDD-Ly9Og" type="3010" element="_Cq82tq5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGA0q5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGA065uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CrGAp65uEee4_qDD-Ly9Og"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CrGAqK5uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CrGAo65uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGApK5uEee4_qDD-Ly9Og" x="367" y="210"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAqa5uEee4_qDD-Ly9Og" type="2003" element="_Cq82pK5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrGArK5uEee4_qDD-Ly9Og" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_CrGAra5uEee4_qDD-Ly9Og" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_CrGA1K5uEee4_qDD-Ly9Og" type="3010" element="_Cq82uK5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGA1a5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGA1q5uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGA165uEee4_qDD-Ly9Og" type="3010" element="_Cq82uq5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGA2K5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGA2a5uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGA2q5uEee4_qDD-Ly9Og" type="3010" element="_Cq82vK5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGA265uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" bold="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGA3K5uEee4_qDD-Ly9Og"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGA3a5uEee4_qDD-Ly9Og" type="3010" element="_Cq82vq5uEee4_qDD-Ly9Og">
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGA3q5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CrGA365uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CrGArq5uEee4_qDD-Ly9Og"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CrGAr65uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CrGAqq5uEee4_qDD-Ly9Og" fontName="Segoe UI" fontHeight="8" italic="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGAq65uEee4_qDD-Ly9Og" x="435" y="390" width="153" height="108"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAsK5uEee4_qDD-Ly9Og" type="2003" element="_Cq82pq5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrGAs65uEee4_qDD-Ly9Og" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_CrGAtK5uEee4_qDD-Ly9Og" type="7004">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CrGAta5uEee4_qDD-Ly9Og"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CrGAtq5uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CrGAsa5uEee4_qDD-Ly9Og" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGAsq5uEee4_qDD-Ly9Og" x="315" y="570"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGAt65uEee4_qDD-Ly9Og" type="2003" element="_Cq82qa5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrGAuq5uEee4_qDD-Ly9Og" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_CrGAu65uEee4_qDD-Ly9Og" type="7004">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_CrGAvK5uEee4_qDD-Ly9Og"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_CrGAva5uEee4_qDD-Ly9Og"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_CrGAuK5uEee4_qDD-Ly9Og" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGAua5uEee4_qDD-Ly9Og" x="555" y="585"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Ca4aWq5uEee4_qDD-Ly9Og"/>
+ <edges xmi:type="notation:Edge" xmi:id="_CrGA5q5uEee4_qDD-Ly9Og" type="4001" element="_Cq82xK5uEee4_qDD-Ly9Og" source="_CrGAm65uEee4_qDD-Ly9Og" target="_CrGAoq5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrGA6q5uEee4_qDD-Ly9Og" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGA665uEee4_qDD-Ly9Og" x="-86" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGA7K5uEee4_qDD-Ly9Og" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGA7a5uEee4_qDD-Ly9Og" x="-26" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrGA7q5uEee4_qDD-Ly9Og" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrGA765uEee4_qDD-Ly9Og" x="-148" y="-10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_CrGA565uEee4_qDD-Ly9Og" routing="Rectilinear"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrGA6K5uEee4_qDD-Ly9Og" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CrGA6a5uEee4_qDD-Ly9Og" points="[12, 98, -15, -182]$[12, 165, -15, -115]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxkK5uEee4_qDD-Ly9Og" id="(0.5,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxka5uEee4_qDD-Ly9Og" id="(0.5,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_CrPxnq5uEee4_qDD-Ly9Og" type="4001" element="_Cq82z65uEee4_qDD-Ly9Og" source="_CrGAoq5uEee4_qDD-Ly9Og" target="_CrGAqa5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrPxoq5uEee4_qDD-Ly9Og" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxo65uEee4_qDD-Ly9Og" x="-5" y="-24"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPxpK5uEee4_qDD-Ly9Og" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxpa5uEee4_qDD-Ly9Og" x="12"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPxpq5uEee4_qDD-Ly9Og" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxp65uEee4_qDD-Ly9Og" x="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_CrPxn65uEee4_qDD-Ly9Og" routing="Rectilinear"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrPxoK5uEee4_qDD-Ly9Og" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CrPxoa5uEee4_qDD-Ly9Og" points="[31, 58, 16, -114]$[31, 123, 16, -49]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxqK5uEee4_qDD-Ly9Og" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxqa5uEee4_qDD-Ly9Og" id="(0.4735099337748344,0.46226415094339623)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_CrPxtq5uEee4_qDD-Ly9Og" type="4001" element="_Cq82165uEee4_qDD-Ly9Og" source="_CrGAsK5uEee4_qDD-Ly9Og" target="_CrGAsK5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrPxuq5uEee4_qDD-Ly9Og" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxu65uEee4_qDD-Ly9Og" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPxvK5uEee4_qDD-Ly9Og" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxva5uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPxvq5uEee4_qDD-Ly9Og" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxv65uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_CrPxt65uEee4_qDD-Ly9Og" routing="Rectilinear"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrPxuK5uEee4_qDD-Ly9Og" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CrPxua5uEee4_qDD-Ly9Og" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxwK5uEee4_qDD-Ly9Og" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxwa5uEee4_qDD-Ly9Og" id="(0.5,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_CrPxwq5uEee4_qDD-Ly9Og" type="4001" element="_Cq82265uEee4_qDD-Ly9Og" source="_CrGAt65uEee4_qDD-Ly9Og" target="_CrGAt65uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrPxxq5uEee4_qDD-Ly9Og" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxx65uEee4_qDD-Ly9Og" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPxyK5uEee4_qDD-Ly9Og" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxya5uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPxyq5uEee4_qDD-Ly9Og" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPxy65uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_CrPxw65uEee4_qDD-Ly9Og" routing="Rectilinear"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrPxxK5uEee4_qDD-Ly9Og" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CrPxxa5uEee4_qDD-Ly9Og" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxzK5uEee4_qDD-Ly9Og" id="(0.5,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPxza5uEee4_qDD-Ly9Og" id="(0.5,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_CrPxzq5uEee4_qDD-Ly9Og" type="4001" element="_CrGAkK5uEee4_qDD-Ly9Og" source="_CrGAsK5uEee4_qDD-Ly9Og" target="_CrGAqa5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrPx0q5uEee4_qDD-Ly9Og" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPx065uEee4_qDD-Ly9Og" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPx1K5uEee4_qDD-Ly9Og" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPx1a5uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPx1q5uEee4_qDD-Ly9Og" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPx165uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_CrPxz65uEee4_qDD-Ly9Og" routing="Tree"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrPx0K5uEee4_qDD-Ly9Og" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CrPx0a5uEee4_qDD-Ly9Og" points="[0, 0, -52, 60]$[52, -60, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPx2K5uEee4_qDD-Ly9Og" id="(0.5,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPx2a5uEee4_qDD-Ly9Og" id="(0.4702443480246632,0.9245283018867925)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_CrPx2q5uEee4_qDD-Ly9Og" type="4001" element="_CrGAl65uEee4_qDD-Ly9Og" source="_CrGAt65uEee4_qDD-Ly9Og" target="_CrGAqa5uEee4_qDD-Ly9Og">
+ <children xmi:type="notation:Node" xmi:id="_CrPx3q5uEee4_qDD-Ly9Og" type="6001">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPx365uEee4_qDD-Ly9Og" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPx4K5uEee4_qDD-Ly9Og" type="6002">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPx4a5uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_CrPx4q5uEee4_qDD-Ly9Og" type="6003">
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CrPx465uEee4_qDD-Ly9Og" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_CrPx265uEee4_qDD-Ly9Og" routing="Tree"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_CrPx3K5uEee4_qDD-Ly9Og" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CrPx3a5uEee4_qDD-Ly9Og" points="[0, 0, -232, 60]$[232, -60, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPx5K5uEee4_qDD-Ly9Og" id="(0.5,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CrPx5a5uEee4_qDD-Ly9Og" id="(0.4702443480246632,0.9245283018867925)"/>
+ </edges>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_Cq82oK5uEee4_qDD-Ly9Og" name="Vocabularies" tooltipText="" outgoingEdges="_Cq82xK5uEee4_qDD-Ly9Og" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Vocabularies"/>
+ <semanticElements xmi:type="ecore:EClass" href="vocabulary.ecore#//Vocabularies"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_Cq82oa5uEee4_qDD-Ly9Og" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_Cq82oq5uEee4_qDD-Ly9Og" name="Vocabulary" tooltipText="" outgoingEdges="_Cq82z65uEee4_qDD-Ly9Og" incomingEdges="_Cq82xK5uEee4_qDD-Ly9Og" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Vocabulary"/>
+ <semanticElements xmi:type="ecore:EClass" href="vocabulary.ecore#//Vocabulary"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_Cq82o65uEee4_qDD-Ly9Og" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82ra5uEee4_qDD-Ly9Og" name="namespaceURI : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/namespaceURI"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/namespaceURI"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82r65uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82sK5uEee4_qDD-Ly9Og" name="label : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/label"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/label"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82sa5uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82sq5uEee4_qDD-Ly9Og" name="description : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/description"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/description"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82s65uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82tK5uEee4_qDD-Ly9Og" name="source : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/source"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/source"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82ta5uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82tq5uEee4_qDD-Ly9Og" name="preferredNamespacePrefix : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/preferredNamespacePrefix"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Vocabulary/preferredNamespacePrefix"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82t65uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_Cq82pK5uEee4_qDD-Ly9Og" name="Term" tooltipText="" incomingEdges="_Cq82z65uEee4_qDD-Ly9Og _CrGAkK5uEee4_qDD-Ly9Og _CrGAl65uEee4_qDD-Ly9Og" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Term"/>
+ <semanticElements xmi:type="ecore:EClass" href="vocabulary.ecore#//Term"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_Cq82pa5uEee4_qDD-Ly9Og" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228">
+ <labelFormat>italic</labelFormat>
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82uK5uEee4_qDD-Ly9Og" name="name : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/name"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/name"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82ua5uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82uq5uEee4_qDD-Ly9Og" name="label : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/label"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/label"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82u65uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82vK5uEee4_qDD-Ly9Og" name="comment : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/comment"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/comment"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82va5uEee4_qDD-Ly9Og" labelAlignment="LEFT" description="_Cq82rq5uEee4_qDD-Ly9Og">
+ <labelFormat>bold</labelFormat>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Cq82vq5uEee4_qDD-Ly9Og" name="seeAlso : EString" tooltipText="">
+ <target xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/seeAlso"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="vocabulary.ecore#//Term/seeAlso"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Cq82v65uEee4_qDD-Ly9Og" labelAlignment="LEFT">
+ <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_Cq82pq5uEee4_qDD-Ly9Og" name="Clazz" tooltipText="" outgoingEdges="_Cq82165uEee4_qDD-Ly9Og _CrGAkK5uEee4_qDD-Ly9Og" incomingEdges="_Cq82165uEee4_qDD-Ly9Og" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Clazz"/>
+ <semanticElements xmi:type="ecore:EClass" href="vocabulary.ecore#//Clazz"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ujNpUK6OEee4_qDD-Ly9Og" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_Cq82qa5uEee4_qDD-Ly9Og" name="Property" tooltipText="" outgoingEdges="_Cq82265uEee4_qDD-Ly9Og _CrGAl65uEee4_qDD-Ly9Og" incomingEdges="_Cq82265uEee4_qDD-Ly9Og" width="12" height="10">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Property"/>
+ <semanticElements xmi:type="ecore:EClass" href="vocabulary.ecore#//Property"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ujNpUa6OEee4_qDD-Ly9Og" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
+ <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Cq82xK5uEee4_qDD-Ly9Og" name="[0..*] vocabularies" sourceNode="_Cq82oK5uEee4_qDD-Ly9Og" targetNode="_Cq82oq5uEee4_qDD-Ly9Og">
+ <target xmi:type="ecore:EReference" href="vocabulary.ecore#//Vocabularies/vocabularies"/>
+ <semanticElements xmi:type="ecore:EReference" href="vocabulary.ecore#//Vocabularies/vocabularies"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_Cq82yK5uEee4_qDD-Ly9Og" description="_Cq82xa5uEee4_qDD-Ly9Og" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_Cq82ya5uEee4_qDD-Ly9Og" showIcon="false">
+ <customFeatures>labelSize</customFeatures>
+ </centerLabelStyle>
+ <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_Cq82yq5uEee4_qDD-Ly9Og" showIcon="false" labelColor="39,76,114">
+ <customFeatures>labelSize</customFeatures>
+ </endLabelStyle>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Cq82z65uEee4_qDD-Ly9Og" name="[0..*] terms" sourceNode="_Cq82oq5uEee4_qDD-Ly9Og" targetNode="_Cq82pK5uEee4_qDD-Ly9Og">
+ <target xmi:type="ecore:EReference" href="vocabulary.ecore#//Vocabulary/terms"/>
+ <semanticElements xmi:type="ecore:EReference" href="vocabulary.ecore#//Vocabulary/terms"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_Cq820K5uEee4_qDD-Ly9Og" description="_Cq82xa5uEee4_qDD-Ly9Og" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_Cq820a5uEee4_qDD-Ly9Og" showIcon="false">
+ <customFeatures>labelSize</customFeatures>
+ </centerLabelStyle>
+ <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_Cq820q5uEee4_qDD-Ly9Og" showIcon="false" labelColor="39,76,114">
+ <customFeatures>labelSize</customFeatures>
+ </endLabelStyle>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Cq82165uEee4_qDD-Ly9Og" name="[0..*] subClassOf" sourceNode="_Cq82pq5uEee4_qDD-Ly9Og" targetNode="_Cq82pq5uEee4_qDD-Ly9Og">
+ <target xmi:type="ecore:EReference" href="vocabulary.ecore#//Clazz/subClassOf"/>
+ <semanticElements xmi:type="ecore:EReference" href="vocabulary.ecore#//Clazz/subClassOf"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_Cq822K5uEee4_qDD-Ly9Og" routingStyle="manhattan" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_Cq822a5uEee4_qDD-Ly9Og" showIcon="false">
+ <customFeatures>labelSize</customFeatures>
+ </centerLabelStyle>
+ <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_Cq822q5uEee4_qDD-Ly9Og" showIcon="false" labelColor="39,76,114">
+ <customFeatures>labelSize</customFeatures>
+ </endLabelStyle>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Cq82265uEee4_qDD-Ly9Og" name="[0..*] subPropertyOf" sourceNode="_Cq82qa5uEee4_qDD-Ly9Og" targetNode="_Cq82qa5uEee4_qDD-Ly9Og">
+ <target xmi:type="ecore:EReference" href="vocabulary.ecore#//Property/subPropertyOf"/>
+ <semanticElements xmi:type="ecore:EReference" href="vocabulary.ecore#//Property/subPropertyOf"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_Cq823K5uEee4_qDD-Ly9Og" routingStyle="manhattan" strokeColor="0,0,0">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_Cq823a5uEee4_qDD-Ly9Og" showIcon="false">
+ <customFeatures>labelSize</customFeatures>
+ </centerLabelStyle>
+ <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_Cq823q5uEee4_qDD-Ly9Og" showIcon="false" labelColor="39,76,114">
+ <customFeatures>labelSize</customFeatures>
+ </endLabelStyle>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_CrGAkK5uEee4_qDD-Ly9Og" sourceNode="_Cq82pq5uEee4_qDD-Ly9Og" targetNode="_Cq82pK5uEee4_qDD-Ly9Og">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Clazz"/>
+ <semanticElements xmi:type="ecore:EGenericType" href="vocabulary.ecore#//Clazz/@eGenericSuperTypes.0"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ujNpUq6OEee4_qDD-Ly9Og" targetArrow="InputClosedArrow" routingStyle="tree">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
+ <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_ujNpU66OEee4_qDD-Ly9Og" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ </beginLabelStyle>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ujNpVK6OEee4_qDD-Ly9Og" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_CrGAl65uEee4_qDD-Ly9Og" sourceNode="_Cq82qa5uEee4_qDD-Ly9Og" targetNode="_Cq82pK5uEee4_qDD-Ly9Og">
+ <target xmi:type="ecore:EClass" href="vocabulary.ecore#//Property"/>
+ <semanticElements xmi:type="ecore:EGenericType" href="vocabulary.ecore#//Property/@eGenericSuperTypes.0"/>
+ <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ujNpVa6OEee4_qDD-Ly9Og" targetArrow="InputClosedArrow" routingStyle="tree">
+ <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
+ <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_ujNpVq6OEee4_qDD-Ly9Og" showIcon="false">
+ <labelFormat>italic</labelFormat>
+ </beginLabelStyle>
+ <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ujNpV66OEee4_qDD-Ly9Og" showIcon="false"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_Ca4aVq5uEee4_qDD-Ly9Og"/>
+ <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/>
+ <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/>
+ <target xmi:type="ecore:EPackage" href="vocabulary.ecore#/"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.ecore b/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.ecore
new file mode 100644
index 0000000..9dba9af
--- /dev/null
+++ b/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.ecore
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="vocabulary" nsURI="http://org.eclipse.lyo/oslc4j/vocabulary"
+ nsPrefix="oscl4j_vocabulary">
+ <eClassifiers xsi:type="ecore:EClass" name="Vocabularies">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="vocabularies" upperBound="-1"
+ eType="#//Vocabulary" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Vocabulary">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="namespaceURI" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="wildcards" value=""/>
+ <details key="name" value=""/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="source" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The URI of the RDF source for this vocabulary."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="preferredNamespacePrefix"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="terms" upperBound="-1"
+ eType="#//Term" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Term" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="comment" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="seeAlso" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Class" eSuperTypes="#//Term">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subClassOf" upperBound="-1"
+ eType="#//Class"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Property" eSuperTypes="#//Term">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subPropertyOf" upperBound="-1"
+ eType="#//Property"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.genmodel b/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.genmodel
new file mode 100644
index 0000000..ec09f30
--- /dev/null
+++ b/org.eclipse.lyo.oslc4j.adaptormodel/model/vocabulary.genmodel
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.lyo.tools.vocabulary.model/src" editDirectory="/org.eclipse.lyo.tools.vocabulary.model.edit/src"
+ editorDirectory="/org.eclipse.lyo.tools.vocabulary.editor/src" modelPluginID="org.eclipse.lyo.tools.vocabulary.model"
+ modelName="Vocabulary" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
+ editPluginID="org.eclipse.lyo.tools.vocabulary.model.edit" editorPluginID="org.eclipse.lyo.tools.vocabulary.editor"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>vocabulary.ecore</foreignModel>
+ <genPackages prefix="Vocabulary" disposableProviderFactory="true" ecorePackage="vocabulary.ecore#/">
+ <genClasses ecoreClass="vocabulary.ecore#//Vocabularies">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference vocabulary.ecore#//Vocabularies/vocabularies"/>
+ </genClasses>
+ <genClasses ecoreClass="vocabulary.ecore#//Vocabulary">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Vocabulary/namespaceURI"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Vocabulary/label"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Vocabulary/description"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Vocabulary/source"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Vocabulary/preferredNamespacePrefix"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference vocabulary.ecore#//Vocabulary/terms"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="vocabulary.ecore#//Term">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Term/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Term/label"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Term/comment"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute vocabulary.ecore#//Term/seeAlso"/>
+ </genClasses>
+ <genClasses ecoreClass="vocabulary.ecore#//Class">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference vocabulary.ecore#//Class/subClassOf"/>
+ </genClasses>
+ <genClasses ecoreClass="vocabulary.ecore#//Property">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference vocabulary.ecore#//Property/subPropertyOf"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign b/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign
index 5a0cc58..64ae855 100644
--- a/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign
+++ b/org.eclipse.lyo.tools.toolchain.design/description/ToolChainModel.odesign
@@ -335,8 +335,13 @@
</ownedRepresentations>
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="ToolchainDiagram" initialisation="true" domainClass="toolchain.Toolchain">
<diagramInitialisation>
- <firstModelOperations xsi:type="tool_1:If" conditionExpression="[self.specification.oclIsUndefined()/]">
- <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.Specification" referenceName="specification"/>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="[self/]">
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="[self.specification.oclIsUndefined()/]">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="adaptorinterface.Specification" referenceName="specification"/>
+ </subModelOperations>
+ <subModelOperations xsi:type="tool_1:If" conditionExpression="[self.vocabularies.oclIsUndefined()/]">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="Vocabularies" referenceName="vocabularies"/>
+ </subModelOperations>
</firstModelOperations>
</diagramInitialisation>
<defaultLayer name="Default">
@@ -771,6 +776,179 @@
</toolSections>
</defaultLayer>
</ownedRepresentations>
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" dropDescriptions="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabularies.DropVocabulary']" name="VocabularyDiagram" initialisation="true" domainClass="vocabulary.Vocabularies" enablePopupBars="true">
+ <diagramInitialisation/>
+ <defaultLayer name="Default">
+ <edgeMappings name="Vocabularies.Class.SubClassOf" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabularies.DeleteSubClassOf']" sourceMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Class']" targetMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Class']" targetFinderExpression="feature:subClassOf">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <edgeMappings name="Vocabularies.Property.SubPropertyOf" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabularies.DeleteSubPropertyOf']" sourceMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Property']" targetMapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']/@subContainerMappings[name='Vocabularies.Vocabulary.Property']" targetFinderExpression="feature:subPropertyOf">
+ <style sizeComputationExpression="2">
+ <strokeColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ <centerLabelStyleDescription>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ </centerLabelStyleDescription>
+ </style>
+ </edgeMappings>
+ <containerMappings name="Vocabularies.Vocabulary" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabulary.DeleteVocabulary']" labelDirectEdit="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabularies.EditVocabularyLabel']" createElements="false" domainClass="vocabulary.Vocabulary">
+ <subContainerMappings name="Vocabularies.Vocabulary.Class" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabulary.DeleteClass']" labelDirectEdit="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabularies.EditClassLabel']" semanticCandidatesExpression="feature:eAllContents" domainClass="vocabulary.Class" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="feature:label" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconClass.png" widthComputationExpression="9" heightComputationExpression="6">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </subContainerMappings>
+ <subContainerMappings name="Vocabularies.Vocabulary.Property" deletionDescription="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabulary.DeleteProperty']" labelDirectEdit="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='Vocabularies.EditPropertyLabel']" semanticCandidatesExpression="feature:eAllContents" domainClass="vocabulary.Property" childrenPresentation="List">
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="feature:label" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/IconProperty.png" widthComputationExpression="9" heightComputationExpression="6">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ </style>
+ </subContainerMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="[label + ' (' + preferredNamespacePrefix + ')'/]" iconPath="/org.eclipse.lyo.tools.toolchain.design/images/VocabularyIcon.png" widthComputationExpression="40" heightComputationExpression="30">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
+ </style>
+ </containerMappings>
+ <toolSections name="Operations">
+ <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateVocabulary" label="Create 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"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:container">
+ <subModelOperations xsi:type="tool_1:CreateInstance" typeName="vocabulary.Vocabulary" referenceName="vocabularies">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="preferredNamespacePrefix" valueExpression="['vocab' + container.vocabularies->size() /]"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="['Vocabulary' + container.vocabularies->size() /]"/>
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="namespaceURI" valueExpression="['http://your.organisation.domain/'+ preferredNamespacePrefix +'#'/]"/>
+ </subModelOperations>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ContainerCreationDescription" name="Vocabularies.CreateClass" label="Create 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="Create 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>
+ <ownedTools xsi:type="tool:DirectEditLabel" name="Vocabularies.EditVocabularyLabel">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="var:0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DirectEditLabel" name="Vocabularies.EditClassLabel">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="var:0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DirectEditLabel" name="Vocabularies.EditPropertyLabel">
+ <mask mask="{0}"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:SetValue" featureName="label" valueExpression="var:0"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:EdgeCreationDescription" name="Vocabularies.CreateSubClassOf" label="SubClassOf" precondition="aql:preTarget->excludes(preSource) and preTarget.subClassOf->excludes(preSource)" edgeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@edgeMappings[name='Vocabularies.Class.SubClassOf']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:source">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="subClassOf" valueExpression="var:target"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:EdgeCreationDescription" name="Vocabularies.CreateSubPropertyOf" label="SubPropertyOf" precondition="aql:preTarget->excludes(preSource) and preTarget.subPropertyOf->excludes(preSource)" edgeMappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@edgeMappings[name='Vocabularies.Property.SubPropertyOf']">
+ <sourceVariable name="source"/>
+ <targetVariable name="target"/>
+ <sourceViewVariable name="sourceView"/>
+ <targetViewVariable name="targetView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:source">
+ <subModelOperations xsi:type="tool_1:SetValue" featureName="subPropertyOf" valueExpression="var:target"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:ContainerDropDescription" name="Vocabularies.DropVocabulary" mappings="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='VocabularyDiagram']/@defaultLayer/@containerMappings[name='Vocabularies.Vocabulary']" dragSource="BOTH">
+ <oldContainer name="oldSemanticContainer"/>
+ <newContainer name="newSemanticContainer"/>
+ <element name="element"/>
+ <newViewContainer name="newContainerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:ChangeContext" browseExpression="var:element">
+ <subModelOperations xsi:type="tool:CreateView" mapping="//@ownedViewpoints[name='ToolchainViewpoint']/@ownedRepresentations[name='SpecificationDiagram']/@defaultLayer/@containerMappings[name='Specification.DomainSpecification']" containerViewExpression="var:newContainerView"/>
+ </firstModelOperations>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DeleteElementDescription" name="Vocabulary.DeleteClass">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:RemoveElement"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DeleteElementDescription" name="Vocabulary.DeleteProperty">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:RemoveElement"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DeleteElementDescription" name="Vocabulary.DeleteVocabulary">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:RemoveElement"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DeleteElementDescription" name="Vocabularies.DeleteSubClassOf">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:Unset" featureName="subClassOf" elementExpression="aql:elementView.targetNode.target"/>
+ </initialOperation>
+ </ownedTools>
+ <ownedTools xsi:type="tool:DeleteElementDescription" name="Vocabularies.DeleteSubPropertyOf">
+ <element name="element"/>
+ <elementView name="elementView"/>
+ <containerView name="containerView"/>
+ <initialOperation>
+ <firstModelOperations xsi:type="tool_1:Unset" featureName="subPropertyOf" elementExpression="aql:elementView.targetNode.target"/>
+ </initialOperation>
+ </ownedTools>
+ </toolSections>
+ </defaultLayer>
+ </ownedRepresentations>
<ownedJavaExtensions qualifiedClassName="org::eclipse::lyo::tools::toolchain::design::queries"/>
<ownedJavaExtensions qualifiedClassName="org::eclipse::lyo::tools::toolchain::design::DialogInputServices"/>
<ownedJavaExtensions qualifiedClassName="org::eclipse::lyo::tools::toolchain::design::GeneratorServices"/>
diff --git a/org.eclipse.lyo.tools.toolchain.design/images/IconClass.png b/org.eclipse.lyo.tools.toolchain.design/images/IconClass.png
new file mode 100644
index 0000000..570bfc2
--- /dev/null
+++ b/org.eclipse.lyo.tools.toolchain.design/images/IconClass.png
Binary files differ
diff --git a/org.eclipse.lyo.tools.toolchain.design/images/IconProperty.png b/org.eclipse.lyo.tools.toolchain.design/images/IconProperty.png
new file mode 100644
index 0000000..97c6425
--- /dev/null
+++ b/org.eclipse.lyo.tools.toolchain.design/images/IconProperty.png
Binary files differ
diff --git a/org.eclipse.lyo.tools.toolchain.design/images/VocabularyIcon.png b/org.eclipse.lyo.tools.toolchain.design/images/VocabularyIcon.png
new file mode 100644
index 0000000..7d0801a
--- /dev/null
+++ b/org.eclipse.lyo.tools.toolchain.design/images/VocabularyIcon.png
Binary files differ
diff --git a/org.eclipse.lyo.tools.toolchain.design/pom.xml b/org.eclipse.lyo.tools.toolchain.design/pom.xml
index e14ca6b..8e9d2fb 100644
--- a/org.eclipse.lyo.tools.toolchain.design/pom.xml
+++ b/org.eclipse.lyo.tools.toolchain.design/pom.xml
@@ -9,7 +9,7 @@
<!-- ###################################################################################################### -->
<!-- ###################################################################################################### -->
- <!-- The maven integration will be improved so keep an eye on the Acceleo
+ <!-- The maven integration will be improved so keep an eye on the Acceleo
wiki: http://wiki.eclipse.org/Acceleo/Maven -->
<!-- ###################################################################################################### -->
@@ -50,6 +50,11 @@
</dependency>
<dependency>
<groupId>org.eclipse.lyo.tools</groupId>
+ <artifactId>org.eclipse.lyo.tools.vocabulary.model</artifactId>
+ <version>2.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.lyo.tools</groupId>
<artifactId>org.eclipse.lyo.tools.toolchain.edit</artifactId>
<version>2.3.0-SNAPSHOT</version>
</dependency>
@@ -88,15 +93,17 @@
<jars>
<jar>${project.basedir}/../org.eclipse.lyo.tools.adaptormodel.model/target/org.eclipse.lyo.tools.adaptormodel.model-2.3.0-SNAPSHOT.jar</jar>
<jar>${project.basedir}/../org.eclipse.lyo.tools.toolchain.model/target/org.eclipse.lyo.tools.toolchain.model-2.3.0-SNAPSHOT.jar</jar>
+ <jar>${project.basedir}/../org.eclipse.lyo.tools.vocabulary.model/target/org.eclipse.lyo.tools.vocabulary.model-2.3.0-SNAPSHOT.jar</jar>
</jars>
</acceleoProject>
<packagesToRegister>
- <!-- Please add the name of the Java class of the packages that are
- needed for the compilation of your module. For an UML generator, use the
+ <!-- Please add the name of the Java class of the packages that are
+ needed for the compilation of your module. For an UML generator, use the
following code -->
<!-- For more information, please visit http://wiki.eclipse.org/Acceleo/Maven -->
<packageToRegister>adaptorinterface.AdaptorinterfacePackage</packageToRegister>
<packageToRegister>toolchain.ToolchainPackage</packageToRegister>
+ <packageToRegister>vocabulary.VocabularyPackage</packageToRegister>
<!-- <packageToRegister>org.eclipse.sirius.diagram.DiagramPackage</packageToRegister> -->
</packagesToRegister>
</configuration>
diff --git a/org.eclipse.lyo.tools.toolchain.edit/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.toolchain.edit/META-INF/MANIFEST.MF
index d958221..266e3ce 100644
--- a/org.eclipse.lyo.tools.toolchain.edit/META-INF/MANIFEST.MF
+++ b/org.eclipse.lyo.tools.toolchain.edit/META-INF/MANIFEST.MF
@@ -13,5 +13,7 @@
org.eclipse.lyo.tools.toolchain.model;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport,
org.eclipse.lyo.tools.adaptormodel.model;visibility:=reexport,
- org.eclipse.lyo.tools.adaptormodel.edit;visibility:=reexport
+ org.eclipse.lyo.tools.adaptormodel.edit;visibility:=reexport,
+ org.eclipse.lyo.tools.vocabulary.model;visibility:=reexport,
+ org.eclipse.lyo.tools.vocabulary.model.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.toolchain.edit/icons/full/ctool16/CreateToolchain_vocabularies_Vocabularies.gif b/org.eclipse.lyo.tools.toolchain.edit/icons/full/ctool16/CreateToolchain_vocabularies_Vocabularies.gif
new file mode 100644
index 0000000..7ae9b42
--- /dev/null
+++ b/org.eclipse.lyo.tools.toolchain.edit/icons/full/ctool16/CreateToolchain_vocabularies_Vocabularies.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.toolchain.edit/plugin.properties b/org.eclipse.lyo.tools.toolchain.edit/plugin.properties
index 1cea884..93b425a 100644
--- a/org.eclipse.lyo.tools.toolchain.edit/plugin.properties
+++ b/org.eclipse.lyo.tools.toolchain.edit/plugin.properties
@@ -22,3 +22,4 @@
_UI_Toolchain_specification_feature = Specification
_UI_Unknown_feature = Unspecified
+_UI_Toolchain_vocabularies_feature = Vocabularies
diff --git a/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainEditPlugin.java b/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainEditPlugin.java
index 29287e7..0372a0b 100644
--- a/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainEditPlugin.java
+++ b/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainEditPlugin.java
@@ -7,6 +7,7 @@
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
+import vocabulary.provider.VocabularyEditPlugin;
/**
* This is the central singleton for the Toolchain edit plugin.
@@ -41,6 +42,7 @@
super
(new ResourceLocator [] {
AdaptorInterfaceEditPlugin.INSTANCE,
+ VocabularyEditPlugin.INSTANCE,
});
}
diff --git a/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainItemProvider.java b/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainItemProvider.java
index 965a434..ed78746 100644
--- a/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainItemProvider.java
+++ b/org.eclipse.lyo.tools.toolchain.edit/src/toolchain/provider/ToolchainItemProvider.java
@@ -28,6 +28,7 @@
import toolchain.Toolchain;
import toolchain.ToolchainPackage;
+import vocabulary.VocabularyFactory;
/**
* This is the item provider adapter for a {@link toolchain.Toolchain} object.
@@ -105,6 +106,7 @@
super.getChildrenFeatures(object);
childrenFeatures.add(ToolchainPackage.Literals.TOOLCHAIN__ADAPTOR_INTERFACES);
childrenFeatures.add(ToolchainPackage.Literals.TOOLCHAIN__SPECIFICATION);
+ childrenFeatures.add(ToolchainPackage.Literals.TOOLCHAIN__VOCABULARIES);
}
return childrenFeatures;
}
@@ -165,6 +167,7 @@
return;
case ToolchainPackage.TOOLCHAIN__ADAPTOR_INTERFACES:
case ToolchainPackage.TOOLCHAIN__SPECIFICATION:
+ case ToolchainPackage.TOOLCHAIN__VOCABULARIES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -191,6 +194,11 @@
(createChildParameter
(ToolchainPackage.Literals.TOOLCHAIN__SPECIFICATION,
AdaptorinterfaceFactory.eINSTANCE.createSpecification()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ToolchainPackage.Literals.TOOLCHAIN__VOCABULARIES,
+ VocabularyFactory.eINSTANCE.createVocabularies()));
}
/**
diff --git a/org.eclipse.lyo.tools.toolchain.editor/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.toolchain.editor/META-INF/MANIFEST.MF
index 0e7f488..5fce253 100644
--- a/org.eclipse.lyo.tools.toolchain.editor/META-INF/MANIFEST.MF
+++ b/org.eclipse.lyo.tools.toolchain.editor/META-INF/MANIFEST.MF
@@ -15,5 +15,6 @@
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.emf.edit.ui;visibility:=reexport,
org.eclipse.ui.ide;visibility:=reexport,
- org.eclipse.lyo.tools.adaptormodel.edit;visibility:=reexport
+ org.eclipse.lyo.tools.adaptormodel.edit;visibility:=reexport,
+ org.eclipse.lyo.tools.vocabulary.model.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.toolchain.editor/plugin.properties b/org.eclipse.lyo.tools.toolchain.editor/plugin.properties
index 0c4accb..80bd23b 100644
--- a/org.eclipse.lyo.tools.toolchain.editor/plugin.properties
+++ b/org.eclipse.lyo.tools.toolchain.editor/plugin.properties
Binary files differ
diff --git a/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditor.java b/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditor.java
index edbbf7c..dc93e0e 100644
--- a/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditor.java
+++ b/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditor.java
@@ -159,6 +159,7 @@
import adaptorinterface.provider.AdaptorinterfaceItemProviderAdapterFactory;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import vocabulary.provider.VocabularyItemProviderAdapterFactory;
/**
@@ -705,6 +706,7 @@
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ToolchainItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new AdaptorinterfaceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new VocabularyItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
diff --git a/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditorPlugin.java b/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditorPlugin.java
index de36993..91bb7db 100644
--- a/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditorPlugin.java
+++ b/org.eclipse.lyo.tools.toolchain.editor/src/toolchain/presentation/ToolchainEditorPlugin.java
@@ -9,6 +9,7 @@
import org.eclipse.emf.common.ui.EclipseUIPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
+import vocabulary.provider.VocabularyEditPlugin;
/**
* This is the central singleton for the Toolchain editor plugin.
@@ -43,6 +44,7 @@
super
(new ResourceLocator [] {
AdaptorInterfaceEditPlugin.INSTANCE,
+ VocabularyEditPlugin.INSTANCE,
});
}
diff --git a/org.eclipse.lyo.tools.toolchain.feature/feature.xml b/org.eclipse.lyo.tools.toolchain.feature/feature.xml
index c026dc2..602d56b 100644
--- a/org.eclipse.lyo.tools.toolchain.feature/feature.xml
+++ b/org.eclipse.lyo.tools.toolchain.feature/feature.xml
@@ -123,4 +123,25 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.lyo.tools.vocabulary.model.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.lyo.tools.vocabulary.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.lyo.tools.vocabulary.model"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/org.eclipse.lyo.tools.toolchain.model.tests/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.toolchain.model.tests/META-INF/MANIFEST.MF
index bd5ef9c..89ee3a3 100644
--- a/org.eclipse.lyo.tools.toolchain.model.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.lyo.tools.toolchain.model.tests/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.lyo.tools.toolchain.model;visibility:=reexport,
org.eclipse.lyo.tools.adaptormodel.model;visibility:=reexport,
+ org.eclipse.lyo.tools.vocabulary.model;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.junit;visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.toolchain.model.tests/src/toolchain/tests/ToolchainExample.java b/org.eclipse.lyo.tools.toolchain.model.tests/src/toolchain/tests/ToolchainExample.java
index 1e514d7..962af71 100644
--- a/org.eclipse.lyo.tools.toolchain.model.tests/src/toolchain/tests/ToolchainExample.java
+++ b/org.eclipse.lyo.tools.toolchain.model.tests/src/toolchain/tests/ToolchainExample.java
@@ -59,7 +59,7 @@
if (args.length == 0) {
System.out.println("Enter a list of file paths or URIs that have content like this:");
try {
- Resource resource = resourceSet.createResource(URI.createURI("http:///My.xml"));
+ Resource resource = resourceSet.createResource(URI.createURI("http:///My.toolchain"));
Toolchain root = ToolchainFactory.eINSTANCE.createToolchain();
resource.getContents().add(root);
resource.save(System.out, null);
diff --git a/org.eclipse.lyo.tools.toolchain.model/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.toolchain.model/META-INF/MANIFEST.MF
index 4a75da3..298b05d 100644
--- a/org.eclipse.lyo.tools.toolchain.model/META-INF/MANIFEST.MF
+++ b/org.eclipse.lyo.tools.toolchain.model/META-INF/MANIFEST.MF
@@ -12,5 +12,6 @@
toolchain.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.lyo.tools.adaptormodel.model;visibility:=reexport
+ org.eclipse.lyo.tools.adaptormodel.model;visibility:=reexport,
+ org.eclipse.lyo.tools.vocabulary.model;visibility:=reexport
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/Toolchain.java b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/Toolchain.java
index e3b7a99..67e9e03 100644
--- a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/Toolchain.java
+++ b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/Toolchain.java
@@ -8,6 +8,7 @@
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
+import vocabulary.Vocabularies;
/**
* <!-- begin-user-doc -->
@@ -16,12 +17,13 @@
*
* <p>
* The following features are supported:
+ * </p>
* <ul>
* <li>{@link toolchain.Toolchain#getName <em>Name</em>}</li>
* <li>{@link toolchain.Toolchain#getAdaptorInterfaces <em>Adaptor Interfaces</em>}</li>
* <li>{@link toolchain.Toolchain#getSpecification <em>Specification</em>}</li>
+ * <li>{@link toolchain.Toolchain#getVocabularies <em>Vocabularies</em>}</li>
* </ul>
- * </p>
*
* @see toolchain.ToolchainPackage#getToolchain()
* @model
@@ -97,4 +99,30 @@
*/
void setSpecification(Specification value);
+ /**
+ * Returns the value of the '<em><b>Vocabularies</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Vocabularies</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Vocabularies</em>' containment reference.
+ * @see #setVocabularies(Vocabularies)
+ * @see toolchain.ToolchainPackage#getToolchain_Vocabularies()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ Vocabularies getVocabularies();
+
+ /**
+ * Sets the value of the '{@link toolchain.Toolchain#getVocabularies <em>Vocabularies</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Vocabularies</em>' containment reference.
+ * @see #getVocabularies()
+ * @generated
+ */
+ void setVocabularies(Vocabularies value);
+
} // Toolchain
diff --git a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/ToolchainPackage.java b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/ToolchainPackage.java
index dbb754e..a8a6902 100644
--- a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/ToolchainPackage.java
+++ b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/ToolchainPackage.java
@@ -94,13 +94,22 @@
int TOOLCHAIN__SPECIFICATION = 2;
/**
+ * The feature id for the '<em><b>Vocabularies</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOLCHAIN__VOCABULARIES = 3;
+
+ /**
* The number of structural features of the '<em>Toolchain</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int TOOLCHAIN_FEATURE_COUNT = 3;
+ int TOOLCHAIN_FEATURE_COUNT = 4;
/**
* The number of operations of the '<em>Toolchain</em>' class.
@@ -156,6 +165,17 @@
EReference getToolchain_Specification();
/**
+ * Returns the meta object for the containment reference '{@link toolchain.Toolchain#getVocabularies <em>Vocabularies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Vocabularies</em>'.
+ * @see toolchain.Toolchain#getVocabularies()
+ * @see #getToolchain()
+ * @generated
+ */
+ EReference getToolchain_Vocabularies();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -212,6 +232,14 @@
*/
EReference TOOLCHAIN__SPECIFICATION = eINSTANCE.getToolchain_Specification();
+ /**
+ * The meta object literal for the '<em><b>Vocabularies</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TOOLCHAIN__VOCABULARIES = eINSTANCE.getToolchain_Vocabularies();
+
}
} //ToolchainPackage
diff --git a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainImpl.java b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainImpl.java
index cf6f0bf..7a3e249 100644
--- a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainImpl.java
+++ b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainImpl.java
@@ -23,6 +23,7 @@
import toolchain.Toolchain;
import toolchain.ToolchainPackage;
+import vocabulary.Vocabularies;
/**
* <!-- begin-user-doc -->
@@ -30,12 +31,13 @@
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
* <li>{@link toolchain.impl.ToolchainImpl#getName <em>Name</em>}</li>
* <li>{@link toolchain.impl.ToolchainImpl#getAdaptorInterfaces <em>Adaptor Interfaces</em>}</li>
* <li>{@link toolchain.impl.ToolchainImpl#getSpecification <em>Specification</em>}</li>
+ * <li>{@link toolchain.impl.ToolchainImpl#getVocabularies <em>Vocabularies</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
@@ -81,6 +83,16 @@
protected Specification specification;
/**
+ * The cached value of the '{@link #getVocabularies() <em>Vocabularies</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getVocabularies()
+ * @generated
+ * @ordered
+ */
+ protected Vocabularies vocabularies;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -180,6 +192,49 @@
* <!-- end-user-doc -->
* @generated
*/
+ public Vocabularies getVocabularies() {
+ return vocabularies;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetVocabularies(Vocabularies newVocabularies, NotificationChain msgs) {
+ Vocabularies oldVocabularies = vocabularies;
+ vocabularies = newVocabularies;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ToolchainPackage.TOOLCHAIN__VOCABULARIES, oldVocabularies, newVocabularies);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVocabularies(Vocabularies newVocabularies) {
+ if (newVocabularies != vocabularies) {
+ NotificationChain msgs = null;
+ if (vocabularies != null)
+ msgs = ((InternalEObject)vocabularies).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ToolchainPackage.TOOLCHAIN__VOCABULARIES, null, msgs);
+ if (newVocabularies != null)
+ msgs = ((InternalEObject)newVocabularies).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ToolchainPackage.TOOLCHAIN__VOCABULARIES, null, msgs);
+ msgs = basicSetVocabularies(newVocabularies, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ToolchainPackage.TOOLCHAIN__VOCABULARIES, newVocabularies, newVocabularies));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -187,6 +242,8 @@
return ((InternalEList<?>)getAdaptorInterfaces()).basicRemove(otherEnd, msgs);
case ToolchainPackage.TOOLCHAIN__SPECIFICATION:
return basicSetSpecification(null, msgs);
+ case ToolchainPackage.TOOLCHAIN__VOCABULARIES:
+ return basicSetVocabularies(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -205,6 +262,8 @@
return getAdaptorInterfaces();
case ToolchainPackage.TOOLCHAIN__SPECIFICATION:
return getSpecification();
+ case ToolchainPackage.TOOLCHAIN__VOCABULARIES:
+ return getVocabularies();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -228,6 +287,9 @@
case ToolchainPackage.TOOLCHAIN__SPECIFICATION:
setSpecification((Specification)newValue);
return;
+ case ToolchainPackage.TOOLCHAIN__VOCABULARIES:
+ setVocabularies((Vocabularies)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -249,6 +311,9 @@
case ToolchainPackage.TOOLCHAIN__SPECIFICATION:
setSpecification((Specification)null);
return;
+ case ToolchainPackage.TOOLCHAIN__VOCABULARIES:
+ setVocabularies((Vocabularies)null);
+ return;
}
super.eUnset(featureID);
}
@@ -267,6 +332,8 @@
return adaptorInterfaces != null && !adaptorInterfaces.isEmpty();
case ToolchainPackage.TOOLCHAIN__SPECIFICATION:
return specification != null;
+ case ToolchainPackage.TOOLCHAIN__VOCABULARIES:
+ return vocabularies != null;
}
return super.eIsSet(featureID);
}
diff --git a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainPackageImpl.java b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainPackageImpl.java
index c6bea0c..b2775d8 100644
--- a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainPackageImpl.java
+++ b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/impl/ToolchainPackageImpl.java
@@ -14,6 +14,7 @@
import toolchain.Toolchain;
import toolchain.ToolchainFactory;
import toolchain.ToolchainPackage;
+import vocabulary.VocabularyPackage;
/**
* <!-- begin-user-doc -->
@@ -77,6 +78,7 @@
// Initialize simple dependencies
AdaptorinterfacePackage.eINSTANCE.eClass();
+ VocabularyPackage.eINSTANCE.eClass();
// Create package meta-data objects
theToolchainPackage.createPackageContents();
@@ -134,6 +136,15 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getToolchain_Vocabularies() {
+ return (EReference)toolchainEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public ToolchainFactory getToolchainFactory() {
return (ToolchainFactory)getEFactoryInstance();
}
@@ -161,6 +172,7 @@
createEAttribute(toolchainEClass, TOOLCHAIN__NAME);
createEReference(toolchainEClass, TOOLCHAIN__ADAPTOR_INTERFACES);
createEReference(toolchainEClass, TOOLCHAIN__SPECIFICATION);
+ createEReference(toolchainEClass, TOOLCHAIN__VOCABULARIES);
}
/**
@@ -188,6 +200,7 @@
// Obtain other dependent packages
AdaptorinterfacePackage theAdaptorinterfacePackage = (AdaptorinterfacePackage)EPackage.Registry.INSTANCE.getEPackage(AdaptorinterfacePackage.eNS_URI);
+ VocabularyPackage theVocabularyPackage = (VocabularyPackage)EPackage.Registry.INSTANCE.getEPackage(VocabularyPackage.eNS_URI);
// Create type parameters
@@ -200,6 +213,7 @@
initEAttribute(getToolchain_Name(), ecorePackage.getEString(), "name", "New ToolChain", 0, 1, Toolchain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getToolchain_AdaptorInterfaces(), theAdaptorinterfacePackage.getAdaptorInterface(), null, "adaptorInterfaces", null, 0, -1, Toolchain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getToolchain_Specification(), theAdaptorinterfacePackage.getSpecification(), null, "specification", null, 1, 1, Toolchain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getToolchain_Vocabularies(), theVocabularyPackage.getVocabularies(), null, "vocabularies", null, 1, 1, Toolchain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
diff --git a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/util/ToolchainSwitch.java b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/util/ToolchainSwitch.java
index 60a81fe..0166ca0 100644
--- a/org.eclipse.lyo.tools.toolchain.model/src/toolchain/util/ToolchainSwitch.java
+++ b/org.eclipse.lyo.tools.toolchain.model/src/toolchain/util/ToolchainSwitch.java
@@ -47,7 +47,7 @@
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @parameter ePackage the package in question.
+ * @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/.classpath b/org.eclipse.lyo.tools.vocabulary.editor/.classpath
new file mode 100644
index 0000000..22f3064
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/.gitignore b/org.eclipse.lyo.tools.vocabulary.editor/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/.project b/org.eclipse.lyo.tools.vocabulary.editor/.project
new file mode 100644
index 0000000..37de44b
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.lyo.tools.vocabulary.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.vocabulary.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bc12fec
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.lyo.tools.vocabulary.editor;singleton:=true
+Bundle-Version: 2.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: vocabulary.presentation.VocabularyEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: vocabulary.presentation
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.lyo.tools.vocabulary.model.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/build.properties b/org.eclipse.lyo.tools.vocabulary.editor/build.properties
new file mode 100644
index 0000000..5fb0771
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/build.properties
@@ -0,0 +1,10 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/icons/full/obj16/VocabularyModelFile.gif b/org.eclipse.lyo.tools.vocabulary.editor/icons/full/obj16/VocabularyModelFile.gif
new file mode 100644
index 0000000..d5cfa16
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/icons/full/obj16/VocabularyModelFile.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/icons/full/wizban/NewVocabulary.gif b/org.eclipse.lyo.tools.vocabulary.editor/icons/full/wizban/NewVocabulary.gif
new file mode 100644
index 0000000..2054126
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/icons/full/wizban/NewVocabulary.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/plugin.properties b/org.eclipse.lyo.tools.vocabulary.editor/plugin.properties
new file mode 100644
index 0000000..1449b0c
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/plugin.properties
@@ -0,0 +1,53 @@
+#
+
+pluginName = Vocabulary Editor
+providerName = www.example.org
+
+_UI_VocabularyEditor_menu = &Vocabulary Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_VocabularyModelWizard_label = Vocabulary Model
+_UI_VocabularyModelWizard_description = Create a new Vocabulary model
+
+_UI_VocabularyEditor_label = Vocabulary Model Editor
+
+_UI_VocabularyEditorFilenameDefaultBase = My
+_UI_VocabularyEditorFilenameExtensions = vocabulary
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/plugin.xml b/org.eclipse.lyo.tools.vocabulary.editor/plugin.xml
new file mode 100644
index 0000000..db8d32a
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/plugin.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <!-- @generated vocabulary -->
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="vocabulary.presentation.VocabularyModelWizardID"
+ name="%_UI_VocabularyModelWizard_label"
+ class="vocabulary.presentation.VocabularyModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/VocabularyModelFile.gif">
+ <description>%_UI_VocabularyModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <!-- @generated vocabulary -->
+ <editor
+ id="vocabulary.presentation.VocabularyEditorID"
+ name="%_UI_VocabularyEditor_label"
+ icon="icons/full/obj16/VocabularyModelFile.gif"
+ extensions="vocabulary"
+ class="vocabulary.presentation.VocabularyEditor"
+ contributorClass="vocabulary.presentation.VocabularyActionBarContributor">
+ </editor>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyActionBarContributor.java b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyActionBarContributor.java
new file mode 100644
index 0000000..1647a65
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyActionBarContributor.java
@@ -0,0 +1,423 @@
+/**
+ */
+package vocabulary.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Vocabulary model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyActionBarContributor
+ extends EditingDomainActionBarContributor
+ implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(VocabularyEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ }
+ catch (PartInitException exception) {
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(VocabularyEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyActionBarContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("vocabulary-settings"));
+ toolBarManager.add(new Separator("vocabulary-additions"));
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyEditor_menu"), "vocabularyMenuID");
+ menuManager.insertAfter("additions", submenuManager);
+ submenuManager.add(new Separator("settings"));
+ submenuManager.add(new Separator("actions"));
+ submenuManager.add(new Separator("additions"));
+ submenuManager.add(new Separator("additions-end"));
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(VocabularyEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ submenuManager.insertBefore("additions", createChildMenuManager);
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(VocabularyEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ submenuManager.insertBefore("additions", createSiblingMenuManager);
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(VocabularyEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+
+ submenuManager = new MenuManager(VocabularyEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions"));
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction);
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction);
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyEditor.java b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyEditor.java
new file mode 100644
index 0000000..d789221
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyEditor.java
@@ -0,0 +1,1819 @@
+/**
+ */
+package vocabulary.presentation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.custom.CTabFolder;
+
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+
+import org.eclipse.swt.graphics.Point;
+
+import org.eclipse.swt.layout.FillLayout;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.ui.dialogs.SaveAsDialog;
+
+import org.eclipse.ui.ide.IGotoMarker;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+
+import vocabulary.provider.VocabularyItemProviderAdapterFactory;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+
+/**
+ * This is an example of a Vocabulary model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyEditor
+ extends MultiPageEditorPart
+ implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(VocabularyEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(VocabularyEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == VocabularyEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter =
+ new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, diagnostic);
+ }
+ else {
+ resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ }
+ else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ resourceToDiagnosticMap.remove(target);
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED ||
+ delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ removedResources.add(resource);
+ }
+ else if (!savedResources.remove(resource)) {
+ changedResources.add(resource);
+ }
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(VocabularyEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == VocabularyEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ }
+ catch (CoreException exception) {
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(VocabularyEditor.this, false);
+ }
+ else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+ else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ changedResources.addAll(editingDomain.getResourceSet().getResources());
+ }
+ editingDomain.getCommandStack().flush();
+
+ updateProblemIndication = false;
+ for (Resource resource : changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ if (!resourceToDiagnosticMap.containsKey(resource)) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void updateProblemIndication() {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic =
+ new BasicDiagnostic
+ (Diagnostic.OK,
+ "org.eclipse.lyo.tools.vocabulary.editor",
+ 0,
+ null,
+ new Object [] { editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ }
+ else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ }
+ catch (PartInitException exception) {
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
+ markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"),
+ getString("_WARN_FileConflict"));
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new VocabularyItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ }
+ else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel() {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ }
+ catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
+ boolean hasErrors = !resource.getErrors().isEmpty();
+ if (hasErrors || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic =
+ new BasicDiagnostic
+ (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING,
+ "org.eclipse.lyo.tools.vocabulary.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object [] { exception == null ? (Object)resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ }
+ else if (exception != null) {
+ return
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.lyo.tools.vocabulary.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object[] { exception });
+ }
+ else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), VocabularyEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer)viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label"));
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), VocabularyEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer)viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label"));
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), VocabularyEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer)viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label"));
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), VocabularyEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer)viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label"));
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), VocabularyEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String [] {"a", "b"});
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label"));
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), VocabularyEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));
+ }
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, "");
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label"));
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ VocabularyEditor.this.setSelectionToViewer(selection);
+ VocabularyEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
+
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ savedResources.add(resource);
+ }
+ }
+ catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ if (!targetObjects.isEmpty()) {
+ setSelectionToViewer(targetObjects);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setFocus() {
+ if (currentViewerPane != null) {
+ currentViewerPane.setFocus();
+ }
+ else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
+ contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected"));
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage("");
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key) {
+ return VocabularyEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return VocabularyEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyEditorPlugin.java b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyEditorPlugin.java
new file mode 100644
index 0000000..16c9fae
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyEditorPlugin.java
@@ -0,0 +1,91 @@
+/**
+ */
+package vocabulary.presentation;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Vocabulary editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class VocabularyEditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final VocabularyEditorPlugin INSTANCE = new VocabularyEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyEditorPlugin() {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyModelWizard.java b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyModelWizard.java
new file mode 100644
index 0000000..f0c28d9
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.editor/src/vocabulary/presentation/VocabularyModelWizard.java
@@ -0,0 +1,627 @@
+/**
+ */
+package vocabulary.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.CommonPlugin;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+import vocabulary.VocabularyFactory;
+import vocabulary.VocabularyPackage;
+import vocabulary.provider.VocabularyEditPlugin;
+
+
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyEditorFilenameExtensions").split("\\s*,\\s*")));
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
+
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularyPackage vocabularyPackage = VocabularyPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularyFactory vocabularyFactory = vocabularyPackage.getVocabularyFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularyModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularyModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(VocabularyEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(VocabularyEditorPlugin.INSTANCE.getImage("full/wizban/NewVocabulary")));
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ for (EClassifier eClassifier : vocabularyPackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass)eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass)vocabularyPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = vocabularyFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), VocabularyEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ VocabularyEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class VocabularyModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
+ setErrorMessage(VocabularyEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class VocabularyModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE); {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(VocabularyEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(VocabularyEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return VocabularyEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ }
+ catch(MissingResourceException mre) {
+ VocabularyEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(VocabularyEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new VocabularyModelWizardNewFileCreationPage("Whatever", selection);
+ newFileCreationPage.setTitle(VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyModelWizard_label"));
+ newFileCreationPage.setDescription(VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyModelWizard_description"));
+ newFileCreationPage.setFileName(VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyEditorFilenameDefaultBase");
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new VocabularyModelWizardInitialObjectCreationPage("Whatever2");
+ initialObjectCreationPage.setTitle(VocabularyEditorPlugin.INSTANCE.getString("_UI_VocabularyModelWizard_label"));
+ initialObjectCreationPage.setDescription(VocabularyEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/.classpath b/org.eclipse.lyo.tools.vocabulary.model.edit/.classpath
new file mode 100644
index 0000000..22f3064
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/.gitignore b/org.eclipse.lyo.tools.vocabulary.model.edit/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/.project b/org.eclipse.lyo.tools.vocabulary.model.edit/.project
new file mode 100644
index 0000000..128985c
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.lyo.tools.vocabulary.model.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.lyo.tools.vocabulary.model.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c68a61
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.vocabulary.model.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b1d262a
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.lyo.tools.vocabulary.model.edit;singleton:=true
+Bundle-Version: 2.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: vocabulary.provider.VocabularyEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: vocabulary.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.lyo.tools.vocabulary.model;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/build.properties b/org.eclipse.lyo.tools.vocabulary.model.edit/build.properties
new file mode 100644
index 0000000..6e3e902
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/build.properties
@@ -0,0 +1,10 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabularies_vocabularies_Vocabulary.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabularies_vocabularies_Vocabulary.gif
new file mode 100644
index 0000000..2a3bcb3
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabularies_vocabularies_Vocabulary.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Class.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Class.gif
new file mode 100644
index 0000000..31cb2e2
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Class.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Clazz.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Clazz.gif
new file mode 100644
index 0000000..90c9485
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Clazz.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Property.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Property.gif
new file mode 100644
index 0000000..3f70d4d
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/ctool16/CreateVocabulary_terms_Property.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Class.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Class.gif
new file mode 100644
index 0000000..a26660e
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Class.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Clazz.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Clazz.gif
new file mode 100644
index 0000000..134551b
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Clazz.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Property.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Property.gif
new file mode 100644
index 0000000..136e3b2
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Property.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Vocabularies.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Vocabularies.gif
new file mode 100644
index 0000000..afb82ea
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Vocabularies.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Vocabulary.gif b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Vocabulary.gif
new file mode 100644
index 0000000..53500da
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/icons/full/obj16/Vocabulary.gif
Binary files differ
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/plugin.properties b/org.eclipse.lyo.tools.vocabulary.model.edit/plugin.properties
new file mode 100644
index 0000000..a1336ab
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/plugin.properties
@@ -0,0 +1,38 @@
+#
+
+pluginName = Vocabulary Edit Support
+providerName = www.example.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Vocabularies_type = Vocabularies
+_UI_Vocabulary_type = Vocabulary
+_UI_Term_type = Term
+_UI_Class_type = Class
+_UI_Property_type = Property
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Vocabularies_vocabularies_feature = Vocabularies
+_UI_Vocabulary_namespaceURI_feature = Namespace URI
+_UI_Vocabulary_label_feature = Label
+_UI_Vocabulary_description_feature = Description
+_UI_Vocabulary_source_feature = Source
+_UI_Vocabulary_preferredNamespacePrefix_feature = Preferred Namespace Prefix
+_UI_Vocabulary_terms_feature = Terms
+_UI_Term_name_feature = Name
+_UI_Term_label_feature = Label
+_UI_Term_comment_feature = Comment
+_UI_Term_seeAlso_feature = See Also
+_UI_Class_subClassOf_feature = Sub-Class Of
+_UI_Property_subPropertyOf_feature = Sub-Property Of
+_UI_Unknown_feature = Unspecified
+
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/plugin.xml b/org.eclipse.lyo.tools.vocabulary.model.edit/plugin.xml
new file mode 100644
index 0000000..c5a1f4b
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/plugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated vocabulary -->
+ <factory
+ uri="http://org.eclipse.lyo/oslc4j/vocabulary"
+ class="vocabulary.provider.VocabularyItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/ClassItemProvider.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/ClassItemProvider.java
new file mode 100644
index 0000000..0b930e8
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/ClassItemProvider.java
@@ -0,0 +1,123 @@
+/**
+ */
+package vocabulary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+import vocabulary.VocabularyPackage;
+
+/**
+ * This is the item provider adapter for a {@link vocabulary.Class} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ClassItemProvider extends TermItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addSubClassOfPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Sub Class Of feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSubClassOfPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Class_subClassOf_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Class_subClassOf_feature", "_UI_Class_type"),
+ VocabularyPackage.Literals.CLASS__SUB_CLASS_OF,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Class.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Class"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((vocabulary.Class)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Class_type") :
+ getString("_UI_Class_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/PropertyItemProvider.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/PropertyItemProvider.java
new file mode 100644
index 0000000..fabf892
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/PropertyItemProvider.java
@@ -0,0 +1,124 @@
+/**
+ */
+package vocabulary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+import vocabulary.Property;
+import vocabulary.VocabularyPackage;
+
+/**
+ * This is the item provider adapter for a {@link vocabulary.Property} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PropertyItemProvider extends TermItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PropertyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addSubPropertyOfPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Sub Property Of feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSubPropertyOfPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Property_subPropertyOf_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Property_subPropertyOf_feature", "_UI_Property_type"),
+ VocabularyPackage.Literals.PROPERTY__SUB_PROPERTY_OF,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Property.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Property"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Property)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Property_type") :
+ getString("_UI_Property_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/TermItemProvider.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/TermItemProvider.java
new file mode 100644
index 0000000..f129aa9
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/TermItemProvider.java
@@ -0,0 +1,219 @@
+/**
+ */
+package vocabulary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import vocabulary.Term;
+import vocabulary.VocabularyPackage;
+
+/**
+ * This is the item provider adapter for a {@link vocabulary.Term} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TermItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TermItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ addLabelPropertyDescriptor(object);
+ addCommentPropertyDescriptor(object);
+ addSeeAlsoPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Term_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Term_name_feature", "_UI_Term_type"),
+ VocabularyPackage.Literals.TERM__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Label feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLabelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Term_label_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Term_label_feature", "_UI_Term_type"),
+ VocabularyPackage.Literals.TERM__LABEL,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Comment feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCommentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Term_comment_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Term_comment_feature", "_UI_Term_type"),
+ VocabularyPackage.Literals.TERM__COMMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the See Also feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSeeAlsoPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Term_seeAlso_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Term_seeAlso_feature", "_UI_Term_type"),
+ VocabularyPackage.Literals.TERM__SEE_ALSO,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Term)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Term_type") :
+ getString("_UI_Term_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Term.class)) {
+ case VocabularyPackage.TERM__NAME:
+ case VocabularyPackage.TERM__LABEL:
+ case VocabularyPackage.TERM__COMMENT:
+ case VocabularyPackage.TERM__SEE_ALSO:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return VocabularyEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabulariesItemProvider.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabulariesItemProvider.java
new file mode 100644
index 0000000..61f1100
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabulariesItemProvider.java
@@ -0,0 +1,168 @@
+/**
+ */
+package vocabulary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import vocabulary.Vocabularies;
+import vocabulary.VocabularyFactory;
+import vocabulary.VocabularyPackage;
+
+/**
+ * This is the item provider adapter for a {@link vocabulary.Vocabularies} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabulariesItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabulariesItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(VocabularyPackage.Literals.VOCABULARIES__VOCABULARIES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Vocabularies.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Vocabularies"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Vocabularies_type");
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Vocabularies.class)) {
+ case VocabularyPackage.VOCABULARIES__VOCABULARIES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (VocabularyPackage.Literals.VOCABULARIES__VOCABULARIES,
+ VocabularyFactory.eINSTANCE.createVocabulary()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return VocabularyEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyEditPlugin.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyEditPlugin.java
new file mode 100644
index 0000000..ed56366
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyEditPlugin.java
@@ -0,0 +1,89 @@
+/**
+ */
+package vocabulary.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Vocabulary edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class VocabularyEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final VocabularyEditPlugin INSTANCE = new VocabularyEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyItemProvider.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyItemProvider.java
new file mode 100644
index 0000000..6887c87
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyItemProvider.java
@@ -0,0 +1,300 @@
+/**
+ */
+package vocabulary.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyFactory;
+import vocabulary.VocabularyPackage;
+
+/**
+ * This is the item provider adapter for a {@link vocabulary.Vocabulary} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamespaceURIPropertyDescriptor(object);
+ addLabelPropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ addSourcePropertyDescriptor(object);
+ addPreferredNamespacePrefixPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Namespace URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamespaceURIPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Vocabulary_namespaceURI_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Vocabulary_namespaceURI_feature", "_UI_Vocabulary_type"),
+ VocabularyPackage.Literals.VOCABULARY__NAMESPACE_URI,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Label feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLabelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Vocabulary_label_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Vocabulary_label_feature", "_UI_Vocabulary_type"),
+ VocabularyPackage.Literals.VOCABULARY__LABEL,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Description feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDescriptionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Vocabulary_description_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Vocabulary_description_feature", "_UI_Vocabulary_type"),
+ VocabularyPackage.Literals.VOCABULARY__DESCRIPTION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Source feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSourcePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Vocabulary_source_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Vocabulary_source_feature", "_UI_Vocabulary_type"),
+ VocabularyPackage.Literals.VOCABULARY__SOURCE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Preferred Namespace Prefix feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPreferredNamespacePrefixPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Vocabulary_preferredNamespacePrefix_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Vocabulary_preferredNamespacePrefix_feature", "_UI_Vocabulary_type"),
+ VocabularyPackage.Literals.VOCABULARY__PREFERRED_NAMESPACE_PREFIX,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(VocabularyPackage.Literals.VOCABULARY__TERMS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Vocabulary.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Vocabulary"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Vocabulary)object).getNamespaceURI();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Vocabulary_type") :
+ getString("_UI_Vocabulary_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Vocabulary.class)) {
+ case VocabularyPackage.VOCABULARY__NAMESPACE_URI:
+ case VocabularyPackage.VOCABULARY__LABEL:
+ case VocabularyPackage.VOCABULARY__DESCRIPTION:
+ case VocabularyPackage.VOCABULARY__SOURCE:
+ case VocabularyPackage.VOCABULARY__PREFERRED_NAMESPACE_PREFIX:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case VocabularyPackage.VOCABULARY__TERMS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (VocabularyPackage.Literals.VOCABULARY__TERMS,
+ VocabularyFactory.eINSTANCE.createClass()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (VocabularyPackage.Literals.VOCABULARY__TERMS,
+ VocabularyFactory.eINSTANCE.createProperty()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return VocabularyEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyItemProviderAdapterFactory.java b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyItemProviderAdapterFactory.java
new file mode 100644
index 0000000..9dc5e76
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.edit/src/vocabulary/provider/VocabularyItemProviderAdapterFactory.java
@@ -0,0 +1,271 @@
+/**
+ */
+package vocabulary.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import vocabulary.util.VocabularyAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyItemProviderAdapterFactory extends VocabularyAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link vocabulary.Vocabularies} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabulariesItemProvider vocabulariesItemProvider;
+
+ /**
+ * This creates an adapter for a {@link vocabulary.Vocabularies}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createVocabulariesAdapter() {
+ if (vocabulariesItemProvider == null) {
+ vocabulariesItemProvider = new VocabulariesItemProvider(this);
+ }
+
+ return vocabulariesItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link vocabulary.Vocabulary} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularyItemProvider vocabularyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link vocabulary.Vocabulary}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createVocabularyAdapter() {
+ if (vocabularyItemProvider == null) {
+ vocabularyItemProvider = new VocabularyItemProvider(this);
+ }
+
+ return vocabularyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link vocabulary.Class} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ClassItemProvider classItemProvider;
+
+ /**
+ * This creates an adapter for a {@link vocabulary.Class}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createClassAdapter() {
+ if (classItemProvider == null) {
+ classItemProvider = new ClassItemProvider(this);
+ }
+
+ return classItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link vocabulary.Property} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PropertyItemProvider propertyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link vocabulary.Property}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPropertyAdapter() {
+ if (propertyItemProvider == null) {
+ propertyItemProvider = new PropertyItemProvider(this);
+ }
+
+ return propertyItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (vocabulariesItemProvider != null) vocabulariesItemProvider.dispose();
+ if (vocabularyItemProvider != null) vocabularyItemProvider.dispose();
+ if (classItemProvider != null) classItemProvider.dispose();
+ if (propertyItemProvider != null) propertyItemProvider.dispose();
+ }
+
+}
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/.classpath b/org.eclipse.lyo.tools.vocabulary.model.tests/.classpath
new file mode 100644
index 0000000..22f3064
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/.gitignore b/org.eclipse.lyo.tools.vocabulary.model.tests/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/.project b/org.eclipse.lyo.tools.vocabulary.model.tests/.project
new file mode 100644
index 0000000..034fdb7
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.lyo.tools.vocabulary.model.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.vocabulary.model.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f57681d
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.lyo.tools.vocabulary.model.tests;singleton:=true
+Bundle-Version: 2.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: vocabulary.tests
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.lyo.tools.vocabulary.model;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.junit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/build.properties b/org.eclipse.lyo.tools.vocabulary.model.tests/build.properties
new file mode 100644
index 0000000..08af068
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/build.properties
@@ -0,0 +1,8 @@
+#
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/plugin.properties b/org.eclipse.lyo.tools.vocabulary.model.tests/plugin.properties
new file mode 100644
index 0000000..1720cdf
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/plugin.properties
@@ -0,0 +1,4 @@
+#
+
+pluginName = Vocabulary Tests
+providerName = www.example.org
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/ClassTest.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/ClassTest.java
new file mode 100644
index 0000000..9c5b79e
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/ClassTest.java
@@ -0,0 +1,69 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.textui.TestRunner;
+
+import vocabulary.VocabularyFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Class</b></em>'.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ClassTest extends TermTest {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ClassTest.class);
+ }
+
+ /**
+ * Constructs a new Class test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Class test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected vocabulary.Class getFixture() {
+ return (vocabulary.Class)fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(VocabularyFactory.eINSTANCE.createClass());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} //ClassTest
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/PropertyTest.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/PropertyTest.java
new file mode 100644
index 0000000..72da9d2
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/PropertyTest.java
@@ -0,0 +1,70 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.textui.TestRunner;
+
+import vocabulary.Property;
+import vocabulary.VocabularyFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Property</b></em>'.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PropertyTest extends TermTest {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(PropertyTest.class);
+ }
+
+ /**
+ * Constructs a new Property test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PropertyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Property test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected Property getFixture() {
+ return (Property)fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(VocabularyFactory.eINSTANCE.createProperty());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} //PropertyTest
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/TermTest.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/TermTest.java
new file mode 100644
index 0000000..33b692d
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/TermTest.java
@@ -0,0 +1,55 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.framework.TestCase;
+
+import vocabulary.Term;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Term</b></em>'.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public abstract class TermTest extends TestCase {
+
+ /**
+ * The fixture for this Term test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Term fixture = null;
+
+ /**
+ * Constructs a new Term test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TermTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this Term test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void setFixture(Term fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this Term test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Term getFixture() {
+ return fixture;
+ }
+
+} //TermTest
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabulariesTest.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabulariesTest.java
new file mode 100644
index 0000000..1c8ee6e
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabulariesTest.java
@@ -0,0 +1,89 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.framework.TestCase;
+
+import junit.textui.TestRunner;
+
+import vocabulary.Vocabularies;
+import vocabulary.VocabularyFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Vocabularies</b></em>'.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabulariesTest extends TestCase {
+
+ /**
+ * The fixture for this Vocabularies test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Vocabularies fixture = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(VocabulariesTest.class);
+ }
+
+ /**
+ * Constructs a new Vocabularies test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabulariesTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this Vocabularies test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void setFixture(Vocabularies fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this Vocabularies test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Vocabularies getFixture() {
+ return fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(VocabularyFactory.eINSTANCE.createVocabularies());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} //VocabulariesTest
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyAllTests.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyAllTests.java
new file mode 100644
index 0000000..02a39bc
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyAllTests.java
@@ -0,0 +1,46 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test suite for the '<em><b>Vocabulary</b></em>' model.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyAllTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new VocabularyAllTests("Vocabulary Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyAllTests(String name) {
+ super(name);
+ }
+
+} //VocabularyAllTests
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyExample.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyExample.java
new file mode 100644
index 0000000..93c4587
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyExample.java
@@ -0,0 +1,121 @@
+/**
+ */
+package vocabulary.tests;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.util.Diagnostician;
+
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+
+import vocabulary.Vocabularies;
+import vocabulary.VocabularyFactory;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * A sample utility for the '<em><b>vocabulary</b></em>' package.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyExample {
+ /**
+ * <!-- begin-user-doc -->
+ * Load all the argument file paths or URIs as instances of the model.
+ * <!-- end-user-doc -->
+ * @param args the file paths or URIs.
+ * @generated
+ */
+ public static void main(String[] args) {
+ // Create a resource set to hold the resources.
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Register the appropriate resource factory to handle all file extensions.
+ //
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
+ (Resource.Factory.Registry.DEFAULT_EXTENSION,
+ new XMIResourceFactoryImpl());
+
+ // Register the package to ensure it is available during loading.
+ //
+ resourceSet.getPackageRegistry().put
+ (VocabularyPackage.eNS_URI,
+ VocabularyPackage.eINSTANCE);
+
+ // If there are no arguments, emit an appropriate usage message.
+ //
+ if (args.length == 0) {
+ System.out.println("Enter a list of file paths or URIs that have content like this:");
+ try {
+ Resource resource = resourceSet.createResource(URI.createURI("http:///My.vocabulary"));
+ Vocabularies root = VocabularyFactory.eINSTANCE.createVocabularies();
+ resource.getContents().add(root);
+ resource.save(System.out, null);
+ }
+ catch (IOException exception) {
+ exception.printStackTrace();
+ }
+ }
+ else {
+ // Iterate over all the arguments.
+ //
+ for (int i = 0; i < args.length; ++i) {
+ // Construct the URI for the instance file.
+ // The argument is treated as a file path only if it denotes an existing file.
+ // Otherwise, it's directly treated as a URL.
+ //
+ File file = new File(args[i]);
+ URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[i]);
+
+ try {
+ // Demand load resource for this file.
+ //
+ Resource resource = resourceSet.getResource(uri, true);
+ System.out.println("Loaded " + uri);
+
+ // Validate the contents of the loaded resource.
+ //
+ for (EObject eObject : resource.getContents()) {
+ Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ printDiagnostic(diagnostic, "");
+ }
+ }
+ }
+ catch (RuntimeException exception) {
+ System.out.println("Problem loading " + uri);
+ exception.printStackTrace();
+ }
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * Prints diagnostics with indentation.
+ * <!-- end-user-doc -->
+ * @param diagnostic the diagnostic to print.
+ * @param indent the indentation for printing.
+ * @generated
+ */
+ protected static void printDiagnostic(Diagnostic diagnostic, String indent) {
+ System.out.print(indent);
+ System.out.println(diagnostic.getMessage());
+ for (Diagnostic child : diagnostic.getChildren()) {
+ printDiagnostic(child, indent + " ");
+ }
+ }
+
+} //VocabularyExample
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyTest.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyTest.java
new file mode 100644
index 0000000..a8b9899
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyTest.java
@@ -0,0 +1,89 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.framework.TestCase;
+
+import junit.textui.TestRunner;
+
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Vocabulary</b></em>'.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyTest extends TestCase {
+
+ /**
+ * The fixture for this Vocabulary test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Vocabulary fixture = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(VocabularyTest.class);
+ }
+
+ /**
+ * Constructs a new Vocabulary test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this Vocabulary test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void setFixture(Vocabulary fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this Vocabulary test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Vocabulary getFixture() {
+ return fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(VocabularyFactory.eINSTANCE.createVocabulary());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} //VocabularyTest
diff --git a/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyTests.java b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyTests.java
new file mode 100644
index 0000000..d47d0bb
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model.tests/src/vocabulary/tests/VocabularyTests.java
@@ -0,0 +1,46 @@
+/**
+ */
+package vocabulary.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test suite for the '<em><b>vocabulary</b></em>' package.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new VocabularyTests("vocabulary Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyTests(String name) {
+ super(name);
+ }
+
+} //VocabularyTests
diff --git a/org.eclipse.lyo.tools.vocabulary.model/.classpath b/org.eclipse.lyo.tools.vocabulary.model/.classpath
new file mode 100644
index 0000000..22f3064
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.lyo.tools.vocabulary.model/.gitignore b/org.eclipse.lyo.tools.vocabulary.model/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.model/.project b/org.eclipse.lyo.tools.vocabulary.model/.project
new file mode 100644
index 0000000..80e3090
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.lyo.tools.vocabulary.model</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.lyo.tools.vocabulary.model/META-INF/MANIFEST.MF b/org.eclipse.lyo.tools.vocabulary.model/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fecb4a3
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.lyo.tools.vocabulary.model;singleton:=true
+Bundle-Version: 2.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: vocabulary,
+ vocabulary.impl,
+ vocabulary.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.lyo.tools.vocabulary.model/build.properties b/org.eclipse.lyo.tools.vocabulary.model/build.properties
new file mode 100644
index 0000000..aa060dc
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/build.properties
@@ -0,0 +1,9 @@
+#
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/org.eclipse.lyo.tools.vocabulary.model/plugin.properties b/org.eclipse.lyo.tools.vocabulary.model/plugin.properties
new file mode 100644
index 0000000..6fd18c4
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/plugin.properties
@@ -0,0 +1,4 @@
+#
+
+pluginName = Vocabulary Model
+providerName = www.example.org
diff --git a/org.eclipse.lyo.tools.vocabulary.model/plugin.xml b/org.eclipse.lyo.tools.vocabulary.model/plugin.xml
new file mode 100644
index 0000000..5061ecd
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/plugin.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated vocabulary -->
+ <package
+ uri="http://org.eclipse.lyo/oslc4j/vocabulary"
+ class="vocabulary.VocabularyPackage"/>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Class.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Class.java
new file mode 100644
index 0000000..e4dda80
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Class.java
@@ -0,0 +1,40 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Class</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.Class#getSubClassOf <em>Sub Class Of</em>}</li>
+ * </ul>
+ *
+ * @see vocabulary.VocabularyPackage#getClass_()
+ * @model
+ * @generated
+ */
+public interface Class extends Term {
+ /**
+ * Returns the value of the '<em><b>Sub Class Of</b></em>' reference list.
+ * The list contents are of type {@link vocabulary.Class}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sub Class Of</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sub Class Of</em>' reference list.
+ * @see vocabulary.VocabularyPackage#getClass_SubClassOf()
+ * @model
+ * @generated
+ */
+ EList<Class> getSubClassOf();
+
+} // Class
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Property.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Property.java
new file mode 100644
index 0000000..0c83b12
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Property.java
@@ -0,0 +1,40 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Property</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.Property#getSubPropertyOf <em>Sub Property Of</em>}</li>
+ * </ul>
+ *
+ * @see vocabulary.VocabularyPackage#getProperty()
+ * @model
+ * @generated
+ */
+public interface Property extends Term {
+ /**
+ * Returns the value of the '<em><b>Sub Property Of</b></em>' reference list.
+ * The list contents are of type {@link vocabulary.Property}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sub Property Of</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sub Property Of</em>' reference list.
+ * @see vocabulary.VocabularyPackage#getProperty_SubPropertyOf()
+ * @model
+ * @generated
+ */
+ EList<Property> getSubPropertyOf();
+
+} // Property
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Term.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Term.java
new file mode 100644
index 0000000..7b72ddf
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Term.java
@@ -0,0 +1,131 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Term</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.Term#getName <em>Name</em>}</li>
+ * <li>{@link vocabulary.Term#getLabel <em>Label</em>}</li>
+ * <li>{@link vocabulary.Term#getComment <em>Comment</em>}</li>
+ * <li>{@link vocabulary.Term#getSeeAlso <em>See Also</em>}</li>
+ * </ul>
+ *
+ * @see vocabulary.VocabularyPackage#getTerm()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Term extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see vocabulary.VocabularyPackage#getTerm_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Term#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Label</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Label</em>' attribute.
+ * @see #setLabel(String)
+ * @see vocabulary.VocabularyPackage#getTerm_Label()
+ * @model required="true"
+ * @generated
+ */
+ String getLabel();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Term#getLabel <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Label</em>' attribute.
+ * @see #getLabel()
+ * @generated
+ */
+ void setLabel(String value);
+
+ /**
+ * Returns the value of the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Comment</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Comment</em>' attribute.
+ * @see #setComment(String)
+ * @see vocabulary.VocabularyPackage#getTerm_Comment()
+ * @model required="true"
+ * @generated
+ */
+ String getComment();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Term#getComment <em>Comment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Comment</em>' attribute.
+ * @see #getComment()
+ * @generated
+ */
+ void setComment(String value);
+
+ /**
+ * Returns the value of the '<em><b>See Also</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>See Also</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>See Also</em>' attribute.
+ * @see #setSeeAlso(String)
+ * @see vocabulary.VocabularyPackage#getTerm_SeeAlso()
+ * @model
+ * @generated
+ */
+ String getSeeAlso();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Term#getSeeAlso <em>See Also</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>See Also</em>' attribute.
+ * @see #getSeeAlso()
+ * @generated
+ */
+ void setSeeAlso(String value);
+
+} // Term
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Vocabularies.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Vocabularies.java
new file mode 100644
index 0000000..392d84a
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Vocabularies.java
@@ -0,0 +1,42 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Vocabularies</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.Vocabularies#getVocabularies <em>Vocabularies</em>}</li>
+ * </ul>
+ *
+ * @see vocabulary.VocabularyPackage#getVocabularies()
+ * @model
+ * @generated
+ */
+public interface Vocabularies extends EObject {
+ /**
+ * Returns the value of the '<em><b>Vocabularies</b></em>' containment reference list.
+ * The list contents are of type {@link vocabulary.Vocabulary}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Vocabularies</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Vocabularies</em>' containment reference list.
+ * @see vocabulary.VocabularyPackage#getVocabularies_Vocabularies()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Vocabulary> getVocabularies();
+
+} // Vocabularies
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Vocabulary.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Vocabulary.java
new file mode 100644
index 0000000..a7aed78
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/Vocabulary.java
@@ -0,0 +1,177 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Vocabulary</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.Vocabulary#getNamespaceURI <em>Namespace URI</em>}</li>
+ * <li>{@link vocabulary.Vocabulary#getLabel <em>Label</em>}</li>
+ * <li>{@link vocabulary.Vocabulary#getDescription <em>Description</em>}</li>
+ * <li>{@link vocabulary.Vocabulary#getSource <em>Source</em>}</li>
+ * <li>{@link vocabulary.Vocabulary#getPreferredNamespacePrefix <em>Preferred Namespace Prefix</em>}</li>
+ * <li>{@link vocabulary.Vocabulary#getTerms <em>Terms</em>}</li>
+ * </ul>
+ *
+ * @see vocabulary.VocabularyPackage#getVocabulary()
+ * @model
+ * @generated
+ */
+public interface Vocabulary extends EObject {
+ /**
+ * Returns the value of the '<em><b>Namespace URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Namespace URI</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Namespace URI</em>' attribute.
+ * @see #setNamespaceURI(String)
+ * @see vocabulary.VocabularyPackage#getVocabulary_NamespaceURI()
+ * @model required="true"
+ * extendedMetaData="wildcards='' name=''"
+ * @generated
+ */
+ String getNamespaceURI();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Vocabulary#getNamespaceURI <em>Namespace URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Namespace URI</em>' attribute.
+ * @see #getNamespaceURI()
+ * @generated
+ */
+ void setNamespaceURI(String value);
+
+ /**
+ * Returns the value of the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Label</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Label</em>' attribute.
+ * @see #setLabel(String)
+ * @see vocabulary.VocabularyPackage#getVocabulary_Label()
+ * @model required="true"
+ * @generated
+ */
+ String getLabel();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Vocabulary#getLabel <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Label</em>' attribute.
+ * @see #getLabel()
+ * @generated
+ */
+ void setLabel(String value);
+
+ /**
+ * Returns the value of the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Description</em>' attribute.
+ * @see #setDescription(String)
+ * @see vocabulary.VocabularyPackage#getVocabulary_Description()
+ * @model required="true"
+ * @generated
+ */
+ String getDescription();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Vocabulary#getDescription <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Description</em>' attribute.
+ * @see #getDescription()
+ * @generated
+ */
+ void setDescription(String value);
+
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The URI of the RDF source for this vocabulary.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Source</em>' attribute.
+ * @see #setSource(String)
+ * @see vocabulary.VocabularyPackage#getVocabulary_Source()
+ * @model required="true"
+ * @generated
+ */
+ String getSource();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Vocabulary#getSource <em>Source</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source</em>' attribute.
+ * @see #getSource()
+ * @generated
+ */
+ void setSource(String value);
+
+ /**
+ * Returns the value of the '<em><b>Preferred Namespace Prefix</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preferred Namespace Prefix</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Preferred Namespace Prefix</em>' attribute.
+ * @see #setPreferredNamespacePrefix(String)
+ * @see vocabulary.VocabularyPackage#getVocabulary_PreferredNamespacePrefix()
+ * @model required="true"
+ * @generated
+ */
+ String getPreferredNamespacePrefix();
+
+ /**
+ * Sets the value of the '{@link vocabulary.Vocabulary#getPreferredNamespacePrefix <em>Preferred Namespace Prefix</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Preferred Namespace Prefix</em>' attribute.
+ * @see #getPreferredNamespacePrefix()
+ * @generated
+ */
+ void setPreferredNamespacePrefix(String value);
+
+ /**
+ * Returns the value of the '<em><b>Terms</b></em>' containment reference list.
+ * The list contents are of type {@link vocabulary.Term}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Terms</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Terms</em>' containment reference list.
+ * @see vocabulary.VocabularyPackage#getVocabulary_Terms()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Term> getTerms();
+
+} // Vocabulary
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/VocabularyFactory.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/VocabularyFactory.java
new file mode 100644
index 0000000..eea5a82
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/VocabularyFactory.java
@@ -0,0 +1,69 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see vocabulary.VocabularyPackage
+ * @generated
+ */
+public interface VocabularyFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ VocabularyFactory eINSTANCE = vocabulary.impl.VocabularyFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Vocabularies</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Vocabularies</em>'.
+ * @generated
+ */
+ Vocabularies createVocabularies();
+
+ /**
+ * Returns a new object of class '<em>Vocabulary</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Vocabulary</em>'.
+ * @generated
+ */
+ Vocabulary createVocabulary();
+
+ /**
+ * Returns a new object of class '<em>Class</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Class</em>'.
+ * @generated
+ */
+ Class createClass();
+
+ /**
+ * Returns a new object of class '<em>Property</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Property</em>'.
+ * @generated
+ */
+ Property createProperty();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ VocabularyPackage getVocabularyPackage();
+
+} //VocabularyFactory
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/VocabularyPackage.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/VocabularyPackage.java
new file mode 100644
index 0000000..6787227
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/VocabularyPackage.java
@@ -0,0 +1,761 @@
+/**
+ */
+package vocabulary;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see vocabulary.VocabularyFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface VocabularyPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "vocabulary";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://org.eclipse.lyo/oslc4j/vocabulary";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "oscl4j_vocabulary";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ VocabularyPackage eINSTANCE = vocabulary.impl.VocabularyPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link vocabulary.impl.VocabulariesImpl <em>Vocabularies</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.VocabulariesImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getVocabularies()
+ * @generated
+ */
+ int VOCABULARIES = 0;
+
+ /**
+ * The feature id for the '<em><b>Vocabularies</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARIES__VOCABULARIES = 0;
+
+ /**
+ * The number of structural features of the '<em>Vocabularies</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARIES_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Vocabularies</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARIES_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link vocabulary.impl.VocabularyImpl <em>Vocabulary</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.VocabularyImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getVocabulary()
+ * @generated
+ */
+ int VOCABULARY = 1;
+
+ /**
+ * The feature id for the '<em><b>Namespace URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY__NAMESPACE_URI = 0;
+
+ /**
+ * The feature id for the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY__LABEL = 1;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY__DESCRIPTION = 2;
+
+ /**
+ * The feature id for the '<em><b>Source</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY__SOURCE = 3;
+
+ /**
+ * The feature id for the '<em><b>Preferred Namespace Prefix</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY__PREFERRED_NAMESPACE_PREFIX = 4;
+
+ /**
+ * The feature id for the '<em><b>Terms</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY__TERMS = 5;
+
+ /**
+ * The number of structural features of the '<em>Vocabulary</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY_FEATURE_COUNT = 6;
+
+ /**
+ * The number of operations of the '<em>Vocabulary</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VOCABULARY_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link vocabulary.impl.TermImpl <em>Term</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.TermImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getTerm()
+ * @generated
+ */
+ int TERM = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TERM__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TERM__LABEL = 1;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TERM__COMMENT = 2;
+
+ /**
+ * The feature id for the '<em><b>See Also</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TERM__SEE_ALSO = 3;
+
+ /**
+ * The number of structural features of the '<em>Term</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TERM_FEATURE_COUNT = 4;
+
+ /**
+ * The number of operations of the '<em>Term</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TERM_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link vocabulary.impl.ClassImpl <em>Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.ClassImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getClass_()
+ * @generated
+ */
+ int CLASS = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS__NAME = TERM__NAME;
+
+ /**
+ * The feature id for the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS__LABEL = TERM__LABEL;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS__COMMENT = TERM__COMMENT;
+
+ /**
+ * The feature id for the '<em><b>See Also</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS__SEE_ALSO = TERM__SEE_ALSO;
+
+ /**
+ * The feature id for the '<em><b>Sub Class Of</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS__SUB_CLASS_OF = TERM_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS_OPERATION_COUNT = TERM_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link vocabulary.impl.PropertyImpl <em>Property</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.PropertyImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getProperty()
+ * @generated
+ */
+ int PROPERTY = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY__NAME = TERM__NAME;
+
+ /**
+ * The feature id for the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY__LABEL = TERM__LABEL;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY__COMMENT = TERM__COMMENT;
+
+ /**
+ * The feature id for the '<em><b>See Also</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY__SEE_ALSO = TERM__SEE_ALSO;
+
+ /**
+ * The feature id for the '<em><b>Sub Property Of</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY__SUB_PROPERTY_OF = TERM_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY_FEATURE_COUNT = TERM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROPERTY_OPERATION_COUNT = TERM_OPERATION_COUNT + 0;
+
+
+ /**
+ * Returns the meta object for class '{@link vocabulary.Vocabularies <em>Vocabularies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Vocabularies</em>'.
+ * @see vocabulary.Vocabularies
+ * @generated
+ */
+ EClass getVocabularies();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link vocabulary.Vocabularies#getVocabularies <em>Vocabularies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Vocabularies</em>'.
+ * @see vocabulary.Vocabularies#getVocabularies()
+ * @see #getVocabularies()
+ * @generated
+ */
+ EReference getVocabularies_Vocabularies();
+
+ /**
+ * Returns the meta object for class '{@link vocabulary.Vocabulary <em>Vocabulary</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Vocabulary</em>'.
+ * @see vocabulary.Vocabulary
+ * @generated
+ */
+ EClass getVocabulary();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Vocabulary#getNamespaceURI <em>Namespace URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Namespace URI</em>'.
+ * @see vocabulary.Vocabulary#getNamespaceURI()
+ * @see #getVocabulary()
+ * @generated
+ */
+ EAttribute getVocabulary_NamespaceURI();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Vocabulary#getLabel <em>Label</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Label</em>'.
+ * @see vocabulary.Vocabulary#getLabel()
+ * @see #getVocabulary()
+ * @generated
+ */
+ EAttribute getVocabulary_Label();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Vocabulary#getDescription <em>Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Description</em>'.
+ * @see vocabulary.Vocabulary#getDescription()
+ * @see #getVocabulary()
+ * @generated
+ */
+ EAttribute getVocabulary_Description();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Vocabulary#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Source</em>'.
+ * @see vocabulary.Vocabulary#getSource()
+ * @see #getVocabulary()
+ * @generated
+ */
+ EAttribute getVocabulary_Source();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Vocabulary#getPreferredNamespacePrefix <em>Preferred Namespace Prefix</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Preferred Namespace Prefix</em>'.
+ * @see vocabulary.Vocabulary#getPreferredNamespacePrefix()
+ * @see #getVocabulary()
+ * @generated
+ */
+ EAttribute getVocabulary_PreferredNamespacePrefix();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link vocabulary.Vocabulary#getTerms <em>Terms</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Terms</em>'.
+ * @see vocabulary.Vocabulary#getTerms()
+ * @see #getVocabulary()
+ * @generated
+ */
+ EReference getVocabulary_Terms();
+
+ /**
+ * Returns the meta object for class '{@link vocabulary.Term <em>Term</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Term</em>'.
+ * @see vocabulary.Term
+ * @generated
+ */
+ EClass getTerm();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Term#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see vocabulary.Term#getName()
+ * @see #getTerm()
+ * @generated
+ */
+ EAttribute getTerm_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Term#getLabel <em>Label</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Label</em>'.
+ * @see vocabulary.Term#getLabel()
+ * @see #getTerm()
+ * @generated
+ */
+ EAttribute getTerm_Label();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Term#getComment <em>Comment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Comment</em>'.
+ * @see vocabulary.Term#getComment()
+ * @see #getTerm()
+ * @generated
+ */
+ EAttribute getTerm_Comment();
+
+ /**
+ * Returns the meta object for the attribute '{@link vocabulary.Term#getSeeAlso <em>See Also</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>See Also</em>'.
+ * @see vocabulary.Term#getSeeAlso()
+ * @see #getTerm()
+ * @generated
+ */
+ EAttribute getTerm_SeeAlso();
+
+ /**
+ * Returns the meta object for class '{@link vocabulary.Class <em>Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Class</em>'.
+ * @see vocabulary.Class
+ * @generated
+ */
+ EClass getClass_();
+
+ /**
+ * Returns the meta object for the reference list '{@link vocabulary.Class#getSubClassOf <em>Sub Class Of</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Sub Class Of</em>'.
+ * @see vocabulary.Class#getSubClassOf()
+ * @see #getClass_()
+ * @generated
+ */
+ EReference getClass_SubClassOf();
+
+ /**
+ * Returns the meta object for class '{@link vocabulary.Property <em>Property</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Property</em>'.
+ * @see vocabulary.Property
+ * @generated
+ */
+ EClass getProperty();
+
+ /**
+ * Returns the meta object for the reference list '{@link vocabulary.Property#getSubPropertyOf <em>Sub Property Of</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Sub Property Of</em>'.
+ * @see vocabulary.Property#getSubPropertyOf()
+ * @see #getProperty()
+ * @generated
+ */
+ EReference getProperty_SubPropertyOf();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ VocabularyFactory getVocabularyFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link vocabulary.impl.VocabulariesImpl <em>Vocabularies</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.VocabulariesImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getVocabularies()
+ * @generated
+ */
+ EClass VOCABULARIES = eINSTANCE.getVocabularies();
+
+ /**
+ * The meta object literal for the '<em><b>Vocabularies</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference VOCABULARIES__VOCABULARIES = eINSTANCE.getVocabularies_Vocabularies();
+
+ /**
+ * The meta object literal for the '{@link vocabulary.impl.VocabularyImpl <em>Vocabulary</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.VocabularyImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getVocabulary()
+ * @generated
+ */
+ EClass VOCABULARY = eINSTANCE.getVocabulary();
+
+ /**
+ * The meta object literal for the '<em><b>Namespace URI</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute VOCABULARY__NAMESPACE_URI = eINSTANCE.getVocabulary_NamespaceURI();
+
+ /**
+ * The meta object literal for the '<em><b>Label</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute VOCABULARY__LABEL = eINSTANCE.getVocabulary_Label();
+
+ /**
+ * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute VOCABULARY__DESCRIPTION = eINSTANCE.getVocabulary_Description();
+
+ /**
+ * The meta object literal for the '<em><b>Source</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute VOCABULARY__SOURCE = eINSTANCE.getVocabulary_Source();
+
+ /**
+ * The meta object literal for the '<em><b>Preferred Namespace Prefix</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute VOCABULARY__PREFERRED_NAMESPACE_PREFIX = eINSTANCE.getVocabulary_PreferredNamespacePrefix();
+
+ /**
+ * The meta object literal for the '<em><b>Terms</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference VOCABULARY__TERMS = eINSTANCE.getVocabulary_Terms();
+
+ /**
+ * The meta object literal for the '{@link vocabulary.impl.TermImpl <em>Term</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.TermImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getTerm()
+ * @generated
+ */
+ EClass TERM = eINSTANCE.getTerm();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TERM__NAME = eINSTANCE.getTerm_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Label</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TERM__LABEL = eINSTANCE.getTerm_Label();
+
+ /**
+ * The meta object literal for the '<em><b>Comment</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TERM__COMMENT = eINSTANCE.getTerm_Comment();
+
+ /**
+ * The meta object literal for the '<em><b>See Also</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TERM__SEE_ALSO = eINSTANCE.getTerm_SeeAlso();
+
+ /**
+ * The meta object literal for the '{@link vocabulary.impl.ClassImpl <em>Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.ClassImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getClass_()
+ * @generated
+ */
+ EClass CLASS = eINSTANCE.getClass_();
+
+ /**
+ * The meta object literal for the '<em><b>Sub Class Of</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CLASS__SUB_CLASS_OF = eINSTANCE.getClass_SubClassOf();
+
+ /**
+ * The meta object literal for the '{@link vocabulary.impl.PropertyImpl <em>Property</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see vocabulary.impl.PropertyImpl
+ * @see vocabulary.impl.VocabularyPackageImpl#getProperty()
+ * @generated
+ */
+ EClass PROPERTY = eINSTANCE.getProperty();
+
+ /**
+ * The meta object literal for the '<em><b>Sub Property Of</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROPERTY__SUB_PROPERTY_OF = eINSTANCE.getProperty_SubPropertyOf();
+
+ }
+
+} //VocabularyPackage
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/ClassImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/ClassImpl.java
new file mode 100644
index 0000000..7f19a0b
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/ClassImpl.java
@@ -0,0 +1,130 @@
+/**
+ */
+package vocabulary.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Class</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.impl.ClassImpl#getSubClassOf <em>Sub Class Of</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class ClassImpl extends TermImpl implements vocabulary.Class {
+ /**
+ * The cached value of the '{@link #getSubClassOf() <em>Sub Class Of</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubClassOf()
+ * @generated
+ * @ordered
+ */
+ protected EList<vocabulary.Class> subClassOf;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ClassImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return VocabularyPackage.Literals.CLASS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<vocabulary.Class> getSubClassOf() {
+ if (subClassOf == null) {
+ subClassOf = new EObjectResolvingEList<vocabulary.Class>(vocabulary.Class.class, this, VocabularyPackage.CLASS__SUB_CLASS_OF);
+ }
+ return subClassOf;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case VocabularyPackage.CLASS__SUB_CLASS_OF:
+ return getSubClassOf();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case VocabularyPackage.CLASS__SUB_CLASS_OF:
+ getSubClassOf().clear();
+ getSubClassOf().addAll((Collection<? extends vocabulary.Class>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.CLASS__SUB_CLASS_OF:
+ getSubClassOf().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.CLASS__SUB_CLASS_OF:
+ return subClassOf != null && !subClassOf.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ClassImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/PropertyImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/PropertyImpl.java
new file mode 100644
index 0000000..8aba43a
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/PropertyImpl.java
@@ -0,0 +1,131 @@
+/**
+ */
+package vocabulary.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import vocabulary.Property;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Property</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.impl.PropertyImpl#getSubPropertyOf <em>Sub Property Of</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class PropertyImpl extends TermImpl implements Property {
+ /**
+ * The cached value of the '{@link #getSubPropertyOf() <em>Sub Property Of</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubPropertyOf()
+ * @generated
+ * @ordered
+ */
+ protected EList<Property> subPropertyOf;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return VocabularyPackage.Literals.PROPERTY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Property> getSubPropertyOf() {
+ if (subPropertyOf == null) {
+ subPropertyOf = new EObjectResolvingEList<Property>(Property.class, this, VocabularyPackage.PROPERTY__SUB_PROPERTY_OF);
+ }
+ return subPropertyOf;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case VocabularyPackage.PROPERTY__SUB_PROPERTY_OF:
+ return getSubPropertyOf();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case VocabularyPackage.PROPERTY__SUB_PROPERTY_OF:
+ getSubPropertyOf().clear();
+ getSubPropertyOf().addAll((Collection<? extends Property>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.PROPERTY__SUB_PROPERTY_OF:
+ getSubPropertyOf().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.PROPERTY__SUB_PROPERTY_OF:
+ return subPropertyOf != null && !subPropertyOf.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PropertyImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/TermImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/TermImpl.java
new file mode 100644
index 0000000..7c739fe
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/TermImpl.java
@@ -0,0 +1,325 @@
+/**
+ */
+package vocabulary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import vocabulary.Term;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Term</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.impl.TermImpl#getName <em>Name</em>}</li>
+ * <li>{@link vocabulary.impl.TermImpl#getLabel <em>Label</em>}</li>
+ * <li>{@link vocabulary.impl.TermImpl#getComment <em>Comment</em>}</li>
+ * <li>{@link vocabulary.impl.TermImpl#getSeeAlso <em>See Also</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public abstract class TermImpl extends MinimalEObjectImpl.Container implements Term {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected static final String LABEL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected String label = LABEL_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getComment() <em>Comment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComment()
+ * @generated
+ * @ordered
+ */
+ protected static final String COMMENT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getComment() <em>Comment</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComment()
+ * @generated
+ * @ordered
+ */
+ protected String comment = COMMENT_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSeeAlso() <em>See Also</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSeeAlso()
+ * @generated
+ * @ordered
+ */
+ protected static final String SEE_ALSO_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSeeAlso() <em>See Also</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSeeAlso()
+ * @generated
+ * @ordered
+ */
+ protected String seeAlso = SEE_ALSO_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TermImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return VocabularyPackage.Literals.TERM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.TERM__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLabel(String newLabel) {
+ String oldLabel = label;
+ label = newLabel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.TERM__LABEL, oldLabel, label));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getComment() {
+ return comment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setComment(String newComment) {
+ String oldComment = comment;
+ comment = newComment;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.TERM__COMMENT, oldComment, comment));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSeeAlso() {
+ return seeAlso;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSeeAlso(String newSeeAlso) {
+ String oldSeeAlso = seeAlso;
+ seeAlso = newSeeAlso;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.TERM__SEE_ALSO, oldSeeAlso, seeAlso));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case VocabularyPackage.TERM__NAME:
+ return getName();
+ case VocabularyPackage.TERM__LABEL:
+ return getLabel();
+ case VocabularyPackage.TERM__COMMENT:
+ return getComment();
+ case VocabularyPackage.TERM__SEE_ALSO:
+ return getSeeAlso();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case VocabularyPackage.TERM__NAME:
+ setName((String)newValue);
+ return;
+ case VocabularyPackage.TERM__LABEL:
+ setLabel((String)newValue);
+ return;
+ case VocabularyPackage.TERM__COMMENT:
+ setComment((String)newValue);
+ return;
+ case VocabularyPackage.TERM__SEE_ALSO:
+ setSeeAlso((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.TERM__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case VocabularyPackage.TERM__LABEL:
+ setLabel(LABEL_EDEFAULT);
+ return;
+ case VocabularyPackage.TERM__COMMENT:
+ setComment(COMMENT_EDEFAULT);
+ return;
+ case VocabularyPackage.TERM__SEE_ALSO:
+ setSeeAlso(SEE_ALSO_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.TERM__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case VocabularyPackage.TERM__LABEL:
+ return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
+ case VocabularyPackage.TERM__COMMENT:
+ return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
+ case VocabularyPackage.TERM__SEE_ALSO:
+ return SEE_ALSO_EDEFAULT == null ? seeAlso != null : !SEE_ALSO_EDEFAULT.equals(seeAlso);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", label: ");
+ result.append(label);
+ result.append(", comment: ");
+ result.append(comment);
+ result.append(", seeAlso: ");
+ result.append(seeAlso);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TermImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabulariesImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabulariesImpl.java
new file mode 100644
index 0000000..965cd20
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabulariesImpl.java
@@ -0,0 +1,152 @@
+/**
+ */
+package vocabulary.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import vocabulary.Vocabularies;
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Vocabularies</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.impl.VocabulariesImpl#getVocabularies <em>Vocabularies</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class VocabulariesImpl extends MinimalEObjectImpl.Container implements Vocabularies {
+ /**
+ * The cached value of the '{@link #getVocabularies() <em>Vocabularies</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getVocabularies()
+ * @generated
+ * @ordered
+ */
+ protected EList<Vocabulary> vocabularies;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabulariesImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return VocabularyPackage.Literals.VOCABULARIES;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Vocabulary> getVocabularies() {
+ if (vocabularies == null) {
+ vocabularies = new EObjectContainmentEList<Vocabulary>(Vocabulary.class, this, VocabularyPackage.VOCABULARIES__VOCABULARIES);
+ }
+ return vocabularies;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARIES__VOCABULARIES:
+ return ((InternalEList<?>)getVocabularies()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARIES__VOCABULARIES:
+ return getVocabularies();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARIES__VOCABULARIES:
+ getVocabularies().clear();
+ getVocabularies().addAll((Collection<? extends Vocabulary>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARIES__VOCABULARIES:
+ getVocabularies().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARIES__VOCABULARIES:
+ return vocabularies != null && !vocabularies.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //VocabulariesImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyFactoryImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyFactoryImpl.java
new file mode 100644
index 0000000..f662b65
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyFactoryImpl.java
@@ -0,0 +1,132 @@
+/**
+ */
+package vocabulary.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import vocabulary.Property;
+import vocabulary.Vocabularies;
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyFactory;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyFactoryImpl extends EFactoryImpl implements VocabularyFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static VocabularyFactory init() {
+ try {
+ VocabularyFactory theVocabularyFactory = (VocabularyFactory)EPackage.Registry.INSTANCE.getEFactory(VocabularyPackage.eNS_URI);
+ if (theVocabularyFactory != null) {
+ return theVocabularyFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new VocabularyFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case VocabularyPackage.VOCABULARIES: return createVocabularies();
+ case VocabularyPackage.VOCABULARY: return createVocabulary();
+ case VocabularyPackage.CLASS: return createClass();
+ case VocabularyPackage.PROPERTY: return createProperty();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Vocabularies createVocabularies() {
+ VocabulariesImpl vocabularies = new VocabulariesImpl();
+ return vocabularies;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Vocabulary createVocabulary() {
+ VocabularyImpl vocabulary = new VocabularyImpl();
+ return vocabulary;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public vocabulary.Class createClass() {
+ ClassImpl class_ = new ClassImpl();
+ return class_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Property createProperty() {
+ PropertyImpl property = new PropertyImpl();
+ return property;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyPackage getVocabularyPackage() {
+ return (VocabularyPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static VocabularyPackage getPackage() {
+ return VocabularyPackage.eINSTANCE;
+ }
+
+} //VocabularyFactoryImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyImpl.java
new file mode 100644
index 0000000..c55f87f
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyImpl.java
@@ -0,0 +1,438 @@
+/**
+ */
+package vocabulary.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import vocabulary.Term;
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Vocabulary</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link vocabulary.impl.VocabularyImpl#getNamespaceURI <em>Namespace URI</em>}</li>
+ * <li>{@link vocabulary.impl.VocabularyImpl#getLabel <em>Label</em>}</li>
+ * <li>{@link vocabulary.impl.VocabularyImpl#getDescription <em>Description</em>}</li>
+ * <li>{@link vocabulary.impl.VocabularyImpl#getSource <em>Source</em>}</li>
+ * <li>{@link vocabulary.impl.VocabularyImpl#getPreferredNamespacePrefix <em>Preferred Namespace Prefix</em>}</li>
+ * <li>{@link vocabulary.impl.VocabularyImpl#getTerms <em>Terms</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class VocabularyImpl extends MinimalEObjectImpl.Container implements Vocabulary {
+ /**
+ * The default value of the '{@link #getNamespaceURI() <em>Namespace URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNamespaceURI()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAMESPACE_URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getNamespaceURI() <em>Namespace URI</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNamespaceURI()
+ * @generated
+ * @ordered
+ */
+ protected String namespaceURI = NAMESPACE_URI_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected static final String LABEL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected String label = LABEL_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final String DESCRIPTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected String description = DESCRIPTION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSource() <em>Source</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSource()
+ * @generated
+ * @ordered
+ */
+ protected static final String SOURCE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSource() <em>Source</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSource()
+ * @generated
+ * @ordered
+ */
+ protected String source = SOURCE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPreferredNamespacePrefix() <em>Preferred Namespace Prefix</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferredNamespacePrefix()
+ * @generated
+ * @ordered
+ */
+ protected static final String PREFERRED_NAMESPACE_PREFIX_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPreferredNamespacePrefix() <em>Preferred Namespace Prefix</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPreferredNamespacePrefix()
+ * @generated
+ * @ordered
+ */
+ protected String preferredNamespacePrefix = PREFERRED_NAMESPACE_PREFIX_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTerms() <em>Terms</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTerms()
+ * @generated
+ * @ordered
+ */
+ protected EList<Term> terms;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return VocabularyPackage.Literals.VOCABULARY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getNamespaceURI() {
+ return namespaceURI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNamespaceURI(String newNamespaceURI) {
+ String oldNamespaceURI = namespaceURI;
+ namespaceURI = newNamespaceURI;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.VOCABULARY__NAMESPACE_URI, oldNamespaceURI, namespaceURI));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLabel(String newLabel) {
+ String oldLabel = label;
+ label = newLabel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.VOCABULARY__LABEL, oldLabel, label));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDescription(String newDescription) {
+ String oldDescription = description;
+ description = newDescription;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.VOCABULARY__DESCRIPTION, oldDescription, description));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSource(String newSource) {
+ String oldSource = source;
+ source = newSource;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.VOCABULARY__SOURCE, oldSource, source));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPreferredNamespacePrefix() {
+ return preferredNamespacePrefix;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPreferredNamespacePrefix(String newPreferredNamespacePrefix) {
+ String oldPreferredNamespacePrefix = preferredNamespacePrefix;
+ preferredNamespacePrefix = newPreferredNamespacePrefix;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, VocabularyPackage.VOCABULARY__PREFERRED_NAMESPACE_PREFIX, oldPreferredNamespacePrefix, preferredNamespacePrefix));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Term> getTerms() {
+ if (terms == null) {
+ terms = new EObjectContainmentEList<Term>(Term.class, this, VocabularyPackage.VOCABULARY__TERMS);
+ }
+ return terms;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARY__TERMS:
+ return ((InternalEList<?>)getTerms()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARY__NAMESPACE_URI:
+ return getNamespaceURI();
+ case VocabularyPackage.VOCABULARY__LABEL:
+ return getLabel();
+ case VocabularyPackage.VOCABULARY__DESCRIPTION:
+ return getDescription();
+ case VocabularyPackage.VOCABULARY__SOURCE:
+ return getSource();
+ case VocabularyPackage.VOCABULARY__PREFERRED_NAMESPACE_PREFIX:
+ return getPreferredNamespacePrefix();
+ case VocabularyPackage.VOCABULARY__TERMS:
+ return getTerms();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARY__NAMESPACE_URI:
+ setNamespaceURI((String)newValue);
+ return;
+ case VocabularyPackage.VOCABULARY__LABEL:
+ setLabel((String)newValue);
+ return;
+ case VocabularyPackage.VOCABULARY__DESCRIPTION:
+ setDescription((String)newValue);
+ return;
+ case VocabularyPackage.VOCABULARY__SOURCE:
+ setSource((String)newValue);
+ return;
+ case VocabularyPackage.VOCABULARY__PREFERRED_NAMESPACE_PREFIX:
+ setPreferredNamespacePrefix((String)newValue);
+ return;
+ case VocabularyPackage.VOCABULARY__TERMS:
+ getTerms().clear();
+ getTerms().addAll((Collection<? extends Term>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARY__NAMESPACE_URI:
+ setNamespaceURI(NAMESPACE_URI_EDEFAULT);
+ return;
+ case VocabularyPackage.VOCABULARY__LABEL:
+ setLabel(LABEL_EDEFAULT);
+ return;
+ case VocabularyPackage.VOCABULARY__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ case VocabularyPackage.VOCABULARY__SOURCE:
+ setSource(SOURCE_EDEFAULT);
+ return;
+ case VocabularyPackage.VOCABULARY__PREFERRED_NAMESPACE_PREFIX:
+ setPreferredNamespacePrefix(PREFERRED_NAMESPACE_PREFIX_EDEFAULT);
+ return;
+ case VocabularyPackage.VOCABULARY__TERMS:
+ getTerms().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case VocabularyPackage.VOCABULARY__NAMESPACE_URI:
+ return NAMESPACE_URI_EDEFAULT == null ? namespaceURI != null : !NAMESPACE_URI_EDEFAULT.equals(namespaceURI);
+ case VocabularyPackage.VOCABULARY__LABEL:
+ return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
+ case VocabularyPackage.VOCABULARY__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case VocabularyPackage.VOCABULARY__SOURCE:
+ return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source);
+ case VocabularyPackage.VOCABULARY__PREFERRED_NAMESPACE_PREFIX:
+ return PREFERRED_NAMESPACE_PREFIX_EDEFAULT == null ? preferredNamespacePrefix != null : !PREFERRED_NAMESPACE_PREFIX_EDEFAULT.equals(preferredNamespacePrefix);
+ case VocabularyPackage.VOCABULARY__TERMS:
+ return terms != null && !terms.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (namespaceURI: ");
+ result.append(namespaceURI);
+ result.append(", label: ");
+ result.append(label);
+ result.append(", description: ");
+ result.append(description);
+ result.append(", source: ");
+ result.append(source);
+ result.append(", preferredNamespacePrefix: ");
+ result.append(preferredNamespacePrefix);
+ result.append(')');
+ return result.toString();
+ }
+
+} //VocabularyImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyPackageImpl.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyPackageImpl.java
new file mode 100644
index 0000000..982316a
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/impl/VocabularyPackageImpl.java
@@ -0,0 +1,416 @@
+/**
+ */
+package vocabulary.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import vocabulary.Property;
+import vocabulary.Term;
+import vocabulary.Vocabularies;
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyFactory;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class VocabularyPackageImpl extends EPackageImpl implements VocabularyPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass vocabulariesEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass vocabularyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass termEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass classEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass propertyEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see vocabulary.VocabularyPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private VocabularyPackageImpl() {
+ super(eNS_URI, VocabularyFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link VocabularyPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static VocabularyPackage init() {
+ if (isInited) return (VocabularyPackage)EPackage.Registry.INSTANCE.getEPackage(VocabularyPackage.eNS_URI);
+
+ // Obtain or create and register package
+ VocabularyPackageImpl theVocabularyPackage = (VocabularyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof VocabularyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new VocabularyPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theVocabularyPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theVocabularyPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theVocabularyPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(VocabularyPackage.eNS_URI, theVocabularyPackage);
+ return theVocabularyPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getVocabularies() {
+ return vocabulariesEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getVocabularies_Vocabularies() {
+ return (EReference)vocabulariesEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getVocabulary() {
+ return vocabularyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getVocabulary_NamespaceURI() {
+ return (EAttribute)vocabularyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getVocabulary_Label() {
+ return (EAttribute)vocabularyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getVocabulary_Description() {
+ return (EAttribute)vocabularyEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getVocabulary_Source() {
+ return (EAttribute)vocabularyEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getVocabulary_PreferredNamespacePrefix() {
+ return (EAttribute)vocabularyEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getVocabulary_Terms() {
+ return (EReference)vocabularyEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTerm() {
+ return termEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTerm_Name() {
+ return (EAttribute)termEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTerm_Label() {
+ return (EAttribute)termEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTerm_Comment() {
+ return (EAttribute)termEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTerm_SeeAlso() {
+ return (EAttribute)termEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getClass_() {
+ return classEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getClass_SubClassOf() {
+ return (EReference)classEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProperty() {
+ return propertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProperty_SubPropertyOf() {
+ return (EReference)propertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyFactory getVocabularyFactory() {
+ return (VocabularyFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ vocabulariesEClass = createEClass(VOCABULARIES);
+ createEReference(vocabulariesEClass, VOCABULARIES__VOCABULARIES);
+
+ vocabularyEClass = createEClass(VOCABULARY);
+ createEAttribute(vocabularyEClass, VOCABULARY__NAMESPACE_URI);
+ createEAttribute(vocabularyEClass, VOCABULARY__LABEL);
+ createEAttribute(vocabularyEClass, VOCABULARY__DESCRIPTION);
+ createEAttribute(vocabularyEClass, VOCABULARY__SOURCE);
+ createEAttribute(vocabularyEClass, VOCABULARY__PREFERRED_NAMESPACE_PREFIX);
+ createEReference(vocabularyEClass, VOCABULARY__TERMS);
+
+ termEClass = createEClass(TERM);
+ createEAttribute(termEClass, TERM__NAME);
+ createEAttribute(termEClass, TERM__LABEL);
+ createEAttribute(termEClass, TERM__COMMENT);
+ createEAttribute(termEClass, TERM__SEE_ALSO);
+
+ classEClass = createEClass(CLASS);
+ createEReference(classEClass, CLASS__SUB_CLASS_OF);
+
+ propertyEClass = createEClass(PROPERTY);
+ createEReference(propertyEClass, PROPERTY__SUB_PROPERTY_OF);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ classEClass.getESuperTypes().add(this.getTerm());
+ propertyEClass.getESuperTypes().add(this.getTerm());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(vocabulariesEClass, Vocabularies.class, "Vocabularies", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getVocabularies_Vocabularies(), this.getVocabulary(), null, "vocabularies", null, 0, -1, Vocabularies.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(vocabularyEClass, Vocabulary.class, "Vocabulary", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getVocabulary_NamespaceURI(), ecorePackage.getEString(), "namespaceURI", null, 1, 1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getVocabulary_Label(), ecorePackage.getEString(), "label", null, 1, 1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getVocabulary_Description(), ecorePackage.getEString(), "description", null, 1, 1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getVocabulary_Source(), ecorePackage.getEString(), "source", null, 1, 1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getVocabulary_PreferredNamespacePrefix(), ecorePackage.getEString(), "preferredNamespacePrefix", null, 1, 1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getVocabulary_Terms(), this.getTerm(), null, "terms", null, 0, -1, Vocabulary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(termEClass, Term.class, "Term", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getTerm_Name(), ecorePackage.getEString(), "name", null, 1, 1, Term.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTerm_Label(), ecorePackage.getEString(), "label", null, 1, 1, Term.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTerm_Comment(), ecorePackage.getEString(), "comment", null, 1, 1, Term.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTerm_SeeAlso(), ecorePackage.getEString(), "seeAlso", null, 0, 1, Term.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(classEClass, vocabulary.Class.class, "Class", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getClass_SubClassOf(), this.getClass_(), null, "subClassOf", null, 0, -1, vocabulary.Class.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getProperty_SubPropertyOf(), this.getProperty(), null, "subPropertyOf", null, 0, -1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations() {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (getVocabulary_NamespaceURI(),
+ source,
+ new String[] {
+ "wildcards", "",
+ "name", ""
+ });
+ }
+
+} //VocabularyPackageImpl
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/util/VocabularyAdapterFactory.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/util/VocabularyAdapterFactory.java
new file mode 100644
index 0000000..2f9a099
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/util/VocabularyAdapterFactory.java
@@ -0,0 +1,196 @@
+/**
+ */
+package vocabulary.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import vocabulary.Property;
+import vocabulary.Term;
+import vocabulary.Vocabularies;
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see vocabulary.VocabularyPackage
+ * @generated
+ */
+public class VocabularyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static VocabularyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = VocabularyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected VocabularySwitch<Adapter> modelSwitch =
+ new VocabularySwitch<Adapter>() {
+ @Override
+ public Adapter caseVocabularies(Vocabularies object) {
+ return createVocabulariesAdapter();
+ }
+ @Override
+ public Adapter caseVocabulary(Vocabulary object) {
+ return createVocabularyAdapter();
+ }
+ @Override
+ public Adapter caseTerm(Term object) {
+ return createTermAdapter();
+ }
+ @Override
+ public Adapter caseClass(vocabulary.Class object) {
+ return createClassAdapter();
+ }
+ @Override
+ public Adapter caseProperty(Property object) {
+ return createPropertyAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link vocabulary.Vocabularies <em>Vocabularies</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see vocabulary.Vocabularies
+ * @generated
+ */
+ public Adapter createVocabulariesAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link vocabulary.Vocabulary <em>Vocabulary</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see vocabulary.Vocabulary
+ * @generated
+ */
+ public Adapter createVocabularyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link vocabulary.Term <em>Term</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see vocabulary.Term
+ * @generated
+ */
+ public Adapter createTermAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link vocabulary.Class <em>Class</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see vocabulary.Class
+ * @generated
+ */
+ public Adapter createClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link vocabulary.Property <em>Property</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see vocabulary.Property
+ * @generated
+ */
+ public Adapter createPropertyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //VocabularyAdapterFactory
diff --git a/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/util/VocabularySwitch.java b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/util/VocabularySwitch.java
new file mode 100644
index 0000000..27a8aea
--- /dev/null
+++ b/org.eclipse.lyo.tools.vocabulary.model/src/vocabulary/util/VocabularySwitch.java
@@ -0,0 +1,200 @@
+/**
+ */
+package vocabulary.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import vocabulary.Property;
+import vocabulary.Term;
+import vocabulary.Vocabularies;
+import vocabulary.Vocabulary;
+import vocabulary.VocabularyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see vocabulary.VocabularyPackage
+ * @generated
+ */
+public class VocabularySwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static VocabularyPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public VocabularySwitch() {
+ if (modelPackage == null) {
+ modelPackage = VocabularyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case VocabularyPackage.VOCABULARIES: {
+ Vocabularies vocabularies = (Vocabularies)theEObject;
+ T result = caseVocabularies(vocabularies);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case VocabularyPackage.VOCABULARY: {
+ Vocabulary vocabulary = (Vocabulary)theEObject;
+ T result = caseVocabulary(vocabulary);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case VocabularyPackage.TERM: {
+ Term term = (Term)theEObject;
+ T result = caseTerm(term);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case VocabularyPackage.CLASS: {
+ vocabulary.Class class_ = (vocabulary.Class)theEObject;
+ T result = caseClass(class_);
+ if (result == null) result = caseTerm(class_);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case VocabularyPackage.PROPERTY: {
+ Property property = (Property)theEObject;
+ T result = caseProperty(property);
+ if (result == null) result = caseTerm(property);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Vocabularies</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Vocabularies</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVocabularies(Vocabularies object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Vocabulary</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Vocabulary</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVocabulary(Vocabulary object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Term</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Term</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTerm(Term object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Class</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseClass(vocabulary.Class object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Property</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProperty(Property object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //VocabularySwitch
diff --git a/pom.xml b/pom.xml
index 9d563cb..67a47f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,10 @@
<module>org.eclipse.lyo.tools.toolchain.editor</module>
<module>org.eclipse.lyo.tools.toolchain.model</module>
+ <module>org.eclipse.lyo.tools.vocabulary.editor</module>
+ <module>org.eclipse.lyo.tools.vocabulary.model</module>
+ <module>org.eclipse.lyo.tools.vocabulary.model.edit</module>
+
<module>org.eclipse.lyo.tools.updatesite</module>
</modules>
</project>
\ No newline at end of file