From 16f4aa0e2785d0d00511e01f7d04c4b5e00f8aae Mon Sep 17 00:00:00 2001 From: Kai Brassel <mail@khbrassel.de> Date: Mon, 19 Oct 2020 09:59:42 +0200 Subject: [PATCH] Added view model. --- .../demo.catalog.viewmodel/.project | 50 +++++++++++++++ .../META-INF/MANIFEST.MF | 6 ++ .../demo.catalog.viewmodel/build.properties | 4 ++ .../demo.catalog.viewmodel/plugin.xml | 10 +++ .../viewmodels/EnergyComponentsCatalog.view | 61 +++++++++++++++++++ 5 files changed, 131 insertions(+) create mode 100644 EclipseDemoCatalog/demo.catalog.viewmodel/.project create mode 100644 EclipseDemoCatalog/demo.catalog.viewmodel/META-INF/MANIFEST.MF create mode 100644 EclipseDemoCatalog/demo.catalog.viewmodel/build.properties create mode 100644 EclipseDemoCatalog/demo.catalog.viewmodel/plugin.xml create mode 100644 EclipseDemoCatalog/demo.catalog.viewmodel/viewmodels/EnergyComponentsCatalog.view diff --git a/EclipseDemoCatalog/demo.catalog.viewmodel/.project b/EclipseDemoCatalog/demo.catalog.viewmodel/.project new file mode 100644 index 0000000..9ecedcc --- /dev/null +++ b/EclipseDemoCatalog/demo.catalog.viewmodel/.project @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<projectDescription> + + <name>demo.catalog.viewmodel</name> + + <comment/> + + <projects> + </projects> + + <buildSpec> + + <buildCommand> + + <name>org.eclipse.pde.ManifestBuilder</name> + + <arguments> + </arguments> + + </buildCommand> + + <buildCommand> + + <name>org.eclipse.pde.SchemaBuilder</name> + + <arguments> + </arguments> + + </buildCommand> + + <buildCommand> + + <name>org.eclipse.emfforms.ide.builder.viewModelBuilder</name> + + <arguments> + </arguments> + + </buildCommand> + + </buildSpec> + + <natures> + + <nature>org.eclipse.pde.PluginNature</nature> + + <nature>org.eclipse.emfforms.ide.builder.viewModelNature</nature> + + </natures> + +</projectDescription> diff --git a/EclipseDemoCatalog/demo.catalog.viewmodel/META-INF/MANIFEST.MF b/EclipseDemoCatalog/demo.catalog.viewmodel/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5cf3e73 --- /dev/null +++ b/EclipseDemoCatalog/demo.catalog.viewmodel/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: demo.catalog.viewmodel +Bundle-SymbolicName: demo.catalog.viewmodel;singleton:=true +Bundle-Version: 1.0.0.qualifier +Require-Bundle: org.eclipse.emf.ecp.view.model.provider.xmi diff --git a/EclipseDemoCatalog/demo.catalog.viewmodel/build.properties b/EclipseDemoCatalog/demo.catalog.viewmodel/build.properties new file mode 100644 index 0000000..4ad6a71 --- /dev/null +++ b/EclipseDemoCatalog/demo.catalog.viewmodel/build.properties @@ -0,0 +1,4 @@ +bin.includes = META-INF/,\ + plugin.xml,\ + viewmodels/ + \ No newline at end of file diff --git a/EclipseDemoCatalog/demo.catalog.viewmodel/plugin.xml b/EclipseDemoCatalog/demo.catalog.viewmodel/plugin.xml new file mode 100644 index 0000000..9ef6e8a --- /dev/null +++ b/EclipseDemoCatalog/demo.catalog.viewmodel/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.emf.ecp.view.model.provider.xmi.file"> +<file filePath="viewmodels/EnergyComponentsCatalog.view"/> + + </extension> + +</plugin> diff --git a/EclipseDemoCatalog/demo.catalog.viewmodel/viewmodels/EnergyComponentsCatalog.view b/EclipseDemoCatalog/demo.catalog.viewmodel/viewmodels/EnergyComponentsCatalog.view new file mode 100644 index 0000000..d969adf --- /dev/null +++ b/EclipseDemoCatalog/demo.catalog.viewmodel/viewmodels/EnergyComponentsCatalog.view @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<org.eclipse.emf.ecp.view.model:View 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" xmlns:org.eclipse.emf.ecp.view.categorization.model="http://org/eclipse/emf/ecp/view/categorization/model" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model/150" xmi:id="_OiObUAuqEeuYGOU2ZFiRgg" name="EnergyComponentsCatalog"> + <rootEClass href="http://www.example.org/democatalog#//EnergyComponentsCatalog"/> + <children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_OiVwEAuqEeuYGOU2ZFiRgg" name="Control author"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_OiVwEQuqEeuYGOU2ZFiRgg"> + <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.example.org/democatalog#//EnergyComponentsCatalog/author"/> + </domainModelReference> + </children> + <children xsi:type="org.eclipse.emf.ecp.view.categorization.model:CategorizationElement" xmi:id="_KqdsUA4rEeuIveVHr4UvUA" name="Categories"> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Categorization" xmi:id="_hulzQBBwEeu6_IrYkkEtPw" name="Heat"> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Category" xmi:id="_k4tl4BBwEeu6_IrYkkEtPw" name="Boilers"> + <composite xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_cRccYAwCEeuYGOU2ZFiRgg" name="boilers" detailEditing="WithPanel"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_I0FJgAxqEeuYGOU2ZFiRgg"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_I0FJgQxqEeuYGOU2ZFiRgg"> + <domainModelEFeature xsi:type="ecore:EReference" href="http://www.example.org/democatalog#//EnergyComponentsCatalog/boilers"/> + </domainModelReference> + </domainModelReference> + </composite> + </categorizations> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Category" xmi:id="_vbvfwBBwEeu6_IrYkkEtPw" name="CHPs"> + <composite xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_Ps0d0A4pEeuIveVHr4UvUA" name="chps" detailEditing="WithPanel"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_Sw-yYA4pEeuIveVHr4UvUA"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_Sw-yYQ4pEeuIveVHr4UvUA"> + <domainModelEFeature xsi:type="ecore:EReference" href="http://www.example.org/democatalog#//EnergyComponentsCatalog/chps"/> + </domainModelReference> + </domainModelReference> + </composite> + </categorizations> + </categorizations> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Categorization" xmi:id="_iX4A0BBwEeu6_IrYkkEtPw" name="Energy"> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Category" xmi:id="_tM1_QBBwEeu6_IrYkkEtPw" name="Solar Panels"> + <composite xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_0K7PEA4oEeuIveVHr4UvUA" name="solarpanels" detailEditing="WithPanel"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_2xPxEA4oEeuIveVHr4UvUA"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_2xPxEQ4oEeuIveVHr4UvUA"> + <domainModelEFeature xsi:type="ecore:EReference" href="http://www.example.org/democatalog#//EnergyComponentsCatalog/solarpanels"/> + </domainModelReference> + </domainModelReference> + </composite> + </categorizations> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Category" xmi:id="_kjWZ4BBwEeu6_IrYkkEtPw" name="Inverters"> + <composite xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_6-z9sA4oEeuIveVHr4UvUA" name="inverters" detailEditing="WithPanel"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_9LkJIA4oEeuIveVHr4UvUA"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_9LkJIQ4oEeuIveVHr4UvUA"> + <domainModelEFeature xsi:type="ecore:EReference" href="http://www.example.org/democatalog#//EnergyComponentsCatalog/inverters"/> + </domainModelReference> + </domainModelReference> + </composite> + </categorizations> + </categorizations> + <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Category" xmi:id="_jJPzYBBwEeu6_IrYkkEtPw" name="Manufacturers"> + <composite xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_Bpd30A4pEeuIveVHr4UvUA" name="manufacturers" detailEditing="WithPanel"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_DsYx0A4pEeuIveVHr4UvUA"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_DsYx0Q4pEeuIveVHr4UvUA"> + <domainModelEFeature xsi:type="ecore:EReference" href="http://www.example.org/democatalog#//EnergyComponentsCatalog/manufacturers"/> + </domainModelReference> + </domainModelReference> + </composite> + </categorizations> + </children> + <ecorePaths>/demo.catalog/model/democatalog.ecore</ecorePaths> +</org.eclipse.emf.ecp.view.model:View> -- GitLab