diff --git a/de.hftstuttgart.buildingphysics.edit/plugin.properties b/de.hftstuttgart.buildingphysics.edit/plugin.properties index b12bd6c6a057ba24bebbcc2ae74d9c7f355c41f9..fb06240c276f16d1aa84ce65e71cef0a010a6ccf 100644 --- a/de.hftstuttgart.buildingphysics.edit/plugin.properties +++ b/de.hftstuttgart.buildingphysics.edit/plugin.properties @@ -10,16 +10,17 @@ _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_PropertyDescriptor_description = {0} of {1} _UI_BuildingPhysicsCatalog_type = Catalog _UI_WindowType_type = Window Type _UI_Catalog_type = Catalog _UI_WindowCatalog_type = Windows _UI_MaterialCatalog_type = Materials and Constructions -_UI_MaterialCategory_type = +_UI_MaterialCategory_type = Material Category _UI_Material_type = Material _UI_Unknown_type = Object +_UI_ConstructionCategory_type = Construction Category _UI_Unknown_datatype= Value @@ -69,7 +70,6 @@ _UI_Material_constructionDescription_feature = Construction Description _UI_Material_disposalEnergy_feature = Disposal Energy _UI_Material_disposalCarbon_feature = Disposal Carbon _UI_Material_disposalDescription_feature = Disposal Description -_UI_ConstructionCategory_type = Constructions _UI_Mounting_type = Mounting _UI_Layer_type = Layer _UI_MaterialCatalog_constructionCategories_feature = Constructions diff --git a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/MaterialCatalogItemProvider.java b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/MaterialCatalogItemProvider.java index b05dcb7002f37f7a188a7ce4e3614e4b9a373dde..eb0bdf189ae9c08ef6a996db0b0266671f37d4d0 100644 --- a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/MaterialCatalogItemProvider.java +++ b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/MaterialCatalogItemProvider.java @@ -2,6 +2,7 @@ */ package de.hftstuttgart.buildingphysics.provider; +import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.MaterialCatalog; @@ -139,6 +140,14 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider { @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors + .add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__MATERIAL_CATEGORIES, + BuildingPhysicsFactory.eINSTANCE.createMaterialCategory())); + + newChildDescriptors + .add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES, + BuildingPhysicsFactory.eINSTANCE.createConstructionCategory())); } } diff --git a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowCatalogItemProvider.java b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowCatalogItemProvider.java index 94d50a8867070171181ef1c244ed8b20167ed8be..89125423925579845c119c9759e066a87cefb272 100644 --- a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowCatalogItemProvider.java +++ b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowCatalogItemProvider.java @@ -10,7 +10,6 @@ import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; @@ -46,36 +45,6 @@ public class WindowCatalogItemProvider extends CatalogItemProvider { 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(BuildingPhysicsPackage.Literals.WINDOW_CATALOG__WINDOW_TYPES); - } - 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 WindowCatalog.gif. * <!-- begin-user-doc --> @@ -121,7 +90,7 @@ public class WindowCatalogItemProvider extends CatalogItemProvider { switch (notification.getFeatureID(WindowCatalog.class)) { case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); diff --git a/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore b/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore index 0eff5484defa858a6aeb0e31de58eead00810a80..cfa87223b2f1146d46da728e6f82263fbcc84fe4 100644 --- a/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore +++ b/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore @@ -61,7 +61,7 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="materialCategories" upperBound="-1" eType="#//MaterialCategory" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="constructionCategories" - lowerBound="1" upperBound="-1" eType="#//ConstructionCategory" containment="true"/> + upperBound="-1" eType="#//ConstructionCategory" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="MaterialCategory"> <eStructuralFeatures xsi:type="ecore:EReference" name="materials" upperBound="-1" diff --git a/de.hftstuttgart.buildingphysics/model/buildingphysics.genmodel b/de.hftstuttgart.buildingphysics/model/buildingphysics.genmodel index 78f1b8723dc2fb54b3fcd5dcf528fe7b561fb222..baee9e7992b525d6307bfc7a3ba42149afdae3ba 100644 --- a/de.hftstuttgart.buildingphysics/model/buildingphysics.genmodel +++ b/de.hftstuttgart.buildingphysics/model/buildingphysics.genmodel @@ -36,11 +36,11 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Catalog/source"/> </genClasses> <genClasses ecoreClass="buildingphysics.ecore#//WindowCatalog"> - <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//WindowCatalog/windowTypes"/> + <genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//WindowCatalog/windowTypes"/> </genClasses> <genClasses ecoreClass="buildingphysics.ecore#//MaterialCatalog"> - <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCatalog/materialCategories"/> - <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCatalog/constructionCategories"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCatalog/materialCategories"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCatalog/constructionCategories"/> </genClasses> <genClasses ecoreClass="buildingphysics.ecore#//MaterialCategory"> <genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCategory/materials"/> diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/MaterialCatalog.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/MaterialCatalog.java index 373f8de64f34e918593dcf755d290dec3516e209..137f4e2f58b84ef9aeec8b20da775a6a53ef3a51 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/MaterialCatalog.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/MaterialCatalog.java @@ -41,7 +41,7 @@ public interface MaterialCatalog extends Catalog { * <!-- end-user-doc --> * @return the value of the '<em>Construction Categories</em>' containment reference list. * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCatalog_ConstructionCategories() - * @model containment="true" required="true" + * @model containment="true" * @generated */ EList<ConstructionCategory> getConstructionCategories(); diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java index 6bfc5b700065568b0d5720ca081762eeb75b5fd2..154e60e44cfaf2c31f8f9f2a4a37f1d296e86fd4 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java @@ -887,7 +887,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building null, 0, -1, MaterialCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getMaterialCatalog_ConstructionCategories(), this.getConstructionCategory(), null, - "constructionCategories", null, 1, -1, MaterialCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, + "constructionCategories", null, 0, -1, MaterialCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(materialCategoryEClass, MaterialCategory.class, "MaterialCategory", !IS_ABSTRACT, !IS_INTERFACE,