Commit 85ba9f99 authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Simplify catalog hierarchy

parent 7d014334
...@@ -10,80 +10,62 @@ _UI_CreateChild_tooltip = Create New {0} Under {1} Feature ...@@ -10,80 +10,62 @@ _UI_CreateChild_tooltip = Create New {0} Under {1} Feature
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. _UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. _UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_UI_PropertyDescriptor_description = {0} of {1} _UI_PropertyDescriptor_description = The {0} of the {1}
_UI_BuildingPhysicsCatalog_type = Catalog _UI_BuildingPhysicsCatalog_type = Catalog
_UI_WindowType_type = Window Type _UI_WindowType_type = Window Type
_UI_Catalog_type = Catalog _UI_WindowCategory_type = Windows
_UI_WindowCatalog_type = Windows
_UI_MaterialCatalog_type = Materials and Constructions
_UI_MaterialCategory_type = Material Category _UI_MaterialCategory_type = Material Category
_UI_Material_type = Material _UI_Material_type = Material
_UI_Unknown_type = Object
_UI_ConstructionCategory_type = Construction Category _UI_ConstructionCategory_type = Construction Category
_UI_Construction_type = Construction
_UI_Layer_type = Layer
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value _UI_Unknown_datatype= Value
_UI_BuildingPhysicsCatalog_author_feature = Author _UI_BuildingPhysicsCatalog_author_feature = Author
_UI_BuildingPhysicsCatalog_windowCatalog_feature = Window Catalog _UI_BuildingPhysicsCatalog_windows_feature = Windows
_UI_BuildingPhysicsCatalog_materialCatalog_feature = Material Catalog _UI_BuildingPhysicsCatalog_name_feature = Name
_UI_WindowType_id_feature = Id _UI_BuildingPhysicsCatalog_description_feature = Description
_UI_BuildingPhysicsCatalog_source_feature = Source
_UI_BuildingPhysicsCatalog_constructionCategories_feature = Construction Categories
_UI_BuildingPhysicsCatalog_materialCategories_feature = Material Categories
_UI_WindowType_windowTypeId_feature = Window Type Id
_UI_WindowType_name_feature = Name _UI_WindowType_name_feature = Name
_UI_WindowType_uValue_feature = UValue _UI_WindowType_uValue_feature = UValue
_UI_WindowType_gValue_feature = GValue _UI_WindowType_gValue_feature = GValue
_UI_WindowType_glazingNumber_feature = Glazing Number _UI_WindowType_glazingNumber_feature = Glazing Number
_UI_WindowType_frameRatio_feature = Frame Ratio _UI_WindowType_frameRatio_feature = Frame Ratio
_UI_Catalog_name_feature = Name
_UI_Catalog_description_feature = Description
_UI_Catalog_source_feature = Source
_UI_WindowCatalog_windowTypes_feature = Window Types
_UI_MaterialCatalog_materialCategories_feature = Material Categories
_UI_MaterialCategory_material_feature = Material
_UI_MaterialCategory_name_feature = Category
_UI_Material_id_feature = Id
_UI_Material_name_feature = Material
_UI_Material_density_feature = Density
_UI_Material_heatCapacity_feature = Heat Capacity
_UI_Material_conductivity_feature = Conductivity
_UI_Unknown_feature = Unspecified
_UI_LifeCycle_type = Life Cycle
_UI_WindowType_lifeCycle_feature = Life Cycle
_UI_LifeCycle_embodiedEnergy_feature = Embodied Energy
_UI_LifeCycle_embodiedCarbon_feature = Embodied Carbon
_UI_LifeCycle_constructionDescription_feature = Construction Description
_UI_LifeCycle_disposalEnergy_feature = Disposal Energy
_UI_LifeCycle_disposalCarbon_feature = Disposal Carbon
_UI_LifeCycle_disposalDescription_feature = Disposal Description
_UI_WindowType__feature = Window Type
_UI_LifeCycle__feature = Life Cycle
_UI_LifeCycle_type_feature = Type
_UI_WindowType_embodiedEnergy_feature = Embodied Energy _UI_WindowType_embodiedEnergy_feature = Embodied Energy
_UI_WindowType_embodiedCarbon_feature = Embodied Carbon _UI_WindowType_embodiedCarbon_feature = Embodied Carbon
_UI_WindowType_constructionDescription_feature = Construction Description _UI_WindowType_constructionDescription_feature = Construction Description
_UI_WindowType_disposalEnergy_feature = Disposal Energy _UI_WindowType_disposalEnergy_feature = Disposal Energy
_UI_WindowType_disposalCarbon_feature = Disposal Carbon _UI_WindowType_disposalCarbon_feature = Disposal Carbon
_UI_WindowType_disposalDescription_feature = Disposal Description _UI_WindowType_disposalDescription_feature = Disposal Description
_UI_WindowCategory_windowTypes_feature = Window Types
_UI_MaterialCategory_materials_feature = Materials
_UI_MaterialCategory_name_feature = Category
_UI_MaterialCategory_name_description = Name of material category
_UI_Material_materialId_feature = Material Id
_UI_Material_name_feature = Material
_UI_Material_name_description = Name of material
_UI_Material_density_feature = Density
_UI_Material_heatCapacity_feature = Heat Capacity
_UI_Material_conductivity_feature = Conductivity
_UI_Material_embodiedEnergy_feature = Embodied Energy _UI_Material_embodiedEnergy_feature = Embodied Energy
_UI_Material_embodiedCarbon_feature = Embodied Carbon _UI_Material_embodiedCarbon_feature = Embodied Carbon
_UI_Material_constructionDescription_feature = Construction Description _UI_Material_constructionDescription_feature = Construction Description
_UI_Material_disposalEnergy_feature = Disposal Energy _UI_Material_disposalEnergy_feature = Disposal Energy
_UI_Material_disposalCarbon_feature = Disposal Carbon _UI_Material_disposalCarbon_feature = Disposal Carbon
_UI_Material_disposalDescription_feature = Disposal Description _UI_Material_disposalDescription_feature = Disposal Description
_UI_Layer_type = Layer
_UI_MaterialCatalog_constructionCategories_feature = Constructions
_UI_ConstructionCategory_name_feature = Construction Category
_UI_Layer_material_feature = Material
_UI_Layer_thickness_feature = Thickness
_UI_MaterialCategory_materials_feature = Materials
_UI_WindowType_windowTypeId_feature = Window Type Id
_UI_Material_materialId_feature = Material Id
_UI_Layer__feature = Layer
_UI_Material_category_feature = Category _UI_Material_category_feature = Category
_UI_MaterialCategory_name_description = Name of material category _UI_ConstructionCategory_name_feature = Name
_UI_Material_name_description = Name of material
_UI_Construction_type = Construction
_UI_ConstructionCategory_constructions_feature = Constructions _UI_ConstructionCategory_constructions_feature = Constructions
_UI_Construction_constructionId_feature = Construction Id _UI_Construction_constructionId_feature = Construction Id
_UI_Construction_name_feature = Name _UI_Construction_name_feature = Name
_UI_Construction_layers_feature = Layers _UI_Construction_layers_feature = Layers
_UI_Layer_material_feature = Material
_UI_Layer_thickness_feature = Thickness
_UI_Unknown_feature = Unspecified
...@@ -56,27 +56,95 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl ...@@ -56,27 +56,95 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl
if (itemPropertyDescriptors == null) { if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object); super.getPropertyDescriptors(object);
addAuthorPropertyDescriptor(object); addNamePropertyDescriptor(object);
addDescriptionPropertyDescriptor(object);
addSourcePropertyDescriptor(object);
addMaterialCategoriesPropertyDescriptor(object);
addConstructionCategoriesPropertyDescriptor(object);
} }
return itemPropertyDescriptors; return itemPropertyDescriptors;
} }
/** /**
* This adds a property descriptor for the Author feature. * This adds a property descriptor for the Name feature.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
protected void addAuthorPropertyDescriptor(Object object) { protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_BuildingPhysicsCatalog_author_feature"), getResourceLocator(), getString("_UI_BuildingPhysicsCatalog_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BuildingPhysicsCatalog_author_feature", getString("_UI_PropertyDescriptor_description", "_UI_BuildingPhysicsCatalog_name_feature",
"_UI_BuildingPhysicsCatalog_type"), "_UI_BuildingPhysicsCatalog_type"),
BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__AUTHOR, true, false, false, BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__NAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/**
* This adds a property descriptor for the Description feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_BuildingPhysicsCatalog_description_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_BuildingPhysicsCatalog_description_feature", "_UI_BuildingPhysicsCatalog_type"),
BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__DESCRIPTION, true, true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This adds a property descriptor for the Source feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_BuildingPhysicsCatalog_source_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BuildingPhysicsCatalog_source_feature",
"_UI_BuildingPhysicsCatalog_type"),
BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__SOURCE, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This adds a property descriptor for the Construction Categories feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addConstructionCategoriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_BuildingPhysicsCatalog_constructionCategories_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_BuildingPhysicsCatalog_constructionCategories_feature", "_UI_BuildingPhysicsCatalog_type"),
BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES, true, false, true,
null, null, null));
}
/**
* This adds a property descriptor for the Material Categories feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addMaterialCategoriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_BuildingPhysicsCatalog_materialCategories_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BuildingPhysicsCatalog_materialCategories_feature",
"_UI_BuildingPhysicsCatalog_type"),
BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES, true, false, true, null,
null, null));
}
/** /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
...@@ -89,8 +157,9 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl ...@@ -89,8 +157,9 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) { if (childrenFeatures == null) {
super.getChildrenFeatures(object); super.getChildrenFeatures(object);
childrenFeatures.add(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG); childrenFeatures.add(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__WINDOWS);
childrenFeatures.add(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG); childrenFeatures.add(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES);
childrenFeatures.add(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES);
} }
return childrenFeatures; return childrenFeatures;
} }
...@@ -137,7 +206,7 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl ...@@ -137,7 +206,7 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl
*/ */
@Override @Override
public String getText(Object object) { public String getText(Object object) {
String label = ((BuildingPhysicsCatalog) object).getAuthor(); String label = ((BuildingPhysicsCatalog) object).getName();
return label == null || label.length() == 0 ? getString("_UI_BuildingPhysicsCatalog_type") return label == null || label.length() == 0 ? getString("_UI_BuildingPhysicsCatalog_type")
: getString("_UI_BuildingPhysicsCatalog_type") + " " + label; : getString("_UI_BuildingPhysicsCatalog_type") + " " + label;
} }
...@@ -154,11 +223,14 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl ...@@ -154,11 +223,14 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl
updateChildren(notification); updateChildren(notification);
switch (notification.getFeatureID(BuildingPhysicsCatalog.class)) { switch (notification.getFeatureID(BuildingPhysicsCatalog.class)) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__NAME:
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__DESCRIPTION:
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__SOURCE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return; return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOWS:
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG: case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES:
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return; return;
} }
...@@ -176,13 +248,16 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl ...@@ -176,13 +248,16 @@ public class BuildingPhysicsCatalogItemProvider extends ItemProviderAdapter impl
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object); super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors newChildDescriptors.add(createChildParameter(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__WINDOWS,
.add(createChildParameter(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG, BuildingPhysicsFactory.eINSTANCE.createWindowCategory()));
BuildingPhysicsFactory.eINSTANCE.createWindowCatalog()));
newChildDescriptors newChildDescriptors
.add(createChildParameter(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG, .add(createChildParameter(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATEGORIES,
BuildingPhysicsFactory.eINSTANCE.createMaterialCatalog())); BuildingPhysicsFactory.eINSTANCE.createMaterialCategory()));
newChildDescriptors.add(
createChildParameter(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__CONSTRUCTION_CATEGORIES,
BuildingPhysicsFactory.eINSTANCE.createConstructionCategory()));
} }
/** /**
......
...@@ -119,49 +119,26 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd ...@@ -119,49 +119,26 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd
} }
/** /**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.WindowCatalog} instances. * This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.WindowCategory} instances.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
protected WindowCatalogItemProvider windowCatalogItemProvider; protected WindowCategoryItemProvider windowCategoryItemProvider;
/** /**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.WindowCatalog}. * This creates an adapter for a {@link de.hftstuttgart.buildingphysics.WindowCategory}.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
@Override @Override
public Adapter createWindowCatalogAdapter() { public Adapter createWindowCategoryAdapter() {
if (windowCatalogItemProvider == null) { if (windowCategoryItemProvider == null) {
windowCatalogItemProvider = new WindowCatalogItemProvider(this); windowCategoryItemProvider = new WindowCategoryItemProvider(this);
} }
return windowCatalogItemProvider; return windowCategoryItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.MaterialCatalog} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MaterialCatalogItemProvider materialCatalogItemProvider;
/**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.MaterialCatalog}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createMaterialCatalogAdapter() {
if (materialCatalogItemProvider == null) {
materialCatalogItemProvider = new MaterialCatalogItemProvider(this);
}
return materialCatalogItemProvider;
} }
/** /**
...@@ -388,10 +365,8 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd ...@@ -388,10 +365,8 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd
buildingPhysicsCatalogItemProvider.dispose(); buildingPhysicsCatalogItemProvider.dispose();
if (windowTypeItemProvider != null) if (windowTypeItemProvider != null)
windowTypeItemProvider.dispose(); windowTypeItemProvider.dispose();
if (windowCatalogItemProvider != null) if (windowCategoryItemProvider != null)
windowCatalogItemProvider.dispose(); windowCategoryItemProvider.dispose();
if (materialCatalogItemProvider != null)
materialCatalogItemProvider.dispose();
if (materialCategoryItemProvider != null) if (materialCategoryItemProvider != null)
materialCategoryItemProvider.dispose(); materialCategoryItemProvider.dispose();
if (materialItemProvider != null) if (materialItemProvider != null)
......
/**
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Catalog;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.buildingphysics.Catalog} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class CatalogItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CatalogItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addNamePropertyDescriptor(object);
addDescriptionPropertyDescriptor(object);
addSourcePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Catalog_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Catalog_name_feature", "_UI_Catalog_type"),
BuildingPhysicsPackage.Literals.CATALOG__NAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This adds a property descriptor for the Description feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Catalog_description_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Catalog_description_feature",
"_UI_Catalog_type"),
BuildingPhysicsPackage.Literals.CATALOG__DESCRIPTION, true, true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This adds a property descriptor for the Source feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Catalog_source_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Catalog_source_feature",
"_UI_Catalog_type"),
BuildingPhysicsPackage.Literals.CATALOG__SOURCE, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((Catalog) object).getName();
return label == null || label.length() == 0 ? getString("_UI_Catalog_type")
: getString("_UI_Catalog_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Catalog.class)) {
case BuildingPhysicsPackage.CATALOG__NAME:
case BuildingPhysicsPackage.CATALOG__DESCRIPTION:
case BuildingPhysicsPackage.CATALOG__SOURCE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return BuildingPhysicsEditPlugin.INSTANCE;
}
}
/**
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link de.hftstuttgart.buildingphysics.MaterialCatalog} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MaterialCatalogItemProvider extends CatalogItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MaterialCatalogItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__MATERIAL_CATEGORIES);
childrenFeatures.add(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns MaterialCatalog.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/MaterialCatalog"));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((MaterialCatalog) object).getName();
return label == null || label.length() == 0 ? getString("_UI_MaterialCatalog_type")
: getString("_UI_MaterialCatalog_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(MaterialCatalog.class)) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors
.add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__MATERIAL_CATEGORIES,
BuildingPhysicsFactory.eINSTANCE.createMaterialCategory()));
newChildDescriptors
.add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES,
BuildingPhysicsFactory.eINSTANCE.createConstructionCategory()));
}
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
package de.hftstuttgart.buildingphysics.provider; package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.WindowCatalog; import de.hftstuttgart.buildingphysics.WindowCategory;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
...@@ -11,23 +11,32 @@ import java.util.List; ...@@ -11,23 +11,32 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.edit.provider.ViewerNotification;
/** /**
* This is the item provider adapter for a {@link de.hftstuttgart.buildingphysics.WindowCatalog} object. * This is the item provider adapter for a {@link de.hftstuttgart.buildingphysics.WindowCategory} object.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
public class WindowCatalogItemProvider extends CatalogItemProvider { public class WindowCategoryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/** /**
* This constructs an instance from a factory and a notifier. * This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
public WindowCatalogItemProvider(AdapterFactory adapterFactory) { public WindowCategoryItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory); super(adapterFactory);
} }
...@@ -47,14 +56,14 @@ public class WindowCatalogItemProvider extends CatalogItemProvider { ...@@ -47,14 +56,14 @@ public class WindowCatalogItemProvider extends CatalogItemProvider {
} }
/** /**
* This returns WindowCatalog.gif. * This returns WindowCategory.gif.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
@Override @Override
public Object getImage(Object object) { public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/WindowCatalog")); return overlayImage(object, getResourceLocator().getImage("full/obj16/WindowCategory"));
} }
/** /**
...@@ -75,9 +84,7 @@ public class WindowCatalogItemProvider extends CatalogItemProvider { ...@@ -75,9 +84,7 @@ public class WindowCatalogItemProvider extends CatalogItemProvider {
*/ */
@Override @Override
public String getText(Object object) { public String getText(Object object) {
String label = ((WindowCatalog) object).getName(); return getString("_UI_WindowCategory_type");
return label == null || label.length() == 0 ? getString("_UI_WindowCatalog_type")
: getString("_UI_WindowCatalog_type") + " " + label;
} }
/** /**
...@@ -91,8 +98,8 @@ public class WindowCatalogItemProvider extends CatalogItemProvider { ...@@ -91,8 +98,8 @@ public class WindowCatalogItemProvider extends CatalogItemProvider {
public void notifyChanged(Notification notification) { public void notifyChanged(Notification notification) {
updateChildren(notification); updateChildren(notification);
switch (notification.getFeatureID(WindowCatalog.class)) { switch (notification.getFeatureID(WindowCategory.class)) {
case BuildingPhysicsPackage.WINDOW_CATALOG__WINDOW_TYPES: case BuildingPhysicsPackage.WINDOW_CATEGORY__WINDOW_TYPES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return; return;
} }
...@@ -111,4 +118,15 @@ public class WindowCatalogItemProvider extends CatalogItemProvider { ...@@ -111,4 +118,15 @@ public class WindowCatalogItemProvider extends CatalogItemProvider {
super.collectNewChildDescriptors(newChildDescriptors, object); super.collectNewChildDescriptors(newChildDescriptors, object);
} }
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return BuildingPhysicsEditPlugin.INSTANCE;
}
} }
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
<?eclipse version="3.4"?> <?eclipse version="3.4"?>
<plugin> <plugin>
<extension point="org.eclipse.emf.ecp.view.model.provider.xmi.file"> <extension point="org.eclipse.emf.ecp.view.model.provider.xmi.file">
<file filePath="viewmodels/WindowCategory.view"/>
<file filePath="viewmodels/Construction.view"/> <file filePath="viewmodels/Construction.view"/>
<file filePath="viewmodels/ConstructionCategory.view"/> <file filePath="viewmodels/ConstructionCategory.view"/>
<file filePath="viewmodels/MaterialCatalog.view"/>
<file filePath="viewmodels/Material.view"/> <file filePath="viewmodels/Material.view"/>
<file filePath="viewmodels/WindowType.view"/> <file filePath="viewmodels/WindowType.view"/>
<file filePath="viewmodels/BuildingPhysicsCatalog.view"/> <file filePath="viewmodels/BuildingPhysicsCatalog.view"/>
...@@ -13,4 +15,4 @@ ...@@ -13,4 +15,4 @@
</file> </file>
<file filePath="viewmodels/MaterialCategory.view"/> <file filePath="viewmodels/MaterialCategory.view"/>
</extension> </extension>
</plugin> </plugin>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.emf.ecp.view.model:View xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmi:id="_1unhEK12Eeuda6ijj1ILcQ" name="BuildingPhysicsCatalog"> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmi:id="_1unhEK12Eeuda6ijj1ILcQ" name="BuildingPhysicsCatalog">
<rootEClass href="http://www.hftstuttgart.de/buildingphysics#//BuildingPhysicsCatalog"/> <rootEClass href="http://www.hftstuttgart.de/buildingphysics#//BuildingPhysicsCatalog"/>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_1uqkYK12Eeuda6ijj1ILcQ" name="Control author"> <children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_P1mDgMBbEeuIHZm4y-I19A" name="Control name">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_1uqkYa12Eeuda6ijj1ILcQ"> <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_P1mDgcBbEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//BuildingPhysicsCatalog/author"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//BuildingPhysicsCatalog/name"/>
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_P1mqkMBbEeuIHZm4y-I19A" name="Control description">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_P1mqkcBbEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//BuildingPhysicsCatalog/description"/>
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_P1mqksBbEeuIHZm4y-I19A" name="Control source">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_P1mqk8BbEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//BuildingPhysicsCatalog/source"/>
</domainModelReference> </domainModelReference>
</children> </children>
<ecorePaths>/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore</ecorePaths> <ecorePaths>/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore</ecorePaths>
......
<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.emf.ecp.view.model:View xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmi:id="_cFVTQLPYEeup29SeaUMpQQ" name="MaterialCatalog">
<rootEClass href="http://www.hftstuttgart.de/buildingphysics#//MaterialCatalog"/>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_cFWhYLPYEeup29SeaUMpQQ" name="Control name">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_cFWhYbPYEeup29SeaUMpQQ">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Catalog/name"/>
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_cFWhYrPYEeup29SeaUMpQQ" name="Control description">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_cFWhY7PYEeup29SeaUMpQQ">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Catalog/description"/>
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_cFWhZLPYEeup29SeaUMpQQ" name="Control source">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_cFWhZbPYEeup29SeaUMpQQ">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Catalog/source"/>
</domainModelReference>
</children>
<ecorePaths>/de.hftstuttgart.buildingphysics/model/buildingphysics.ecore</ecorePaths>
</org.eclipse.emf.ecp.view.model:View>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.emf.ecp.view.model:View xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model/150" xmi:id="_gPK1kK15Eeuda6ijj1ILcQ" name="WindowCatalog"> <org.eclipse.emf.ecp.view.model:View xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1180" xmlns:org.eclipse.emf.ecp.view.table.model="http://org/eclipse/emf/ecp/view/table/model/150" xmi:id="_g2A3kMBbEeuIHZm4y-I19A" name="WindowCategory">
<rootEClass href="http://www.hftstuttgart.de/buildingphysics#//WindowCatalog"/> <rootEClass href="http://www.hftstuttgart.de/buildingphysics#//WindowCategory"/>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_gPMDsK15Eeuda6ijj1ILcQ" name="Control name"> <children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_jclRMMBbEeuIHZm4y-I19A" detailEditing="WithPanel">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_gPMDsa15Eeuda6ijj1ILcQ"> <domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_mCVLcMBbEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Catalog/name"/> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6R9BMMExEeuIHZm4y-I19A">
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_gPMDsq15Eeuda6ijj1ILcQ" name="Control description">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_gPMDs615Eeuda6ijj1ILcQ">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Catalog/description"/>
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_gPMDtK15Eeuda6ijj1ILcQ" name="Control source">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_gPMDta15Eeuda6ijj1ILcQ">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//Catalog/source"/>
</domainModelReference>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.table.model:TableControl" xmi:id="_jQX8wK15Eeuda6ijj1ILcQ" detailEditing="WithPanel">
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.table.model:TableDomainModelReference" xmi:id="_v8IfcLfGEeu0KumwacCHxQ">
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_yjrQYL-QEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/windowTypeId"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/windowTypeId"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_yjrQYb-QEeuIHZm4y-I19A"> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6R9BMcExEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/name"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/name"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_yjrQYr-QEeuIHZm4y-I19A"> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6R9BMsExEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/uValue"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/uValue"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_yjrQY7-QEeuIHZm4y-I19A"> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6R9BM8ExEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/gValue"/> <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.hftstuttgart.de/buildingphysics#//WindowType/gValue"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_yjrQZL-QEeuIHZm4y-I19A"> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6R9BNMExEeuIHZm4y-I19A">
<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"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_yjrQZb-QEeuIHZm4y-I19A"> <columnDomainModelReferences xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_6R9BNcExEeuIHZm4y-I19A">
<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"/>
</columnDomainModelReferences> </columnDomainModelReferences>
<domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_v8IfcbfGEeu0KumwacCHxQ"> <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference" xmi:id="_mCVLccBbEeuIHZm4y-I19A">
<domainModelEFeature xsi:type="ecore:EReference" href="http://www.hftstuttgart.de/buildingphysics#//WindowCatalog/windowTypes"/> <domainModelEFeature xsi:type="ecore:EReference" href="http://www.hftstuttgart.de/buildingphysics#//WindowCategory/windowTypes"/>
</domainModelReference> </domainModelReference>
</domainModelReference> </domainModelReference>
<columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:ReadOnlyColumnConfiguration" xmi:id="_28IeYL-QEeuIHZm4y-I19A" columnDomainReferences="_yjrQZL-QEeuIHZm4y-I19A _yjrQY7-QEeuIHZm4y-I19A _yjrQYL-QEeuIHZm4y-I19A _yjrQYb-QEeuIHZm4y-I19A _yjrQYr-QEeuIHZm4y-I19A _yjrQZb-QEeuIHZm4y-I19A"/> <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:ReadOnlyColumnConfiguration" xmi:id="_8ZWLgMExEeuIHZm4y-I19A" columnDomainReferences="_6R9BMcExEeuIHZm4y-I19A _6R9BMsExEeuIHZm4y-I19A _6R9BNMExEeuIHZm4y-I19A _6R9BNcExEeuIHZm4y-I19A _6R9BM8ExEeuIHZm4y-I19A _6R9BMMExEeuIHZm4y-I19A"/>
</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>
...@@ -4,22 +4,22 @@ ...@@ -4,22 +4,22 @@
<xsl:template match="/buildingPhysicsLibrary"> <xsl:template match="/buildingPhysicsLibrary">
<buildphys:BuildingPhysicsCatalog xmi:version="2.0" <buildphys:BuildingPhysicsCatalog xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:buildphys="http://www.hftstuttgart.de/buildingphysics" xmlns:xmi="http://www.omg.org/XMI" xmlns:buildphys="http://www.hftstuttgart.de/buildingphysics">
author="Verena Weiler, HfT Stuttgart"> <xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
<xsl:attribute name="description"><xsl:value-of select="description" /></xsl:attribute>
<xsl:attribute name="source"><xsl:value-of select="source" /></xsl:attribute>
<xsl:apply-templates select="windowLib" /> <xsl:apply-templates select="windowLib" />
<xsl:apply-templates select="constructionLib" /> <xsl:apply-templates select="constructionLib/materialCategory" />
<xsl:apply-templates select="constructionLib/constructionCategory" />
</buildphys:BuildingPhysicsCatalog> </buildphys:BuildingPhysicsCatalog>
</xsl:template> </xsl:template>
<xsl:template match="windowLib"> <xsl:template match="windowLib">
<xsl:element name="windowCatalog"> <xsl:element name="windows">
<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
<xsl:attribute name="description"><xsl:value-of select="description" /></xsl:attribute>
<xsl:attribute name="source"><xsl:value-of select="source" /></xsl:attribute>
<xsl:for-each select="windowType"> <xsl:for-each select="windowType">
<xsl:element name="windowTypes"> <xsl:element name="windowTypes">
<xsl:attribute name="windowTypeId"> <xsl:attribute name="windowTypeId">
<xsl:value-of select="'window_'" /><xsl:value-of select="id" /></xsl:attribute> <xsl:value-of select="'window_'" /><xsl:value-of select="id" /></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
<xsl:attribute name="uValue"><xsl:value-of select="uValue" /> <xsl:attribute name="uValue"><xsl:value-of select="uValue" />
<xsl:value-of select="' W/(m²·K)'" /></xsl:attribute> <xsl:value-of select="' W/(m²·K)'" /></xsl:attribute>
...@@ -41,17 +41,7 @@ ...@@ -41,17 +41,7 @@
</xsl:element> </xsl:element>
</xsl:template> </xsl:template>
<xsl:template match="constructionLib"> <xsl:template match="constructionLib/materialCategory">
<xsl:element name="materialCatalog">
<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
<xsl:attribute name="description"><xsl:value-of select="description" /></xsl:attribute>
<xsl:attribute name="source"><xsl:value-of select="source" /></xsl:attribute>
<xsl:apply-templates select="materialCategory" />
<xsl:apply-templates select="constructionCategory" />
</xsl:element>
</xsl:template>
<xsl:template match="materialCategory">
<xsl:element name="materialCategories"> <xsl:element name="materialCategories">
<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
<xsl:apply-templates select="material" /> <xsl:apply-templates select="material" />
...@@ -83,7 +73,7 @@ ...@@ -83,7 +73,7 @@
</xsl:element> </xsl:element>
</xsl:template> </xsl:template>
<xsl:template match="constructionCategory"> <xsl:template match="constructionLib/constructionCategory">
<xsl:element name="constructionCategories"> <xsl:element name="constructionCategories">
<xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="name" /></xsl:attribute>
<xsl:apply-templates select="constructionType" /> <xsl:apply-templates select="constructionType" />
......
...@@ -3,12 +3,15 @@ ...@@ -3,12 +3,15 @@
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="buildingphysics" nsURI="http://www.hftstuttgart.de/buildingphysics" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="buildingphysics" nsURI="http://www.hftstuttgart.de/buildingphysics"
nsPrefix="buildphys"> nsPrefix="buildphys">
<eClassifiers xsi:type="ecore:EClass" name="BuildingPhysicsCatalog"> <eClassifiers xsi:type="ecore:EClass" name="BuildingPhysicsCatalog">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="author" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EReference" name="windows" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> eType="#//WindowCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="windowCatalog" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
eType="#//WindowCatalog" containment="true"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="materialCatalog" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="source" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
eType="#//MaterialCatalog" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="materialCategories" upperBound="-1"
eType="#//MaterialCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="constructionCategories"
upperBound="-1" eType="#//ConstructionCategory" containment="true"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WindowType"> <eClassifiers xsi:type="ecore:EClass" name="WindowType">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="windowTypeId" lowerBound="1" <eStructuralFeatures xsi:type="ecore:EAttribute" name="windowTypeId" lowerBound="1"
...@@ -48,21 +51,10 @@ ...@@ -48,21 +51,10 @@
<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"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Catalog" abstract="true"> <eClassifiers xsi:type="ecore:EClass" name="WindowCategory">
<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="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="source" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WindowCatalog" eSuperTypes="#//Catalog">
<eStructuralFeatures xsi:type="ecore:EReference" name="windowTypes" upperBound="-1" <eStructuralFeatures xsi:type="ecore:EReference" name="windowTypes" upperBound="-1"
eType="#//WindowType" containment="true"/> eType="#//WindowType" containment="true"/>
</eClassifiers> </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MaterialCatalog" eSuperTypes="#//Catalog">
<eStructuralFeatures xsi:type="ecore:EReference" name="materialCategories" upperBound="-1"
eType="#//MaterialCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="constructionCategories"
upperBound="-1" eType="#//ConstructionCategory" containment="true"/>
</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" eOpposite="#//Material/category"/> eType="#//Material" containment="true" eOpposite="#//Material/category"/>
......
...@@ -12,9 +12,12 @@ ...@@ -12,9 +12,12 @@
<genPackages prefix="BuildingPhysics" basePackage="de.hftstuttgart" disposableProviderFactory="true" <genPackages prefix="BuildingPhysics" basePackage="de.hftstuttgart" disposableProviderFactory="true"
fileExtensions="buildphys" ecorePackage="buildingphysics.ecore#/"> fileExtensions="buildphys" ecorePackage="buildingphysics.ecore#/">
<genClasses ecoreClass="buildingphysics.ecore#//BuildingPhysicsCatalog"> <genClasses ecoreClass="buildingphysics.ecore#//BuildingPhysicsCatalog">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//BuildingPhysicsCatalog/author"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//BuildingPhysicsCatalog/windows"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//BuildingPhysicsCatalog/windowCatalog"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//BuildingPhysicsCatalog/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//BuildingPhysicsCatalog/materialCatalog"/> <genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//BuildingPhysicsCatalog/description"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//BuildingPhysicsCatalog/source"/>
<genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//BuildingPhysicsCatalog/materialCategories"/>
<genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//BuildingPhysicsCatalog/constructionCategories"/>
</genClasses> </genClasses>
<genClasses image="false" ecoreClass="buildingphysics.ecore#//WindowType"> <genClasses image="false" ecoreClass="buildingphysics.ecore#//WindowType">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//WindowType/windowTypeId"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//WindowType/windowTypeId"/>
...@@ -30,17 +33,8 @@ ...@@ -30,17 +33,8 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//WindowType/disposalCarbon"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//WindowType/disposalCarbon"/>
<genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//WindowType/disposalDescription"/> <genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//WindowType/disposalDescription"/>
</genClasses> </genClasses>
<genClasses image="false" ecoreClass="buildingphysics.ecore#//Catalog"> <genClasses ecoreClass="buildingphysics.ecore#//WindowCategory">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Catalog/name"/> <genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//WindowCategory/windowTypes"/>
<genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Catalog/description"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute buildingphysics.ecore#//Catalog/source"/>
</genClasses>
<genClasses ecoreClass="buildingphysics.ecore#//WindowCatalog">
<genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//WindowCatalog/windowTypes"/>
</genClasses>
<genClasses ecoreClass="buildingphysics.ecore#//MaterialCatalog">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCatalog/materialCategories"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCatalog/constructionCategories"/>
</genClasses> </genClasses>
<genClasses ecoreClass="buildingphysics.ecore#//MaterialCategory"> <genClasses ecoreClass="buildingphysics.ecore#//MaterialCategory">
<genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCategory/materials"/> <genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference buildingphysics.ecore#//MaterialCategory/materials"/>
......
...@@ -40,22 +40,13 @@ public interface BuildingPhysicsFactory extends EFactory { ...@@ -40,22 +40,13 @@ public interface BuildingPhysicsFactory extends EFactory {
WindowType createWindowType(); WindowType createWindowType();
/** /**
* Returns a new object of class '<em>Window Catalog</em>'. * Returns a new object of class '<em>Window Category</em>'.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return a new object of class '<em>Window Catalog</em>'. * @return a new object of class '<em>Window Category</em>'.
* @generated * @generated
*/ */
WindowCatalog createWindowCatalog(); WindowCategory createWindowCategory();
/**
* Returns a new object of class '<em>Material Catalog</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Material Catalog</em>'.
* @generated
*/
MaterialCatalog createMaterialCatalog();
/** /**
* Returns a new object of class '<em>Material Category</em>'. * Returns a new object of class '<em>Material Category</em>'.
......
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