Commit 46db403e authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Make mounting table more informative with material and category columns

parent 6ddec5f3
...@@ -38,9 +38,9 @@ _UI_Catalog_source_feature = Source ...@@ -38,9 +38,9 @@ _UI_Catalog_source_feature = Source
_UI_WindowCatalog_windowTypes_feature = Window Types _UI_WindowCatalog_windowTypes_feature = Window Types
_UI_MaterialCatalog_materialCategories_feature = Material Categories _UI_MaterialCatalog_materialCategories_feature = Material Categories
_UI_MaterialCategory_material_feature = Material _UI_MaterialCategory_material_feature = Material
_UI_MaterialCategory_name_feature = Name _UI_MaterialCategory_name_feature = Category
_UI_Material_id_feature = Id _UI_Material_id_feature = Id
_UI_Material_name_feature = Name _UI_Material_name_feature = Material
_UI_Material_density_feature = Density _UI_Material_density_feature = Density
_UI_Material_heatCapacity_feature = Heat Capacity _UI_Material_heatCapacity_feature = Heat Capacity
_UI_Material_conductivity_feature = Conductivity _UI_Material_conductivity_feature = Conductivity
...@@ -85,3 +85,4 @@ _UI_WindowType_windowTypeId_feature = Window Type Id ...@@ -85,3 +85,4 @@ _UI_WindowType_windowTypeId_feature = Window Type Id
_UI_Material_materialId_feature = Material Id _UI_Material_materialId_feature = Material Id
_UI_Mounting_mountingId_feature = Mounting Id _UI_Mounting_mountingId_feature = Mounting Id
_UI_Layer__feature = Layer _UI_Layer__feature = Layer
_UI_Material_category_feature = Category
...@@ -94,10 +94,8 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin ...@@ -94,10 +94,8 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
itemPropertyDescriptors itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Material_name_feature"), getResourceLocator(), getString("_UI_Material_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Material_name_feature", getString("_UI_Material_name_description"), BuildingPhysicsPackage.Literals.MATERIAL__NAME,
"_UI_Material_type"), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
BuildingPhysicsPackage.Literals.MATERIAL__NAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/** /**
......
...@@ -16,10 +16,21 @@ ...@@ -16,10 +16,21 @@
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_QnRfELPZEeup29SeaUMpQQ"> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_QnRfELPZEeup29SeaUMpQQ">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Layer/thickness"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Layer/thickness"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_123AEL4qEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Material/name"/>
<domainModelEReferencePath href="http://www.hftstuttgart.de/buildingphysics#//Layer/material"/>
</columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6c1I0L4uEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//MaterialCategory/name"/>
<domainModelEReferencePath href="http://www.hftstuttgart.de/buildingphysics#//Layer/material"/>
<domainModelEReferencePath href="http://www.hftstuttgart.de/buildingphysics#//Material/category"/>
</columnDomainModelReferences>
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_MkYRYbPZEeup29SeaUMpQQ"> <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_MkYRYbPZEeup29SeaUMpQQ">
<domainModelEFeature xsi:type="ecore:EReference" href="http://www.hftstuttgart.de/buildingphysics#//Mounting/layers"/> <domainModelEFeature xsi:type="ecore:EReference" href="http://www.hftstuttgart.de/buildingphysics#//Mounting/layers"/>
</domainModelReference> </domainModelReference>
</domainModelReference> </domainModelReference>
<columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:ReadOnlyColumnConfiguration" xmi:id="_rCf9QL44EeuIHZm4y-I19A" columnDomainReferences="_123AEL4qEeuIHZm4y-I19A _6c1I0L4uEeuIHZm4y-I19A"/>
<columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_d7H2QL8HEeuIHZm4y-I19A" columnDomainReference="_QnRfELPZEeup29SeaUMpQQ" weight="30" minWidth="65"/>
</children> </children>
<ecorePaths>/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore</ecorePaths> <ecorePaths>/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore</ecorePaths>
</org.eclipse.emf.ecp.view.model:View> </org.eclipse.emf.ecp.view.model:View>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MaterialCategory"> <eClassifiers xsi:type="ecore:EClass" name="MaterialCategory">
<eStructuralFeatures xsi:type="ecore:EReference" name="materials" upperBound="-1" <eStructuralFeatures xsi:type="ecore:EReference" name="materials" upperBound="-1"
eType="#//Material" containment="true"/> eType="#//Material" containment="true" eOpposite="#//Material/category"/>
<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="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Material"> <eClassifiers xsi:type="ecore:EClass" name="Material">
...@@ -97,6 +97,8 @@ ...@@ -97,6 +97,8 @@
defaultValueLiteral="kg"/> defaultValueLiteral="kg"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="disposalDescription" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="disposalDescription" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="category" ordered="false"
unique="false" lowerBound="1" eType="#//MaterialCategory" eOpposite="#//MaterialCategory/materials"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ConstructionCategory"> <eClassifiers xsi:type="ecore:EClass" name="ConstructionCategory">
<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="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</genClasses> </genClasses>
<genClasses image="false" ecoreClass="buildingphysics.ecore#//Material"> <genClasses image="false" ecoreClass="buildingphysics.ecore#//Material">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/materialId"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/materialId"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/name"/> <genFeatures createChild="false" propertyDescription="Bla Blub" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/name"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/density"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/density"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/heatCapacity"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/heatCapacity"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/conductivity"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/conductivity"/>
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/disposalEnergy"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/disposalEnergy"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/disposalCarbon"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/disposalCarbon"/>
<genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/disposalDescription"/> <genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Material/disposalDescription"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//Material/category"/>
</genClasses> </genClasses>
<genClasses ecoreClass="buildingphysics.ecore#//ConstructionCategory"> <genClasses ecoreClass="buildingphysics.ecore#//ConstructionCategory">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//ConstructionCategory/name"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//ConstructionCategory/name"/>
......
...@@ -594,6 +594,15 @@ public interface BuildingPhysicsPackage extends EPackage { ...@@ -594,6 +594,15 @@ public interface BuildingPhysicsPackage extends EPackage {
*/ */
int MATERIAL__DISPOSAL_DESCRIPTION = 10; int MATERIAL__DISPOSAL_DESCRIPTION = 10;
/**
* The feature id for the '<em><b>Category</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MATERIAL__CATEGORY = 11;
/** /**
* The number of structural features of the '<em>Material</em>' class. * The number of structural features of the '<em>Material</em>' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -601,7 +610,7 @@ public interface BuildingPhysicsPackage extends EPackage { ...@@ -601,7 +610,7 @@ public interface BuildingPhysicsPackage extends EPackage {
* @generated * @generated
* @ordered * @ordered
*/ */
int MATERIAL_FEATURE_COUNT = 11; int MATERIAL_FEATURE_COUNT = 12;
/** /**
* The number of operations of the '<em>Material</em>' class. * The number of operations of the '<em>Material</em>' class.
...@@ -1203,6 +1212,17 @@ public interface BuildingPhysicsPackage extends EPackage { ...@@ -1203,6 +1212,17 @@ public interface BuildingPhysicsPackage extends EPackage {
*/ */
EAttribute getMaterial_DisposalDescription(); EAttribute getMaterial_DisposalDescription();
/**
* Returns the meta object for the container reference '{@link de.hftstuttgart.buildingphysics.Material#getCategory <em>Category</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Category</em>'.
* @see de.hftstuttgart.buildingphysics.Material#getCategory()
* @see #getMaterial()
* @generated
*/
EReference getMaterial_Category();
/** /**
* Returns the meta object for class '{@link de.hftstuttgart.buildingphysics.ConstructionCategory <em>Construction Category</em>}'. * Returns the meta object for class '{@link de.hftstuttgart.buildingphysics.ConstructionCategory <em>Construction Category</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -1675,6 +1695,14 @@ public interface BuildingPhysicsPackage extends EPackage { ...@@ -1675,6 +1695,14 @@ public interface BuildingPhysicsPackage extends EPackage {
*/ */
EAttribute MATERIAL__DISPOSAL_DESCRIPTION = eINSTANCE.getMaterial_DisposalDescription(); EAttribute MATERIAL__DISPOSAL_DESCRIPTION = eINSTANCE.getMaterial_DisposalDescription();
/**
* The meta object literal for the '<em><b>Category</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference MATERIAL__CATEGORY = eINSTANCE.getMaterial_Category();
/** /**
* The meta object literal for the '{@link de.hftstuttgart.buildingphysics.impl.ConstructionCategoryImpl <em>Construction Category</em>}' class. * The meta object literal for the '{@link de.hftstuttgart.buildingphysics.impl.ConstructionCategoryImpl <em>Construction Category</em>}' class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
......
...@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.EObject; ...@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.EObject;
* <li>{@link de.hftstuttgart.buildingphysics.Material#getDisposalEnergy <em>Disposal Energy</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.Material#getDisposalEnergy <em>Disposal Energy</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.Material#getDisposalCarbon <em>Disposal Carbon</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.Material#getDisposalCarbon <em>Disposal Carbon</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.Material#getDisposalDescription <em>Disposal Description</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.Material#getDisposalDescription <em>Disposal Description</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.Material#getCategory <em>Category</em>}</li>
* </ul> * </ul>
* *
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterial() * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterial()
...@@ -282,4 +283,28 @@ public interface Material extends EObject { ...@@ -282,4 +283,28 @@ public interface Material extends EObject {
*/ */
void setDisposalDescription(String value); void setDisposalDescription(String value);
/**
* Returns the value of the '<em><b>Category</b></em>' container reference.
* It is bidirectional and its opposite is '{@link de.hftstuttgart.buildingphysics.MaterialCategory#getMaterials <em>Materials</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Category</em>' container reference.
* @see #setCategory(MaterialCategory)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterial_Category()
* @see de.hftstuttgart.buildingphysics.MaterialCategory#getMaterials
* @model opposite="materials" required="true" transient="false" ordered="false"
* @generated
*/
MaterialCategory getCategory();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.Material#getCategory <em>Category</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Category</em>' container reference.
* @see #getCategory()
* @generated
*/
void setCategory(MaterialCategory value);
} // Material } // Material
...@@ -27,11 +27,13 @@ public interface MaterialCategory extends EObject { ...@@ -27,11 +27,13 @@ public interface MaterialCategory extends EObject {
/** /**
* Returns the value of the '<em><b>Materials</b></em>' containment reference list. * Returns the value of the '<em><b>Materials</b></em>' containment reference list.
* The list contents are of type {@link de.hftstuttgart.buildingphysics.Material}. * The list contents are of type {@link de.hftstuttgart.buildingphysics.Material}.
* It is bidirectional and its opposite is '{@link de.hftstuttgart.buildingphysics.Material#getCategory <em>Category</em>}'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Materials</em>' containment reference list. * @return the value of the '<em>Materials</em>' containment reference list.
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCategory_Materials() * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterialCategory_Materials()
* @model containment="true" * @see de.hftstuttgart.buildingphysics.Material#getCategory
* @model opposite="category" containment="true"
* @generated * @generated
*/ */
EList<Material> getMaterials(); EList<Material> getMaterials();
......
...@@ -578,6 +578,16 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -578,6 +578,16 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
return (EAttribute) materialEClass.getEStructuralFeatures().get(10); return (EAttribute) materialEClass.getEStructuralFeatures().get(10);
} }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EReference getMaterial_Category() {
return (EReference) materialEClass.getEStructuralFeatures().get(11);
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
...@@ -755,6 +765,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -755,6 +765,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
createEAttribute(materialEClass, MATERIAL__DISPOSAL_ENERGY); createEAttribute(materialEClass, MATERIAL__DISPOSAL_ENERGY);
createEAttribute(materialEClass, MATERIAL__DISPOSAL_CARBON); createEAttribute(materialEClass, MATERIAL__DISPOSAL_CARBON);
createEAttribute(materialEClass, MATERIAL__DISPOSAL_DESCRIPTION); createEAttribute(materialEClass, MATERIAL__DISPOSAL_DESCRIPTION);
createEReference(materialEClass, MATERIAL__CATEGORY);
constructionCategoryEClass = createEClass(CONSTRUCTION_CATEGORY); constructionCategoryEClass = createEClass(CONSTRUCTION_CATEGORY);
createEAttribute(constructionCategoryEClass, CONSTRUCTION_CATEGORY__NAME); createEAttribute(constructionCategoryEClass, CONSTRUCTION_CATEGORY__NAME);
...@@ -881,9 +892,9 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -881,9 +892,9 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
initEClass(materialCategoryEClass, MaterialCategory.class, "MaterialCategory", !IS_ABSTRACT, !IS_INTERFACE, initEClass(materialCategoryEClass, MaterialCategory.class, "MaterialCategory", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS); IS_GENERATED_INSTANCE_CLASS);
initEReference(getMaterialCategory_Materials(), this.getMaterial(), null, "materials", null, 0, -1, initEReference(getMaterialCategory_Materials(), this.getMaterial(), this.getMaterial_Category(), "materials",
MaterialCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, null, 0, -1, MaterialCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterialCategory_Name(), ecorePackage.getEString(), "name", null, 1, 1, initEAttribute(getMaterialCategory_Name(), ecorePackage.getEString(), "name", null, 1, 1,
MaterialCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, MaterialCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !IS_DERIVED, IS_ORDERED);
...@@ -921,6 +932,9 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -921,6 +932,9 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
initEAttribute(getMaterial_DisposalDescription(), ecorePackage.getEString(), "disposalDescription", null, 1, 1, initEAttribute(getMaterial_DisposalDescription(), ecorePackage.getEString(), "disposalDescription", null, 1, 1,
Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !IS_DERIVED, IS_ORDERED);
initEReference(getMaterial_Category(), this.getMaterialCategory(), this.getMaterialCategory_Materials(),
"category", null, 1, 1, Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(constructionCategoryEClass, ConstructionCategory.class, "ConstructionCategory", !IS_ABSTRACT, initEClass(constructionCategoryEClass, ConstructionCategory.class, "ConstructionCategory", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
......
...@@ -18,8 +18,7 @@ import org.eclipse.emf.ecore.InternalEObject; ...@@ -18,8 +18,7 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.emf.ecore.util.InternalEList;
/** /**
...@@ -94,8 +93,8 @@ public class MaterialCategoryImpl extends MinimalEObjectImpl.Container implement ...@@ -94,8 +93,8 @@ public class MaterialCategoryImpl extends MinimalEObjectImpl.Container implement
@Override @Override
public EList<Material> getMaterials() { public EList<Material> getMaterials() {
if (materials == null) { if (materials == null) {
materials = new EObjectContainmentEList<Material>(Material.class, this, materials = new EObjectContainmentWithInverseEList<Material>(Material.class, this,
BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS); BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS, BuildingPhysicsPackage.MATERIAL__CATEGORY);
} }
return materials; return materials;
} }
...@@ -124,6 +123,21 @@ public class MaterialCategoryImpl extends MinimalEObjectImpl.Container implement ...@@ -124,6 +123,21 @@ public class MaterialCategoryImpl extends MinimalEObjectImpl.Container implement
oldName, name)); oldName, name));
} }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS:
return ((InternalEList<InternalEObject>) (InternalEList<?>) getMaterials()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
......
...@@ -5,6 +5,7 @@ package de.hftstuttgart.buildingphysics.impl; ...@@ -5,6 +5,7 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material; import de.hftstuttgart.buildingphysics.Material;
import de.hftstuttgart.buildingphysics.MaterialCategory;
import de.hftstuttgart.cityunits.model.NullableQuantity; import de.hftstuttgart.cityunits.model.NullableQuantity;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesFactory; import de.hftstuttgart.cityunits.model.quantities.QuantitiesFactory;
...@@ -12,10 +13,13 @@ import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage; ...@@ -12,10 +13,13 @@ import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass; 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.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -36,6 +40,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; ...@@ -36,6 +40,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalEnergy <em>Disposal Energy</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalEnergy <em>Disposal Energy</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalCarbon <em>Disposal Carbon</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalCarbon <em>Disposal Carbon</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalDescription <em>Disposal Description</em>}</li> * <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getDisposalDescription <em>Disposal Description</em>}</li>
* <li>{@link de.hftstuttgart.buildingphysics.impl.MaterialImpl#getCategory <em>Category</em>}</li>
* </ul> * </ul>
* *
* @generated * @generated
...@@ -552,6 +557,98 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi ...@@ -552,6 +557,98 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
oldDisposalDescription, disposalDescription)); oldDisposalDescription, disposalDescription));
} }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public MaterialCategory getCategory() {
if (eContainerFeatureID() != BuildingPhysicsPackage.MATERIAL__CATEGORY)
return null;
return (MaterialCategory) eInternalContainer();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCategory(MaterialCategory newCategory, NotificationChain msgs) {
msgs = eBasicSetContainer((InternalEObject) newCategory, BuildingPhysicsPackage.MATERIAL__CATEGORY, msgs);
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setCategory(MaterialCategory newCategory) {
if (newCategory != eInternalContainer()
|| (eContainerFeatureID() != BuildingPhysicsPackage.MATERIAL__CATEGORY && newCategory != null)) {
if (EcoreUtil.isAncestor(this, newCategory))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newCategory != null)
msgs = ((InternalEObject) newCategory).eInverseAdd(this,
BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS, MaterialCategory.class, msgs);
msgs = basicSetCategory(newCategory, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__CATEGORY,
newCategory, newCategory));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL__CATEGORY:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
return basicSetCategory((MaterialCategory) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BuildingPhysicsPackage.MATERIAL__CATEGORY:
return basicSetCategory(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
switch (eContainerFeatureID()) {
case BuildingPhysicsPackage.MATERIAL__CATEGORY:
return eInternalContainer().eInverseRemove(this, BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS,
MaterialCategory.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
...@@ -582,6 +679,8 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi ...@@ -582,6 +679,8 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
return getDisposalCarbon(); return getDisposalCarbon();
case BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION: case BuildingPhysicsPackage.MATERIAL__DISPOSAL_DESCRIPTION:
return getDisposalDescription(); return getDisposalDescription();