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
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));
}
/**
......
......@@ -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
......@@ -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>
......
......@@ -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">
......
......@@ -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>
......
......@@ -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.
......
......@@ -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",
......
......@@ -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);
......
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