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

Catalogs modeled for window types and materials plus generated classes

parent ba4de919
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.hftstuttgart.buildingphysics.edit</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: de.hftstuttgart.buildingphysics.edit;singleton:=true
Automatic-Module-Name: de.hftstuttgart.buildingphysics.edit
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: de.hftstuttgart.buildingphysics.provider.BuildingPhysicsEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: de.hftstuttgart.buildingphysics.provider
Require-Bundle: org.eclipse.core.runtime,
de.hftstuttgart.buildingphysics;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy
#
bin.includes = .,\
icons/,\
META-INF/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
source.. = src-gen/
output.. = bin/
#
pluginName = de.hftstuttgart.buildingphysics Edit Support
providerName = www.example.org
_UI_CreateChild_text = {0}
_UI_CreateChild_text2 = {1} {0}
_UI_CreateChild_text3 = {1}
_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_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_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_Material_type = Material
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value
_UI_BuildingPhysicsCatalog_author_feature = Author
_UI_BuildingPhysicsCatalog_windowCatalog_feature = Window Catalog
_UI_BuildingPhysicsCatalog_materialCatalog_feature = Material Catalog
_UI_WindowType_id_feature = Id
_UI_WindowType_name_feature = Name
_UI_WindowType_uValue_feature = UValue
_UI_WindowType_gValue_feature = GValue
_UI_WindowType_glazingNumber_feature = Glazing Number
_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 = Name
_UI_Material_id_feature = Id
_UI_Material_name_feature = Name
_UI_Material_density_feature = Density
_UI_Material_heatCapacity_feature = Heat Capacity
_UI_Material_conductivity_feature = Conductivity
_UI_Unknown_feature = Unspecified
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
-->
<plugin>
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- @generated buildingphysics -->
<factory
uri="http://www.hftstuttgart.de/buildingphysics"
class="de.hftstuttgart.buildingphysics.provider.BuildingPhysicsItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
</plugin>
/**
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog;
import de.hftstuttgart.buildingphysics.BuildingPhysicsFactory;
import de.hftstuttgart.buildingphysics.BuildingPhysicsPackage;
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.ecore.EStructuralFeature;
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.BuildingPhysicsCatalog} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class BuildingPhysicsCatalogItemProvider 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 BuildingPhysicsCatalogItemProvider(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);
addAuthorPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Author feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addAuthorPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_BuildingPhysicsCatalog_author_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BuildingPhysicsCatalog_author_feature",
"_UI_BuildingPhysicsCatalog_type"),
BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__AUTHOR, true, false, false,
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.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG);
childrenFeatures.add(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG);
}
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 BuildingPhysicsCatalog.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/BuildingPhysicsCatalog"));
}
/**
* <!-- 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 = ((BuildingPhysicsCatalog) object).getAuthor();
return label == null || label.length() == 0 ? getString("_UI_BuildingPhysicsCatalog_type")
: getString("_UI_BuildingPhysicsCatalog_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(BuildingPhysicsCatalog.class)) {
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__AUTHOR:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG:
case BuildingPhysicsPackage.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG:
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.BUILDING_PHYSICS_CATALOG__WINDOW_CATALOG,
BuildingPhysicsFactory.eINSTANCE.createWindowCatalog()));
newChildDescriptors
.add(createChildParameter(BuildingPhysicsPackage.Literals.BUILDING_PHYSICS_CATALOG__MATERIAL_CATALOG,
BuildingPhysicsFactory.eINSTANCE.createMaterialCatalog()));
}
/**
* 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 org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
/**
* This is the central singleton for the BuildingPhysics edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public final class BuildingPhysicsEditPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final BuildingPhysicsEditPlugin INSTANCE = new BuildingPhysicsEditPlugin();
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static Implementation plugin;
/**
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsEditPlugin() {
super(new ResourceLocator[] {});
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
@Override
public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
public static Implementation getPlugin() {
return plugin;
}
/**
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static class Implementation extends EclipsePlugin {
/**
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Implementation() {
super();
// Remember the static instance.
//
plugin = this;
}
}
}
/**
*/
package de.hftstuttgart.buildingphysics.provider;
import de.hftstuttgart.buildingphysics.util.BuildingPhysicsAdapterFactory;
import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.IChangeNotifier;
import org.eclipse.emf.edit.provider.IDisposable;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
/**
* This is the factory that is used to provide the interfaces needed to support Viewers.
* The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
* The adapters also support Eclipse property sheets.
* Note that most of the adapters are shared among multiple instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class BuildingPhysicsItemProviderAdapterFactory extends BuildingPhysicsAdapterFactory
implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
/**
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ComposedAdapterFactory parentAdapterFactory;
/**
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IChangeNotifier changeNotifier = new ChangeNotifier();
/**
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<Object> supportedTypes = new ArrayList<Object>();
/**
* This constructs an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BuildingPhysicsItemProviderAdapterFactory() {
supportedTypes.add(IEditingDomainItemProvider.class);
supportedTypes.add(IStructuredItemContentProvider.class);
supportedTypes.add(ITreeItemContentProvider.class);
supportedTypes.add(IItemLabelProvider.class);
supportedTypes.add(IItemPropertySource.class);
}
/**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BuildingPhysicsCatalogItemProvider buildingPhysicsCatalogItemProvider;
/**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.BuildingPhysicsCatalog}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createBuildingPhysicsCatalogAdapter() {
if (buildingPhysicsCatalogItemProvider == null) {
buildingPhysicsCatalogItemProvider = new BuildingPhysicsCatalogItemProvider(this);
}
return buildingPhysicsCatalogItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link de.hftstuttgart.buildingphysics.WindowType} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected WindowTypeItemProvider windowTypeItemProvider;
/**
* This creates an adapter for a {@link de.hftstuttgart.buildingphysics.WindowType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createWindowTypeAdapter() {
if (windowTypeItemProvider == null) {
windowTypeItemProvider =