diff --git a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java index fa4c6f62ebdeb3d53046843caac2b3f0dafe5974..1f0588a6dcaedd6c67fe7d99264d6cfe56fcca35 100644 --- a/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java +++ b/de.hftstuttgart.buildingphysics.edit/src/de/hftstuttgart/buildingphysics/provider/WindowTypeItemProvider.java @@ -162,7 +162,7 @@ public class WindowTypeItemProvider extends ItemProviderAdapter implements IEdit getString("_UI_PropertyDescriptor_description", "_UI_WindowType_frameRatio_feature", "_UI_WindowType_type"), BuildingPhysicsPackage.Literals.WINDOW_TYPE__FRAME_RATIO, true, false, false, - ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** diff --git a/de.hftstuttgart.buildingphysics.viewmodel/META-INF/MANIFEST.MF b/de.hftstuttgart.buildingphysics.viewmodel/META-INF/MANIFEST.MF index 4d6ac4eb1bd6ccc32b4cea40be69b71214c45c78..3f1d066661f1909e0276a23e86f114f848b809ae 100644 --- a/de.hftstuttgart.buildingphysics.viewmodel/META-INF/MANIFEST.MF +++ b/de.hftstuttgart.buildingphysics.viewmodel/META-INF/MANIFEST.MF @@ -5,5 +5,8 @@ Bundle-SymbolicName: de.hftstuttgart.buildingphysics.viewmodel;singleton:=true Bundle-Version: 1.0.0.qualifier Require-Bundle: org.eclipse.emf.ecp.view.model.provider.xmi, org.eclipse.emf.ecp.view.treemasterdetail.model, - org.eclipse.emf.ecp.view.treemasterdetail.ui.swt + org.eclipse.emf.ecp.view.treemasterdetail.ui.swt, + de.hftstuttgart.cityunits.model;bundle-version="1.0.2", + de.hftstuttgart.cityunits.model.edit;bundle-version="1.0.2", + de.hftstuttgart.cityunits.ui.renderer;bundle-version="1.0.2" Bundle-RequiredExecutionEnvironment: JavaSE-15 diff --git a/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/WindowType.view b/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/WindowType.view index 8bc45cf627907b6a0bca3f1d8b10b9df555bad4e..90ee7e06d437cf2dc9eb5b4f320d3b62cb82bed2 100644 --- a/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/WindowType.view +++ b/de.hftstuttgart.buildingphysics.viewmodel/viewmodels/WindowType.view @@ -26,8 +26,8 @@ <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/glazingNumber"/> </domainModelReference> </children> - <children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_7hPBWq21Eeup29SeaUMpQQ" name="Control frameRatio"> - <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_7hPBW621Eeup29SeaUMpQQ"> + <children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_7qjMwMRbEeu2E-0upv8JGw" name="Control frameRatio"> + <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_7qjMwcRbEeu2E-0upv8JGw"> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/frameRatio"/> </domainModelReference> </children> diff --git a/de.hftstuttgart.buildingphysics/model/buildingphysics.aird b/de.hftstuttgart.buildingphysics/model/buildingphysics.aird index baf8d4881621443f6a4cb9a19f8c46e709786087..6daeea68fe5537a19011cb414210619cf1bd60cd 100644 --- a/de.hftstuttgart.buildingphysics/model/buildingphysics.aird +++ b/de.hftstuttgart.buildingphysics/model/buildingphysics.aird @@ -9,7 +9,7 @@ <semanticResources>../catalogs/2020%20German%20Buildings%20IWU.xmi</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="_JKPtIZUqEeudooziRGqkJA" name="Buildingphysics Class Diagram" repPath="#_JKN38JUqEeudooziRGqkJA" changeId="938342a3-345d-40bf-9732-a7d354ccd5c3"> + <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_JKPtIZUqEeudooziRGqkJA" name="Buildingphysics Class Diagram" repPath="#_JKN38JUqEeudooziRGqkJA" changeId="83985646-3cd2-4c87-8200-0e1db764f151"> <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> @@ -478,7 +478,7 @@ </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="_J2rVU5UqEeudooziRGqkJA" name="frameRatio : EDouble = 0.0" tooltipText=""> + <ownedElements xmi:type="diagram:DNodeListElement" uid="_J2rVU5UqEeudooziRGqkJA" name="frameRatio : Fraction" tooltipText=""> <target xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//WindowType/frameRatio"/> <semanticElements xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//WindowType/frameRatio"/> <ownedStyle xmi:type="diagram:BundledImage" uid="_J2rVVJUqEeudooziRGqkJA" labelAlignment="LEFT" description="_J2qHNJUqEeudooziRGqkJA"> diff --git a/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore b/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore index 40f4408469af0608e7b5116a11b460f1901e6dc7..f720a93326376e0a3b29625ec8748254dc7aa955 100644 --- a/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore +++ b/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore @@ -29,7 +29,7 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="glazingNumber" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="frameRatio" lowerBound="1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"> + eType="ecore:EDataType ../../de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Fraction"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="fraction between 0.0 and 1.0"/> </eAnnotations> diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java index d9558503ed9fece049116d2a6ff113fcb4d9c98b..ab1408c1beeca51290481d4c8425ddaefd8764bd 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/WindowType.java @@ -157,12 +157,12 @@ public interface WindowType extends EObject { * fraction between 0.0 and 1.0 * <!-- end-model-doc --> * @return the value of the '<em>Frame Ratio</em>' attribute. - * @see #setFrameRatio(double) + * @see #setFrameRatio(Double) * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_FrameRatio() - * @model required="true" + * @model dataType="de.hftstuttgart.cityunits.model.quantities.Fraction" required="true" * @generated */ - double getFrameRatio(); + Double getFrameRatio(); /** * Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getFrameRatio <em>Frame Ratio</em>}' attribute. @@ -172,7 +172,7 @@ public interface WindowType extends EObject { * @see #getFrameRatio() * @generated */ - void setFrameRatio(double value); + void setFrameRatio(Double value); /** * Returns the value of the '<em><b>Embodied Energy</b></em>' attribute. 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 96af7a94ebdb1577af013499d2917fa66fefebb0..e62b95fe82a638031d60c3825f17e88effb18420 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/BuildingPhysicsPackageImpl.java @@ -790,7 +790,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building initEAttribute(getWindowType_GlazingNumber(), ecorePackage.getEInt(), "glazingNumber", "1", 1, 1, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getWindowType_FrameRatio(), ecorePackage.getEDouble(), "frameRatio", null, 1, 1, + initEAttribute(getWindowType_FrameRatio(), theQuantitiesPackage.getFraction(), "frameRatio", null, 1, 1, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getWindowType_EmbodiedEnergy(), theQuantitiesPackage.getQuantityDouble(), "embodiedEnergy", diff --git a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java index 02730ff7859d803142282e95a2d351018c63f40f..256382b5c685173554bcbbbe26846479904f6358 100644 --- a/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java +++ b/de.hftstuttgart.buildingphysics/src/de/hftstuttgart/buildingphysics/impl/WindowTypeImpl.java @@ -151,7 +151,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind * @generated * @ordered */ - protected static final double FRAME_RATIO_EDEFAULT = 0.0; + protected static final Double FRAME_RATIO_EDEFAULT = null; /** * The cached value of the '{@link #getFrameRatio() <em>Frame Ratio</em>}' attribute. @@ -161,7 +161,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind * @generated * @ordered */ - protected double frameRatio = FRAME_RATIO_EDEFAULT; + protected Double frameRatio = FRAME_RATIO_EDEFAULT; /** * The default value of the '{@link #getEmbodiedEnergy() <em>Embodied Energy</em>}' attribute. @@ -432,7 +432,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind * @generated */ @Override - public double getFrameRatio() { + public Double getFrameRatio() { return frameRatio; } @@ -442,8 +442,8 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind * @generated */ @Override - public void setFrameRatio(double newFrameRatio) { - double oldFrameRatio = frameRatio; + public void setFrameRatio(Double newFrameRatio) { + Double oldFrameRatio = frameRatio; frameRatio = newFrameRatio; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO, @@ -748,7 +748,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER: return glazingNumber != GLAZING_NUMBER_EDEFAULT; case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: - return frameRatio != FRAME_RATIO_EDEFAULT; + return FRAME_RATIO_EDEFAULT == null ? frameRatio != null : !FRAME_RATIO_EDEFAULT.equals(frameRatio); case BuildingPhysicsPackage.WINDOW_TYPE__EMBODIED_ENERGY: return EMBODIED_ENERGY_EDEFAULT == null ? embodiedEnergy != null : !EMBODIED_ENERGY_EDEFAULT.equals(embodiedEnergy);