Commit 349d66bc authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Use of constraint data type Fraction (works in preview but not deployed)

parent 54c6b56b
...@@ -162,7 +162,7 @@ public class WindowTypeItemProvider extends ItemProviderAdapter implements IEdit ...@@ -162,7 +162,7 @@ public class WindowTypeItemProvider extends ItemProviderAdapter implements IEdit
getString("_UI_PropertyDescriptor_description", "_UI_WindowType_frameRatio_feature", getString("_UI_PropertyDescriptor_description", "_UI_WindowType_frameRatio_feature",
"_UI_WindowType_type"), "_UI_WindowType_type"),
BuildingPhysicsPackage.Literals.WINDOW_TYPE__FRAME_RATIO, true, false, false, BuildingPhysicsPackage.Literals.WINDOW_TYPE__FRAME_RATIO, true, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/** /**
......
...@@ -5,5 +5,8 @@ Bundle-SymbolicName: de.hftstuttgart.buildingphysics.viewmodel;singleton:=true ...@@ -5,5 +5,8 @@ Bundle-SymbolicName: de.hftstuttgart.buildingphysics.viewmodel;singleton:=true
Bundle-Version: 1.0.0.qualifier Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.emf.ecp.view.model.provider.xmi, Require-Bundle: org.eclipse.emf.ecp.view.model.provider.xmi,
org.eclipse.emf.ecp.view.treemasterdetail.model, 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 Bundle-RequiredExecutionEnvironment: JavaSE-15
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/glazingNumber"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/glazingNumber"/>
</domainModelReference> </domainModelReference>
</children> </children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_7hPBWq21Eeup29SeaUMpQQ" name="Control frameRatio"> <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="_7hPBW621Eeup29SeaUMpQQ"> <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"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/frameRatio"/>
</domainModelReference> </domainModelReference>
</children> </children>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<semanticResources>../catalogs/2020%20German%20Buildings%20IWU.xmi</semanticResources> <semanticResources>../catalogs/2020%20German%20Buildings%20IWU.xmi</semanticResources>
<ownedViews xmi:type="viewpoint:DView" uid="_nfHygB3ZEeuNsK3dZmTkbQ"> <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']"/> <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']"/> <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#/"/> <target xmi:type="ecore:EPackage" href="buildingphysics.ecore#/"/>
</ownedRepresentationDescriptors> </ownedRepresentationDescriptors>
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
</ownedStyle> </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']"/> <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>
<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"/> <target xmi:type="ecore:EAttribute" href="buildingphysics.ecore#//WindowType/frameRatio"/>
<semanticElements 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"> <ownedStyle xmi:type="diagram:BundledImage" uid="_J2rVVJUqEeudooziRGqkJA" labelAlignment="LEFT" description="_J2qHNJUqEeudooziRGqkJA">
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="glazingNumber" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="glazingNumber" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/> eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="frameRatio" lowerBound="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"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="fraction between 0.0 and 1.0"/> <details key="documentation" value="fraction between 0.0 and 1.0"/>
</eAnnotations> </eAnnotations>
......
...@@ -157,12 +157,12 @@ public interface WindowType extends EObject { ...@@ -157,12 +157,12 @@ public interface WindowType extends EObject {
* fraction between 0.0 and 1.0 * fraction between 0.0 and 1.0
* <!-- end-model-doc --> * <!-- end-model-doc -->
* @return the value of the '<em>Frame Ratio</em>' attribute. * @return the value of the '<em>Frame Ratio</em>' attribute.
* @see #setFrameRatio(double) * @see #setFrameRatio(Double)
* @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_FrameRatio() * @see de.hftstuttgart.buildingphysics.BuildingPhysicsPackage#getWindowType_FrameRatio()
* @model required="true" * @model dataType="de.hftstuttgart.cityunits.model.quantities.Fraction" required="true"
* @generated * @generated
*/ */
double getFrameRatio(); Double getFrameRatio();
/** /**
* Sets the value of the '{@link de.hftstuttgart.buildingphysics.WindowType#getFrameRatio <em>Frame Ratio</em>}' attribute. * 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 { ...@@ -172,7 +172,7 @@ public interface WindowType extends EObject {
* @see #getFrameRatio() * @see #getFrameRatio()
* @generated * @generated
*/ */
void setFrameRatio(double value); void setFrameRatio(Double value);
/** /**
* Returns the value of the '<em><b>Embodied Energy</b></em>' attribute. * Returns the value of the '<em><b>Embodied Energy</b></em>' attribute.
......
...@@ -790,7 +790,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building ...@@ -790,7 +790,7 @@ public class BuildingPhysicsPackageImpl extends EPackageImpl implements Building
initEAttribute(getWindowType_GlazingNumber(), ecorePackage.getEInt(), "glazingNumber", "1", 1, 1, initEAttribute(getWindowType_GlazingNumber(), ecorePackage.getEInt(), "glazingNumber", "1", 1, 1,
WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !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, WindowType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED); !IS_DERIVED, IS_ORDERED);
initEAttribute(getWindowType_EmbodiedEnergy(), theQuantitiesPackage.getQuantityDouble(), "embodiedEnergy", initEAttribute(getWindowType_EmbodiedEnergy(), theQuantitiesPackage.getQuantityDouble(), "embodiedEnergy",
......
...@@ -151,7 +151,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind ...@@ -151,7 +151,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind
* @generated * @generated
* @ordered * @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. * The cached value of the '{@link #getFrameRatio() <em>Frame Ratio</em>}' attribute.
...@@ -161,7 +161,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind ...@@ -161,7 +161,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind
* @generated * @generated
* @ordered * @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. * The default value of the '{@link #getEmbodiedEnergy() <em>Embodied Energy</em>}' attribute.
...@@ -432,7 +432,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind ...@@ -432,7 +432,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind
* @generated * @generated
*/ */
@Override @Override
public double getFrameRatio() { public Double getFrameRatio() {
return frameRatio; return frameRatio;
} }
...@@ -442,8 +442,8 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind ...@@ -442,8 +442,8 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind
* @generated * @generated
*/ */
@Override @Override
public void setFrameRatio(double newFrameRatio) { public void setFrameRatio(Double newFrameRatio) {
double oldFrameRatio = frameRatio; Double oldFrameRatio = frameRatio;
frameRatio = newFrameRatio; frameRatio = newFrameRatio;
if (eNotificationRequired()) if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO, eNotify(new ENotificationImpl(this, Notification.SET, BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO,
...@@ -748,7 +748,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind ...@@ -748,7 +748,7 @@ public class WindowTypeImpl extends MinimalEObjectImpl.Container implements Wind
case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER: case BuildingPhysicsPackage.WINDOW_TYPE__GLAZING_NUMBER:
return glazingNumber != GLAZING_NUMBER_EDEFAULT; return glazingNumber != GLAZING_NUMBER_EDEFAULT;
case BuildingPhysicsPackage.WINDOW_TYPE__FRAME_RATIO: 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: case BuildingPhysicsPackage.WINDOW_TYPE__EMBODIED_ENERGY:
return EMBODIED_ENERGY_EDEFAULT == null ? embodiedEnergy != null return EMBODIED_ENERGY_EDEFAULT == null ? embodiedEnergy != null
: !EMBODIED_ENERGY_EDEFAULT.equals(embodiedEnergy); : !EMBODIED_ENERGY_EDEFAULT.equals(embodiedEnergy);
......
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