Commit 0953347d authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Inclusion of de.hftstuttgart.cityunits plugin

parent 56780a88
......@@ -11,5 +11,7 @@ Bundle-Localization: plugin
Export-Package: de.hftstuttgart.buildingphysics.provider
Require-Bundle: org.eclipse.core.runtime,
de.hftstuttgart.buildingphysics;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport
org.eclipse.emf.edit;visibility:=reexport,
de.hftstuttgart.cityunits.model;visibility:=reexport,
de.hftstuttgart.cityunits.model.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy
......@@ -2,6 +2,7 @@
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.cityunits.model.quantities.provider.QuantitiesEditPlugin;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
......@@ -36,7 +37,7 @@ public final class BuildingPhysicsEditPlugin extends EMFPlugin {
* @generated
*/
public BuildingPhysicsEditPlugin() {
super(new ResourceLocator[] {});
super(new ResourceLocator[] { QuantitiesEditPlugin.INSTANCE, });
}
/**
......
......@@ -122,7 +122,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
getString("_UI_PropertyDescriptor_description", "_UI_Material_heatCapacity_feature",
"_UI_Material_type"),
BuildingPhysicsPackage.Literals.MATERIAL__HEAT_CAPACITY, true, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null));
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
......
......@@ -3,9 +3,10 @@
<viewpoint:DAnalysis uid="_neh8oB3ZEeuNsK3dZmTkbQ" selectedViews="_nfHygB3ZEeuNsK3dZmTkbQ" version="14.3.1.202003261200">
<semanticResources>buildingphysics.ecore</semanticResources>
<semanticResources>buildingphysics.genmodel</semanticResources>
<semanticResources>platform:/resource/de.hftstuttgart.cityunits.model/model/Quantities.ecore</semanticResources>
<ownedViews xmi:type="viewpoint:DView" uid="_nfHygB3ZEeuNsK3dZmTkbQ">
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_nfUm0R3ZEeuNsK3dZmTkbQ" name="buildingphysics" repPath="#_nfTYsB3ZEeuNsK3dZmTkbQ" changeId="e1485cb8-aacf-4b66-a292-682c64bb355b">
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_nfUm0R3ZEeuNsK3dZmTkbQ" name="buildingphysics" repPath="#_nfTYsB3ZEeuNsK3dZmTkbQ" changeId="a1062b51-8959-4afb-9bd9-d8005211eecd">
<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="buildingphysics.ecore#/"/>
</ownedRepresentationDescriptors>
......@@ -310,7 +311,7 @@
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Db79MyQxEeuaK-RhvCx2-Q" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_KeYXAYTuEeuS2t1ZhP-JHQ" 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']"/>
......@@ -346,10 +347,10 @@
</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" uid="_1uk1UCQwEeuaK-RhvCx2-Q" name="glazingNumber : EInt" tooltipText="">
<ownedElements xmi:type="diagram:DNodeListElement" uid="_1uk1UCQwEeuaK-RhvCx2-Q" name="glazingNumber : QuantityLong = 12 m" tooltipText="">
<target xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//WindowType/glazingNumber"/>
<semanticElements xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//WindowType/glazingNumber"/>
<ownedStyle xmi:type="diagram:BundledImage" uid="_4EpU0iQwEeuaK-RhvCx2-Q" labelAlignment="LEFT" description="_FqIYkx3aEeuNsK3dZmTkbQ">
<ownedStyle xmi:type="diagram:BundledImage" uid="_KeZlJYTuEeuS2t1ZhP-JHQ" labelAlignment="LEFT" description="_FqIYkx3aEeuNsK3dZmTkbQ">
<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']"/>
......@@ -483,7 +484,7 @@
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_TwZVHCQvEeuaK-RhvCx2-Q" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_SZB5YYTuEeuS2t1ZhP-JHQ" 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']"/>
......@@ -511,10 +512,10 @@
</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" uid="_JjJd8CQvEeuaK-RhvCx2-Q" name="heatCapacity : EDouble = 0.0" tooltipText="">
<ownedElements xmi:type="diagram:DNodeListElement" uid="_JjJd8CQvEeuaK-RhvCx2-Q" name="heatCapacity : QuantityDouble = 0.0 kW" tooltipText="">
<target xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//Material/heatCapacity"/>
<semanticElements xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//Material/heatCapacity"/>
<ownedStyle xmi:type="diagram:BundledImage" uid="_NygaVyQvEeuaK-RhvCx2-Q" labelAlignment="LEFT" description="_FqIYkx3aEeuNsK3dZmTkbQ">
<ownedStyle xmi:type="diagram:BundledImage" uid="_SZDuk4TuEeuS2t1ZhP-JHQ" labelAlignment="LEFT" description="_FqIYkx3aEeuNsK3dZmTkbQ">
<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']"/>
......
......@@ -19,7 +19,7 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="gValue" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="glazingNumber" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="frameRatio" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
......@@ -52,7 +52,8 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="density" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="heatCapacity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//QuantityDouble"
defaultValueLiteral="0.0 kW"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="conductivity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
</eClassifiers>
......
......@@ -5,7 +5,8 @@
editDirectory="/de.hftstuttgart.buildingphysics.edit/src" editorDirectory="/de.hftstuttgart.buildingphysics.editor/src"
modelPluginID="de.hftstuttgart.buildingphysics" modelName="BuildingPhysics" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
codeFormatting="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="15.0"
copyrightFields="false" operationReflection="true" importOrganizing="true">
copyrightFields="false" usedGenPackages="../../de.hftstuttgart.cityunits.model/model/Quantities.genmodel#//quantities"
operationReflection="true" importOrganizing="true">
<foreignModel>buildingphysics.ecore</foreignModel>
<testsDirectory xsi:nil="true"/>
<genPackages prefix="BuildingPhysics" basePackage="de.hftstuttgart" disposableProviderFactory="true"
......
......@@ -2,6 +2,8 @@
*/
package de.hftstuttgart.buildingphysics;
import de.hftstuttgart.cityunits.model.NullableQuantity;
import org.eclipse.emf.ecore.EObject;
/**
......@@ -93,15 +95,16 @@ public interface Material extends EObject {
/**
* Returns the value of the '<em><b>Heat Capacity</b></em>' attribute.
* The default value is <code>"0.0 kW"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Heat Capacity</em>' attribute.
* @see #setHeatCapacity(double)
* @see #setHeatCapacity(NullableQuantity)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getMaterial_HeatCapacity()
* @model required="true"
* @model default="0.0 kW" dataType="de.hftstuttgart.cityunits.model.quantities.QuantityDouble" required="true"
* @generated
*/
double getHeatCapacity();
NullableQuantity getHeatCapacity();
/**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.Material#getHeatCapacity <em>Heat Capacity</em>}' attribute.
......@@ -111,7 +114,7 @@ public interface Material extends EObject {
* @see #getHeatCapacity()
* @generated
*/
void setHeatCapacity(double value);
void setHeatCapacity(NullableQuantity value);
/**
* Returns the value of the '<em><b>Conductivity</b></em>' attribute.
......
......@@ -116,12 +116,13 @@ public interface WindowType extends EObject {
/**
* Returns the value of the '<em><b>Glazing Number</b></em>' attribute.
* The default value is <code>"0"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Glazing Number</em>' attribute.
* @see #setGlazingNumber(int)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_GlazingNumber()
* @model required="true"
* @model default="0" required="true"
* @generated
*/
int getGlazingNumber();
......
......@@ -12,6 +12,8 @@ import de.hftstuttgart.buildingphysics.MaterialCategory;
import de.hftstuttgart.buildingphysics.WindowCatalog;
import de.hftstuttgart.buildingphysics.WindowType;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
......@@ -125,6 +127,9 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
isInited = true;
// Initialize simple dependencies
QuantitiesPackage.eINSTANCE.eClass();
// Create package meta-data objects
theBuildingPhysicsPackage.createPackageContents();
......@@ -509,6 +514,10 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
QuantitiesPackage theQuantitiesPackage = (QuantitiesPackage) EPackage.Registry.INSTANCE
.getEPackage(QuantitiesPackage.eNS_URI);
// Create type parameters
// Set bounds for type parameters
......@@ -540,7 +549,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_GValue(), ecorePackage.getEDouble(), "gValue", null, 1, 1, WindowType.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_GlazingNumber(), ecorePackage.getEInt(), "glazingNumber", null, 1, 1,
initEAttribute(getWindowType_GlazingNumber(), ecorePackage.getEInt(), "glazingNumber", "0", 1, 1,
WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_FrameRatio(), ecorePackage.getEInt(), "frameRatio", null, 1, 1, WindowType.class,
......@@ -583,8 +592,8 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_Density(), ecorePackage.getEDouble(), "density", null, 1, 1, Material.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_HeatCapacity(), ecorePackage.getEDouble(), "heatCapacity", null, 1, 1,
Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
initEAttribute(getMaterial_HeatCapacity(), theQuantitiesPackage.getQuantityDouble(), "heatCapacity", "0.0 kW",
1, 1, Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getMaterial_Conductivity(), ecorePackage.getEDouble(), "conductivity", null, 1, 1,
Material.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
......
......@@ -5,6 +5,11 @@ package de.hftstuttgart.buildingphysics.impl;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Material;
import de.hftstuttgart.cityunits.model.NullableQuantity;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesFactory;
import de.hftstuttgart.cityunits.model.quantities.QuantitiesPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
......@@ -98,7 +103,8 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
* @generated
* @ordered
*/
protected static final double HEAT_CAPACITY_EDEFAULT = 0.0;
protected static final NullableQuantity HEAT_CAPACITY_EDEFAULT = (NullableQuantity) QuantitiesFactory.eINSTANCE
.createFromString(QuantitiesPackage.eINSTANCE.getQuantityDouble(), "0.0 kW");
/**
* The cached value of the '{@link #getHeatCapacity() <em>Heat Capacity</em>}' attribute.
......@@ -108,7 +114,7 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
* @generated
* @ordered
*/
protected double heatCapacity = HEAT_CAPACITY_EDEFAULT;
protected NullableQuantity heatCapacity = HEAT_CAPACITY_EDEFAULT;
/**
* The default value of the '{@link #getConductivity() <em>Conductivity</em>}' attribute.
......@@ -226,7 +232,7 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
* @generated
*/
@Override
public double getHeatCapacity() {
public NullableQuantity getHeatCapacity() {
return heatCapacity;
}
......@@ -236,8 +242,8 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
* @generated
*/
@Override
public void setHeatCapacity(double newHeatCapacity) {
double oldHeatCapacity = heatCapacity;
public void setHeatCapacity(NullableQuantity newHeatCapacity) {
NullableQuantity oldHeatCapacity = heatCapacity;
heatCapacity = newHeatCapacity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY,
......@@ -308,7 +314,7 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
setDensity((Double) newValue);
return;
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
setHeatCapacity((Double) newValue);
setHeatCapacity((NullableQuantity) newValue);
return;
case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
setConductivity((Double) newValue);
......@@ -359,7 +365,7 @@ public class MaterialImpl extends MinimalEObjectImpl.Container implements Materi
case BuildingPhysicsPackage.MATERIAL__DENSITY:
return density != DENSITY_EDEFAULT;
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
return heatCapacity != HEAT_CAPACITY_EDEFAULT;
return HEAT_CAPACITY_EDEFAULT == null ? heatCapacity != null : !HEAT_CAPACITY_EDEFAULT.equals(heatCapacity);
case BuildingPhysicsPackage.MATERIAL__CONDUCTIVITY:
return conductivity != CONDUCTIVITY_EDEFAULT;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment