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

UI improvements

parent 7140fdfe
......@@ -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">
<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:HandledMenuItem" xmi:id="_y6FesCWUEeux0PTSTJn6xg" elementId="de.hftstuttgart.buildingphysics.application.handleditem.file.new" label="New..." 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="_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="_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/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/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>
<children xsi:type="menu:Menu" xmi:id="_6wlLjsgZEeSyMNYR5xypkQ" elementId="help" label="Help">
......@@ -14,9 +14,9 @@
</mainMenu>
<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: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="_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="_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="_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/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/disk-black.png" command="_6wlLg8gZEeSyMNYR5xypkQ"/>
</children>
</trimBars>
</children>
......
......@@ -15,9 +15,9 @@ _UI_PropertyDescriptor_description = The {0} of the {1}
_UI_BuildingPhysicsCatalog_type = Catalog
_UI_WindowType_type = Window Type
_UI_Catalog_type = Catalog
_UI_WindowCatalog_type = Window Catalog
_UI_MaterialCatalog_type = Material Catalog
_UI_MaterialCategory_type = Material Category
_UI_WindowCatalog_type = Windows
_UI_MaterialCatalog_type = Materials and Constructions
_UI_MaterialCategory_type =
_UI_Material_type = Material
_UI_Unknown_type = Object
......@@ -46,7 +46,6 @@ _UI_Material_heatCapacity_feature = Heat Capacity
_UI_Material_conductivity_feature = Conductivity
_UI_Unknown_feature = Unspecified
_UI_Catalog_xxx_feature = Xxx
_UI_LifeCycle_type = Life Cycle
_UI_WindowType_lifeCycle_feature = Life Cycle
_UI_LifeCycle_embodiedEnergy_feature = Embodied Energy
......@@ -55,8 +54,8 @@ _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 =
_UI_LifeCycle__feature =
_UI_WindowType__feature = Window Type
_UI_LifeCycle__feature = Life Cycle
_UI_LifeCycle_type_feature = Type
_UI_WindowType_embodiedEnergy_feature = Embodied Energy
_UI_WindowType_embodiedCarbon_feature = Embodied Carbon
......@@ -70,11 +69,11 @@ _UI_Material_constructionDescription_feature = Construction Description
_UI_Material_disposalEnergy_feature = Disposal Energy
_UI_Material_disposalCarbon_feature = Disposal Carbon
_UI_Material_disposalDescription_feature = Disposal Description
_UI_ConstructionCategory_type = Construction Category
_UI_ConstructionCategory_type = Constructions
_UI_Mounting_type = Mounting
_UI_Layer_type = Layer
_UI_MaterialCatalog_constructionCategories_feature = Construction Categories
_UI_ConstructionCategory_name_feature = Name
_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
......@@ -85,4 +84,4 @@ _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 =
_UI_Layer__feature = Layer
......@@ -107,17 +107,6 @@ public class CatalogItemProvider extends ItemProviderAdapter implements IEditing
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 -->
* <!-- end-user-doc -->
......
......@@ -2,7 +2,6 @@
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.ConstructionCategory;
......@@ -13,9 +12,6 @@ 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.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
......@@ -77,36 +73,6 @@ public class ConstructionCategoryItemProvider extends ItemProviderAdapter implem
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.CONSTRUCTION_CATEGORY__MOUNTINGS);
}
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 ConstructionCategory.gif.
* <!-- begin-user-doc -->
......@@ -154,10 +120,8 @@ public class ConstructionCategoryItemProvider extends ItemProviderAdapter implem
switch (notification.getFeatureID(ConstructionCategory.class)) {
case BuildingPhysicsPackage.CONSTRUCTION_CATEGORY__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case BuildingPhysicsPackage.CONSTRUCTION_CATEGORY__MOUNTINGS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
......@@ -173,9 +137,6 @@ public class ConstructionCategoryItemProvider extends ItemProviderAdapter implem
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add(createChildParameter(BuildingPhysicsPackage.Literals.CONSTRUCTION_CATEGORY__MOUNTINGS,
BuildingPhysicsFactory.eINSTANCE.createMounting()));
}
/**
......
......@@ -91,17 +91,6 @@ public class LayerItemProvider extends ItemProviderAdapter implements IEditingDo
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
* This returns Layer.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Layer"));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
......
......@@ -2,7 +2,6 @@
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCatalog;
......@@ -11,9 +10,7 @@ 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;
......@@ -105,13 +102,11 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @generated NOT
*/
@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;
return getString("_UI_MaterialCatalog_type");
}
/**
......@@ -144,14 +139,6 @@ public class MaterialCatalogItemProvider extends CatalogItemProvider {
@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()));
}
}
......@@ -2,7 +2,6 @@
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
import de.hftstuttgart.buildingphysics.MaterialCategory;
......@@ -13,9 +12,6 @@ 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.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
......@@ -77,36 +73,6 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements
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__MATERIALS);
}
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.
* <!-- begin-user-doc -->
......@@ -153,12 +119,10 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements
updateChildren(notification);
switch (notification.getFeatureID(MaterialCategory.class)) {
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS:
case BuildingPhysicsPackage.MATERIAL_CATEGORY__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case BuildingPhysicsPackage.MATERIAL_CATEGORY__MATERIALS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
......@@ -173,9 +137,6 @@ public class MaterialCategoryItemProvider extends ItemProviderAdapter implements
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add(createChildParameter(BuildingPhysicsPackage.Literals.MATERIAL_CATEGORY__MATERIALS,
BuildingPhysicsFactory.eINSTANCE.createMaterial()));
}
/**
......
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