Commits (8)
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<children xsi:type="basic:TrimmedWindow" xmi:id="_6wlLccgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.window.main" label="HfT Stuttgart - Building Physics Catalog" width="800" height="600"> <children xsi:type="basic:TrimmedWindow" xmi:id="_6wlLccgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.window.main" label="HfT Stuttgart - Building Physics Catalog" width="800" height="600">
<mainMenu xmi:id="_6wlLicgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.main.menu"> <mainMenu xmi:id="_6wlLicgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.main.menu">
<children xsi:type="menu:Menu" xmi:id="_6wlLisgZEeSyMNYR5xypkQ" elementId="file" label="File"> <children xsi:type="menu:Menu" xmi:id="_6wlLisgZEeSyMNYR5xypkQ" elementId="file" label="File">
<children xsi:type="menu:HandledMenuItem" xmi:id="_y6FesCWUEeux0PTSTJn6xg" elementId="de.hftstuttgart.buildingphysics.application.handleditem.file.new" label="New..." command="_PnX_ACWUEeux0PTSTJn6xg"/> <children xsi:type="menu:HandledMenuItem" xmi:id="_y6FesCWUEeux0PTSTJn6xg" elementId="de.hftstuttgart.buildingphysics.application.handleditem.file.new" label="New..." iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/database-plus.png" command="_PnX_ACWUEeux0PTSTJn6xg"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLi8gZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.file.open" label="Open" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/open_in_app.png" command="_6wlLgMgZEeSyMNYR5xypkQ"/> <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLi8gZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.file.open" label="Open" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/blue-folder-open.png" command="_6wlLgMgZEeSyMNYR5xypkQ"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjMgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.save" label="Save" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/save_edit.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/> <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjMgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.save" label="Save" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/disk-black.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjcgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.quit" label="Quit" command="_6wlLfMgZEeSyMNYR5xypkQ"/> <children xsi:type="menu:HandledMenuItem" xmi:id="_6wlLjcgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.quit" label="Quit" command="_6wlLfMgZEeSyMNYR5xypkQ"/>
</children> </children>
<children xsi:type="menu:Menu" xmi:id="_6wlLjsgZEeSyMNYR5xypkQ" elementId="help" label="Help"> <children xsi:type="menu:Menu" xmi:id="_6wlLjsgZEeSyMNYR5xypkQ" elementId="help" label="Help">
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
</mainMenu> </mainMenu>
<trimBars xmi:id="_6wlLlcgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.trimbar.top"> <trimBars xmi:id="_6wlLlcgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.trimbar.top">
<children xsi:type="menu:ToolBar" xmi:id="_6wlLlsgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.main.toolbar"> <children xsi:type="menu:ToolBar" xmi:id="_6wlLlsgZEeSyMNYR5xypkQ" elementId="org.eclipse.ui.main.toolbar">
<children xsi:type="menu:HandledToolItem" xmi:id="_rXiTQCWUEeux0PTSTJn6xg" elementId="de.hftstuttgart.buildingphysics.application.handleditem.trimbar.top.new" label="New..." command="_PnX_ACWUEeux0PTSTJn6xg"/> <children xsi:type="menu:HandledToolItem" xmi:id="_rXiTQCWUEeux0PTSTJn6xg" elementId="de.hftstuttgart.buildingphysics.application.handleditem.trimbar.top.new" label="New..." iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/database-plus.png" command="_PnX_ACWUEeux0PTSTJn6xg"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_6wlLl8gZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.trimbar.top.open" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/open_in_app.png" command="_6wlLgMgZEeSyMNYR5xypkQ"/> <children xsi:type="menu:HandledToolItem" xmi:id="_6wlLl8gZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.trimbar.top.open" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/blue-folder-open.png" command="_6wlLgMgZEeSyMNYR5xypkQ"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_6wlLmMgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.trimbar.top.save" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/save_edit.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/> <children xsi:type="menu:HandledToolItem" xmi:id="_6wlLmMgZEeSyMNYR5xypkQ" elementId="de.hftstuttgart.buildingphysics.application.handleditem.trimbar.top.save" iconURI="platform:/plugin/de.hftstuttgart.buildingphysics.application/icons/disk-black.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/>
</children> </children>
</trimBars> </trimBars>
</children> </children>
......
...@@ -15,9 +15,9 @@ _UI_PropertyDescriptor_description = The {0} of the {1} ...@@ -15,9 +15,9 @@ _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_Catalog_type = Catalog
_UI_WindowCatalog_type = Window Catalog _UI_WindowCatalog_type = Windows
_UI_MaterialCatalog_type = Material Catalog _UI_MaterialCatalog_type = Materials and Constructions
_UI_MaterialCategory_type = Material Category _UI_MaterialCategory_type =
_UI_Material_type = Material _UI_Material_type = Material
_UI_Unknown_type = Object _UI_Unknown_type = Object
...@@ -46,7 +46,6 @@ _UI_Material_heatCapacity_feature = Heat Capacity ...@@ -46,7 +46,6 @@ _UI_Material_heatCapacity_feature = Heat Capacity
_UI_Material_conductivity_feature = Conductivity _UI_Material_conductivity_feature = Conductivity
_UI_Unknown_feature = Unspecified _UI_Unknown_feature = Unspecified
_UI_Catalog_xxx_feature = Xxx
_UI_LifeCycle_type = Life Cycle _UI_LifeCycle_type = Life Cycle
_UI_WindowType_lifeCycle_feature = Life Cycle _UI_WindowType_lifeCycle_feature = Life Cycle
_UI_LifeCycle_embodiedEnergy_feature = Embodied Energy _UI_LifeCycle_embodiedEnergy_feature = Embodied Energy
...@@ -55,8 +54,8 @@ _UI_LifeCycle_constructionDescription_feature = Construction Description ...@@ -55,8 +54,8 @@ _UI_LifeCycle_constructionDescription_feature = Construction Description
_UI_LifeCycle_disposalEnergy_feature = Disposal Energy _UI_LifeCycle_disposalEnergy_feature = Disposal Energy
_UI_LifeCycle_disposalCarbon_feature = Disposal Carbon _UI_LifeCycle_disposalCarbon_feature = Disposal Carbon
_UI_LifeCycle_disposalDescription_feature = Disposal Description _UI_LifeCycle_disposalDescription_feature = Disposal Description
_UI_WindowType__feature = _UI_WindowType__feature = Window Type
_UI_LifeCycle__feature = _UI_LifeCycle__feature = Life Cycle
_UI_LifeCycle_type_feature = Type _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
...@@ -70,3 +69,19 @@ _UI_Material_constructionDescription_feature = Construction Description ...@@ -70,3 +69,19 @@ _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_ConstructionCategory_type = Constructions
_UI_Mounting_type = Mounting
_UI_Layer_type = Layer
_UI_MaterialCatalog_constructionCategories_feature = Constructions
_UI_ConstructionCategory_name_feature = Construction Category
_UI_ConstructionCategory_mountings_feature = Mountings
_UI_Mounting_id_feature = Id
_UI_Mounting_name_feature = Name
_UI_Mounting_layers_feature = Layers
_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_Mounting_mountingId_feature = Mounting Id
_UI_Layer__feature = Layer
...@@ -210,6 +210,75 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd ...@@ -210,6 +210,75 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd
return materialItemProvider; return materialItemProvider;
} }
/**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.ConstructionCategory} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConstructionCategoryItemProvider constructionCategoryItemProvider;
/**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.ConstructionCategory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createConstructionCategoryAdapter() {
if (constructionCategoryItemProvider == null) {
constructionCategoryItemProvider = new ConstructionCategoryItemProvider(this);
}
return constructionCategoryItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.Mounting} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MountingItemProvider mountingItemProvider;
/**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.Mounting}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createMountingAdapter() {
if (mountingItemProvider == null) {
mountingItemProvider = new MountingItemProvider(this);
}
return mountingItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.Layer} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected LayerItemProvider layerItemProvider;
/**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.Layer}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createLayerAdapter() {
if (layerItemProvider == null) {
layerItemProvider = new LayerItemProvider(this);
}
return layerItemProvider;
}
/** /**
* This returns the root adapter factory that contains this factory. * This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -327,6 +396,12 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd ...@@ -327,6 +396,12 @@ public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAd
materialCategoryItemProvider.dispose(); materialCategoryItemProvider.dispose();
if (materialItemProvider != null) if (materialItemProvider != null)
materialItemProvider.dispose(); materialItemProvider.dispose();
if (constructionCategoryItemProvider != null)
constructionCategoryItemProvider.dispose();
if (mountingItemProvider != null)
mountingItemProvider.dispose();
if (layerItemProvider != null)
layerItemProvider.dispose();
} }
} }
...@@ -107,17 +107,6 @@ public class CatalogItemProvider extends ItemProviderAdapter implements IEditing ...@@ -107,17 +107,6 @@ public class CatalogItemProvider extends ItemProviderAdapter implements IEditing
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/**
* This returns Catalog.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Catalog"));
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
......
/**
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.ConstructionCategory;
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.ConstructionCategory} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ConstructionCategoryItemProvider 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 ConstructionCategoryItemProvider(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);
}
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_ConstructionCategory_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ConstructionCategory_name_feature",
"_UI_ConstructionCategory_type"),
BuildingPhysicsPackage.Literals.CONSTRUCTION_CATEGORY__NAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This returns ConstructionCategory.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/ConstructionCategory"));
}
/**
* <!-- 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 = ((ConstructionCategory) object).getName();
return label == null || label.length() == 0 ? getString("_UI_ConstructionCategory_type")
: getString("_UI_ConstructionCategory_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(ConstructionCategory.class)) {
case BuildingPhysicsPackage.CONSTRUCTION_CATEGORY__NAME:
case BuildingPhysicsPackage.CONSTRUCTION_CATEGORY__MOUNTINGS:
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.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.Layer;
import de.hftstuttgart.cityunits.model.NullableQuantity;
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.Layer} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class LayerItemProvider 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 LayerItemProvider(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);
addMaterialPropertyDescriptor(object);
addThicknessPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Material feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addMaterialPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Layer_material_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Layer_material_feature", "_UI_Layer_type"),
BuildingPhysicsPackage.Literals.LAYER__MATERIAL, true, false, true, null, null, null));
}
/**
* This adds a property descriptor for the Thickness feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addThicknessPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Layer_thickness_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Layer_thickness_feature",
"_UI_Layer_type"),
BuildingPhysicsPackage.Literals.LAYER__THICKNESS, 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) {
NullableQuantity labelValue = ((Layer) object).getThickness();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ? getString("_UI_Layer_type")
: getString("_UI_Layer_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(Layer.class)) {
case BuildingPhysicsPackage.LAYER__THICKNESS:
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;
}
}
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
*/ */
package de.hftstuttgart.buildingphysics.provider; package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCatalog; import de.hftstuttgart.buildingphysics.MaterialCatalog;
...@@ -11,9 +10,7 @@ import java.util.List; ...@@ -11,9 +10,7 @@ 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.ecore.EStructuralFeature; import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.edit.provider.ViewerNotification;
...@@ -62,6 +59,7 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider { ...@@ -62,6 +59,7 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
if (childrenFeatures == null) { if (childrenFeatures == null) {
super.getChildrenFeatures(object); super.getChildrenFeatures(object);
childrenFeatures.add(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__MATERIAL_CATEGORIES); childrenFeatures.add(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__MATERIAL_CATEGORIES);
childrenFeatures.add(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES);
} }
return childrenFeatures; return childrenFeatures;
} }
...@@ -104,13 +102,11 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider { ...@@ -104,13 +102,11 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
* This returns the label text for the adapted class. * This returns the label text for the adapted class.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated NOT
*/ */
@Override @Override
public String getText(Object object) { public String getText(Object object) {
String label = ((MaterialCatalog) object).getName(); return getString("_UI_MaterialCatalog_type");
return label == null || label.length() == 0 ? getString("_UI_MaterialCatalog_type")
: getString("_UI_MaterialCatalog_type") + " " + label;
} }
/** /**
...@@ -126,6 +122,7 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider { ...@@ -126,6 +122,7 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
switch (notification.getFeatureID(MaterialCatalog.class)) { switch (notification.getFeatureID(MaterialCatalog.class)) {
case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES: case BuildingPhysicsPackage.MATERIAL_CATALOG__MATERIAL_CATEGORIES:
case BuildingPhysicsPackage.MATERIAL_CATALOG__CONSTRUCTION_CATEGORIES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return; return;
} }
...@@ -142,10 +139,6 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider { ...@@ -142,10 +139,6 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
@Override @Override
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
.add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATALOG__MATERIAL_CATEGORIES,
BuildingPhysicsFactory.eINSTANCE.createMaterialCategory()));
} }
} }
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
*/ */
package de.hftstuttgart.buildingphysics.provider; package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage; import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCategory; import de.hftstuttgart.buildingphysics.MaterialCategory;
...@@ -13,9 +12,6 @@ import org.eclipse.emf.common.notify.AdapterFactory; ...@@ -13,9 +12,6 @@ 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.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider;
...@@ -77,36 +73,6 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements ...@@ -77,36 +73,6 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/**
* 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_CATEGORY__MATERIAL);
}
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 MaterialCategory.gif. * This returns MaterialCategory.gif.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
...@@ -153,12 +119,10 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements ...@@ -153,12 +119,10 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements
updateChildren(notification); updateChildren(notification);
switch (notification.getFeatureID(MaterialCategory.class)) { switch (notification.getFeatureID(MaterialCategory.class)) {
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS:
case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME: case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return; return;
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIAL:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
} }
super.notifyChanged(notification); super.notifyChanged(notification);
} }
...@@ -173,9 +137,6 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements ...@@ -173,9 +137,6 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements
@Override @Override
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.add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATEGORY__MATERIAL,
BuildingPhysicsFactory.eINSTANCE.createMaterial()));
} }
/** /**
......
...@@ -53,7 +53,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin ...@@ -53,7 +53,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
if (itemPropertyDescriptors == null) { if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object); super.getPropertyDescriptors(object);
addIdPropertyDescriptor(object); addMaterialIdPropertyDescriptor(object);
addNamePropertyDescriptor(object); addNamePropertyDescriptor(object);
addDensityPropertyDescriptor(object); addDensityPropertyDescriptor(object);
addHeatCapacityPropertyDescriptor(object); addHeatCapacityPropertyDescriptor(object);
...@@ -69,18 +69,19 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin ...@@ -69,18 +69,19 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
} }
/** /**
* This adds a property descriptor for the Id feature. * This adds a property descriptor for the Material Id feature.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @generated * @generated
*/ */
protected void addIdPropertyDescriptor(Object object) { protected void addMaterialIdPropertyDescriptor(Object object) {
itemPropertyDescriptors itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Material_id_feature"), getResourceLocator(), getString("_UI_Material_materialId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Material_id_feature", "_UI_Material_type"), getString("_UI_PropertyDescriptor_description", "_UI_Material_materialId_feature",
BuildingPhysicsPackage.Literals.MATERIAL__ID, true, false, false, "_UI_Material_type"),
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); BuildingPhysicsPackage.Literals.MATERIAL__MATERIAL_ID, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/** /**
...@@ -191,7 +192,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin ...@@ -191,7 +192,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
getString("_UI_Material_constructionDescription_feature"), getString("_UI_Material_constructionDescription_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Material_constructionDescription_feature", getString("_UI_PropertyDescriptor_description", "_UI_Material_constructionDescription_feature",
"_UI_Material_type"), "_UI_Material_type"),
BuildingPhysicsPackage.Literals.MATERIAL__CONSTRUCTION_DESCRIPTION, true, false, false, BuildingPhysicsPackage.Literals.MATERIAL__CONSTRUCTION_DESCRIPTION, true, true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
...@@ -239,21 +240,10 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin ...@@ -239,21 +240,10 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
getResourceLocator(), getString("_UI_Material_disposalDescription_feature"), getResourceLocator(), getString("_UI_Material_disposalDescription_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Material_disposalDescription_feature", getString("_UI_PropertyDescriptor_description", "_UI_Material_disposalDescription_feature",
"_UI_Material_type"), "_UI_Material_type"),
BuildingPhysicsPackage.Literals.MATERIAL__DISPOSAL_DESCRIPTION, true, false, false, BuildingPhysicsPackage.Literals.MATERIAL__DISPOSAL_DESCRIPTION, true, true, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} }
/**
* This returns Material.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Material"));
}
/** /**
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <!-- end-user-doc --> * <!-- end-user-doc -->
...@@ -289,7 +279,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin ...@@ -289,7 +279,7 @@ public class MaterialItemProvider extends ItemProviderAdapter implements IEditin
updateChildren(notification); updateChildren(notification);
switch (notification.getFeatureID(Material.class)) { switch (notification.getFeatureID(Material.class)) {
case BuildingPhysicsPackage.MATERIAL__ID: case BuildingPhysicsPackage.MATERIAL__MATERIAL_ID:
case BuildingPhysicsPackage.MATERIAL__NAME: case BuildingPhysicsPackage.MATERIAL__NAME:
case BuildingPhysicsPackage.MATERIAL__DENSITY: case BuildingPhysicsPackage.MATERIAL__DENSITY:
case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY: case BuildingPhysicsPackage.MATERIAL__HEAT_CAPACITY:
......