Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-07-19 08:22:04 +0000
committerEike Stepper2012-07-19 08:22:04 +0000
commit1460904fd3c193ffaf809913b2983a400fce9d94 (patch)
tree72f3a17b75fedba3ae1060df1d32c9c7889be954 /plugins/org.gastro.inventory.edit
parent5f360965ae87478e0681899bf310a210cafc2c44 (diff)
downloadcdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.gz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.xz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.zip
Fix line endings in master (dos2unix)
Diffstat (limited to 'plugins/org.gastro.inventory.edit')
-rw-r--r--plugins/org.gastro.inventory.edit/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--plugins/org.gastro.inventory.edit/copyright.txt20
-rw-r--r--plugins/org.gastro.inventory.edit/plugin.xml56
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java362
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java350
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java384
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java190
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java966
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java432
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java448
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java328
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java384
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java482
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java466
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java328
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java432
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java374
-rw-r--r--plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java302
18 files changed, 3155 insertions, 3155 deletions
diff --git a/plugins/org.gastro.inventory.edit/.settings/org.eclipse.core.resources.prefs b/plugins/org.gastro.inventory.edit/.settings/org.eclipse.core.resources.prefs
index 944f1d0e6f..c407b010c2 100644
--- a/plugins/org.gastro.inventory.edit/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.gastro.inventory.edit/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 04 12:59:37 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 04 12:59:37 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.gastro.inventory.edit/copyright.txt b/plugins/org.gastro.inventory.edit/copyright.txt
index 194641baea..dfbc61810a 100644
--- a/plugins/org.gastro.inventory.edit/copyright.txt
+++ b/plugins/org.gastro.inventory.edit/copyright.txt
@@ -1,11 +1,11 @@
-Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
- Eike Stepper - initial API and implementation
-
-Initial Publication:
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Eike Stepper - initial API and implementation
+
+Initial Publication:
Eclipse Magazin - http://www.eclipse-magazin.de \ No newline at end of file
diff --git a/plugins/org.gastro.inventory.edit/plugin.xml b/plugins/org.gastro.inventory.edit/plugin.xml
index c004b82d91..c73c32d761 100644
--- a/plugins/org.gastro.inventory.edit/plugin.xml
+++ b/plugins/org.gastro.inventory.edit/plugin.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Eike Stepper - initial API and implementation
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri="http://www.gastro.org/inventory/1.0"
- class="org.gastro.inventory.provider.InventoryItemProviderAdapterFactory"
- 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>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+ Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Eike Stepper - initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.gastro.org/inventory/1.0"
+ class="org.gastro.inventory.provider.InventoryItemProviderAdapterFactory"
+ 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>
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java
index b5cfef1e17..cfccef9166 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java
@@ -1,181 +1,181 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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.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.ViewerNotification;
-
-import org.gastro.inventory.Department;
-import org.gastro.inventory.InventoryFactory;
-import org.gastro.inventory.InventoryPackage;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Department} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class DepartmentItemProvider extends StationItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public DepartmentItemProvider(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(InventoryPackage.Literals.DEPARTMENT__RECIPES);
- childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__EMPLOYEES);
- childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__STOCKS);
- }
- 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 Department.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Department"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Department)object).getStationID();
- return label == null || label.length() == 0 ? getString("_UI_Department_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(Department.class))
- {
- case InventoryPackage.DEPARTMENT__RECIPES:
- case InventoryPackage.DEPARTMENT__EMPLOYEES:
- case InventoryPackage.DEPARTMENT__STOCKS:
- 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(InventoryPackage.Literals.DEPARTMENT__RECIPES,
- InventoryFactory.eINSTANCE.createRecipe()));
-
- newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__EMPLOYEES,
- InventoryFactory.eINSTANCE.createEmployee()));
-
- newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__STOCKS,
- InventoryFactory.eINSTANCE.createStock()));
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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.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.ViewerNotification;
+
+import org.gastro.inventory.Department;
+import org.gastro.inventory.InventoryFactory;
+import org.gastro.inventory.InventoryPackage;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Department} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class DepartmentItemProvider extends StationItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DepartmentItemProvider(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(InventoryPackage.Literals.DEPARTMENT__RECIPES);
+ childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__EMPLOYEES);
+ childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__STOCKS);
+ }
+ 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 Department.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Department"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Department)object).getStationID();
+ return label == null || label.length() == 0 ? getString("_UI_Department_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(Department.class))
+ {
+ case InventoryPackage.DEPARTMENT__RECIPES:
+ case InventoryPackage.DEPARTMENT__EMPLOYEES:
+ case InventoryPackage.DEPARTMENT__STOCKS:
+ 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(InventoryPackage.Literals.DEPARTMENT__RECIPES,
+ InventoryFactory.eINSTANCE.createRecipe()));
+
+ newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__EMPLOYEES,
+ InventoryFactory.eINSTANCE.createEmployee()));
+
+ newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__STOCKS,
+ InventoryFactory.eINSTANCE.createStock()));
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java
index 227a609b59..2be24cdfa9 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java
@@ -1,175 +1,175 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.Employee;
-import org.gastro.inventory.InventoryPackage;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Employee} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class EmployeeItemProvider 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 EmployeeItemProvider(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_Employee_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Employee_name_feature", "_UI_Employee_type"),
- InventoryPackage.Literals.EMPLOYEE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns Employee.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Employee)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Employee_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(Employee.class))
- {
- case InventoryPackage.EMPLOYEE__NAME:
- 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 InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.Employee;
+import org.gastro.inventory.InventoryPackage;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Employee} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class EmployeeItemProvider 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 EmployeeItemProvider(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_Employee_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Employee_name_feature", "_UI_Employee_type"),
+ InventoryPackage.Literals.EMPLOYEE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Employee.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Employee)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Employee_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(Employee.class))
+ {
+ case InventoryPackage.EMPLOYEE__NAME:
+ 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 InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java
index 41606856aa..000fd24885 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java
@@ -1,192 +1,192 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.Ingredient;
-import org.gastro.inventory.InventoryPackage;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Ingredient} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class IngredientItemProvider 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 IngredientItemProvider(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);
-
- addProductPropertyDescriptor(object);
- addQuantityPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Product feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addProductPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Ingredient_product_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Ingredient_product_feature", "_UI_Ingredient_type"),
- InventoryPackage.Literals.INGREDIENT__PRODUCT, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Quantity feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addQuantityPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Ingredient_quantity_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Ingredient_quantity_feature", "_UI_Ingredient_type"),
- InventoryPackage.Literals.INGREDIENT__QUANTITY, true, false, false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns Ingredient.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Ingredient"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- Ingredient ingredient = (Ingredient)object;
- return ingredient.getProduct() == null ? getString("_UI_Ingredient_type") : ingredient.getProduct().getName() + " "
- + ingredient.getQuantity();
- }
-
- /**
- * 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 NOT
- */
- @Override
- public void notifyChanged(Notification notification)
- {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Ingredient.class))
- {
- case InventoryPackage.INGREDIENT__PRODUCT:
- case InventoryPackage.INGREDIENT__QUANTITY:
- 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 InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.Ingredient;
+import org.gastro.inventory.InventoryPackage;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Ingredient} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class IngredientItemProvider 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 IngredientItemProvider(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);
+
+ addProductPropertyDescriptor(object);
+ addQuantityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Product feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addProductPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Ingredient_product_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Ingredient_product_feature", "_UI_Ingredient_type"),
+ InventoryPackage.Literals.INGREDIENT__PRODUCT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Quantity feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addQuantityPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Ingredient_quantity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Ingredient_quantity_feature", "_UI_Ingredient_type"),
+ InventoryPackage.Literals.INGREDIENT__QUANTITY, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Ingredient.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Ingredient"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ Ingredient ingredient = (Ingredient)object;
+ return ingredient.getProduct() == null ? getString("_UI_Ingredient_type") : ingredient.getProduct().getName() + " "
+ + ingredient.getQuantity();
+ }
+
+ /**
+ * 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 NOT
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Ingredient.class))
+ {
+ case InventoryPackage.INGREDIENT__PRODUCT:
+ case InventoryPackage.INGREDIENT__QUANTITY:
+ 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 InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java
index e22fb2f42d..1c78e85b77 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java
@@ -1,95 +1,95 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the Inventory edit plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public final class InventoryEditPlugin extends EMFPlugin
-{
- /**
- * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final InventoryEditPlugin INSTANCE = new InventoryEditPlugin();
-
- /**
- * 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 InventoryEditPlugin()
- {
- 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;
- }
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Inventory edit plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class InventoryEditPlugin extends EMFPlugin
+{
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final InventoryEditPlugin INSTANCE = new InventoryEditPlugin();
+
+ /**
+ * 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 InventoryEditPlugin()
+ {
+ 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;
+ }
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java
index ba1c69d312..b082f1dc33 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java
@@ -1,483 +1,483 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.util.InventoryAdapterFactory;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * 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 InventoryItemProviderAdapterFactory extends InventoryAdapterFactory 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 InventoryItemProviderAdapterFactory()
- {
- 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 org.gastro.inventory.Stock} instances. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected StockItemProvider stockItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Stock}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createStockAdapter()
- {
- if (stockItemProvider == null)
- {
- stockItemProvider = new StockItemProvider(this);
- }
-
- return stockItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.StockProduct} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected StockProductItemProvider stockProductItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.StockProduct}. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- @Override
- public Adapter createStockProductAdapter()
- {
- if (stockProductItemProvider == null)
- {
- stockProductItemProvider = new StockProductItemProvider(this);
- }
-
- return stockProductItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Recipe} instances. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected RecipeItemProvider recipeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Recipe}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createRecipeAdapter()
- {
- if (recipeItemProvider == null)
- {
- recipeItemProvider = new RecipeItemProvider(this);
- }
-
- return recipeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Ingredient} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected IngredientItemProvider ingredientItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Ingredient}. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- @Override
- public Adapter createIngredientAdapter()
- {
- if (ingredientItemProvider == null)
- {
- ingredientItemProvider = new IngredientItemProvider(this);
- }
-
- return ingredientItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.MenuCard} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected MenuCardItemProvider menuCardItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.MenuCard}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createMenuCardAdapter()
- {
- if (menuCardItemProvider == null)
- {
- menuCardItemProvider = new MenuCardItemProvider(this);
- }
-
- return menuCardItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Restaurant} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected RestaurantItemProvider restaurantItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Restaurant}. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- @Override
- public Adapter createRestaurantAdapter()
- {
- if (restaurantItemProvider == null)
- {
- restaurantItemProvider = new RestaurantItemProvider(this);
- }
-
- return restaurantItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Department} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected DepartmentItemProvider departmentItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Department}. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- @Override
- public Adapter createDepartmentAdapter()
- {
- if (departmentItemProvider == null)
- {
- departmentItemProvider = new DepartmentItemProvider(this);
- }
-
- return departmentItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Offering} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected OfferingItemProvider offeringItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Offering}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createOfferingAdapter()
- {
- if (offeringItemProvider == null)
- {
- offeringItemProvider = new OfferingItemProvider(this);
- }
-
- return offeringItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Table} instances. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected TableItemProvider tableItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Table}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createTableAdapter()
- {
- if (tableItemProvider == null)
- {
- tableItemProvider = new TableItemProvider(this);
- }
-
- return tableItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Employee} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EmployeeItemProvider employeeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Employee}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createEmployeeAdapter()
- {
- if (employeeItemProvider == null)
- {
- employeeItemProvider = new EmployeeItemProvider(this);
- }
-
- return employeeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.gastro.inventory.Section} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected SectionItemProvider sectionItemProvider;
-
- /**
- * This creates an adapter for a {@link org.gastro.inventory.Section}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createSectionAdapter()
- {
- if (sectionItemProvider == null)
- {
- sectionItemProvider = new SectionItemProvider(this);
- }
-
- return sectionItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory()
- {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
- {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type)
- {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type)
- {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type)
- {
- if (isFactoryForType(type))
- {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
- {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener)
- {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener)
- {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public void fireNotifyChanged(Notification notification)
- {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null)
- {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void dispose()
- {
- if (stockItemProvider != null)
- stockItemProvider.dispose();
- if (stockProductItemProvider != null)
- stockProductItemProvider.dispose();
- if (recipeItemProvider != null)
- recipeItemProvider.dispose();
- if (ingredientItemProvider != null)
- ingredientItemProvider.dispose();
- if (menuCardItemProvider != null)
- menuCardItemProvider.dispose();
- if (restaurantItemProvider != null)
- restaurantItemProvider.dispose();
- if (departmentItemProvider != null)
- departmentItemProvider.dispose();
- if (offeringItemProvider != null)
- offeringItemProvider.dispose();
- if (tableItemProvider != null)
- tableItemProvider.dispose();
- if (employeeItemProvider != null)
- employeeItemProvider.dispose();
- if (sectionItemProvider != null)
- sectionItemProvider.dispose();
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.util.InventoryAdapterFactory;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * 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 InventoryItemProviderAdapterFactory extends InventoryAdapterFactory 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 InventoryItemProviderAdapterFactory()
+ {
+ 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 org.gastro.inventory.Stock} instances. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected StockItemProvider stockItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Stock}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createStockAdapter()
+ {
+ if (stockItemProvider == null)
+ {
+ stockItemProvider = new StockItemProvider(this);
+ }
+
+ return stockItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.StockProduct} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected StockProductItemProvider stockProductItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.StockProduct}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createStockProductAdapter()
+ {
+ if (stockProductItemProvider == null)
+ {
+ stockProductItemProvider = new StockProductItemProvider(this);
+ }
+
+ return stockProductItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Recipe} instances. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RecipeItemProvider recipeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Recipe}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createRecipeAdapter()
+ {
+ if (recipeItemProvider == null)
+ {
+ recipeItemProvider = new RecipeItemProvider(this);
+ }
+
+ return recipeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Ingredient} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IngredientItemProvider ingredientItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Ingredient}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createIngredientAdapter()
+ {
+ if (ingredientItemProvider == null)
+ {
+ ingredientItemProvider = new IngredientItemProvider(this);
+ }
+
+ return ingredientItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.MenuCard} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected MenuCardItemProvider menuCardItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.MenuCard}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createMenuCardAdapter()
+ {
+ if (menuCardItemProvider == null)
+ {
+ menuCardItemProvider = new MenuCardItemProvider(this);
+ }
+
+ return menuCardItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Restaurant} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RestaurantItemProvider restaurantItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Restaurant}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createRestaurantAdapter()
+ {
+ if (restaurantItemProvider == null)
+ {
+ restaurantItemProvider = new RestaurantItemProvider(this);
+ }
+
+ return restaurantItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Department} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DepartmentItemProvider departmentItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Department}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createDepartmentAdapter()
+ {
+ if (departmentItemProvider == null)
+ {
+ departmentItemProvider = new DepartmentItemProvider(this);
+ }
+
+ return departmentItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Offering} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OfferingItemProvider offeringItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Offering}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createOfferingAdapter()
+ {
+ if (offeringItemProvider == null)
+ {
+ offeringItemProvider = new OfferingItemProvider(this);
+ }
+
+ return offeringItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Table} instances. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TableItemProvider tableItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Table}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createTableAdapter()
+ {
+ if (tableItemProvider == null)
+ {
+ tableItemProvider = new TableItemProvider(this);
+ }
+
+ return tableItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Employee} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EmployeeItemProvider employeeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Employee}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createEmployeeAdapter()
+ {
+ if (employeeItemProvider == null)
+ {
+ employeeItemProvider = new EmployeeItemProvider(this);
+ }
+
+ return employeeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.gastro.inventory.Section} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SectionItemProvider sectionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.gastro.inventory.Section}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSectionAdapter()
+ {
+ if (sectionItemProvider == null)
+ {
+ sectionItemProvider = new SectionItemProvider(this);
+ }
+
+ return sectionItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory()
+ {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
+ {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type)
+ {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type)
+ {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type)
+ {
+ if (isFactoryForType(type))
+ {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter)))
+ {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener)
+ {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener)
+ {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification)
+ {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null)
+ {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void dispose()
+ {
+ if (stockItemProvider != null)
+ stockItemProvider.dispose();
+ if (stockProductItemProvider != null)
+ stockProductItemProvider.dispose();
+ if (recipeItemProvider != null)
+ recipeItemProvider.dispose();
+ if (ingredientItemProvider != null)
+ ingredientItemProvider.dispose();
+ if (menuCardItemProvider != null)
+ menuCardItemProvider.dispose();
+ if (restaurantItemProvider != null)
+ restaurantItemProvider.dispose();
+ if (departmentItemProvider != null)
+ departmentItemProvider.dispose();
+ if (offeringItemProvider != null)
+ offeringItemProvider.dispose();
+ if (tableItemProvider != null)
+ tableItemProvider.dispose();
+ if (employeeItemProvider != null)
+ employeeItemProvider.dispose();
+ if (sectionItemProvider != null)
+ sectionItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java
index 9709924304..81f09f4ac2 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java
@@ -1,216 +1,216 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryFactory;
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.MenuCard;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.MenuCard} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class MenuCardItemProvider 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 MenuCardItemProvider(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);
-
- addTitlePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addTitlePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_MenuCard_title_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_MenuCard_title_feature", "_UI_MenuCard_type"),
- InventoryPackage.Literals.MENU_CARD__TITLE, 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(InventoryPackage.Literals.MENU_CARD__SECTIONS);
- }
- 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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns MenuCard.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/MenuCard"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((MenuCard)object).getTitle();
- return label == null || label.length() == 0 ? getString("_UI_MenuCard_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(MenuCard.class))
- {
- case InventoryPackage.MENU_CARD__TITLE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case InventoryPackage.MENU_CARD__SECTIONS:
- 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(InventoryPackage.Literals.MENU_CARD__SECTIONS,
- InventoryFactory.eINSTANCE.createSection()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryFactory;
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.MenuCard;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.MenuCard} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class MenuCardItemProvider 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 MenuCardItemProvider(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);
+
+ addTitlePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTitlePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_MenuCard_title_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_MenuCard_title_feature", "_UI_MenuCard_type"),
+ InventoryPackage.Literals.MENU_CARD__TITLE, 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(InventoryPackage.Literals.MENU_CARD__SECTIONS);
+ }
+ 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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns MenuCard.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/MenuCard"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((MenuCard)object).getTitle();
+ return label == null || label.length() == 0 ? getString("_UI_MenuCard_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(MenuCard.class))
+ {
+ case InventoryPackage.MENU_CARD__TITLE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case InventoryPackage.MENU_CARD__SECTIONS:
+ 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(InventoryPackage.Literals.MENU_CARD__SECTIONS,
+ InventoryFactory.eINSTANCE.createSection()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java
index 116da1c21d..9b5e559179 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java
@@ -1,224 +1,224 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Offering;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Offering} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class OfferingItemProvider 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 OfferingItemProvider(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);
-
- addProductPropertyDescriptor(object);
- addNamePropertyDescriptor(object);
- addDescriptionPropertyDescriptor(object);
- addPricePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Product feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addProductPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Offering_product_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Offering_product_feature", "_UI_Offering_type"),
- InventoryPackage.Literals.OFFERING__PRODUCT, true, false, true, null, null, null));
- }
-
- /**
- * 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_Offering_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Offering_name_feature", "_UI_Offering_type"),
- InventoryPackage.Literals.OFFERING__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_Offering_description_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Offering_description_feature", "_UI_Offering_type"),
- InventoryPackage.Literals.OFFERING__DESCRIPTION, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Price feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addPricePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Offering_price_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Offering_price_feature", "_UI_Offering_type"),
- InventoryPackage.Literals.OFFERING__PRICE, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns Offering.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Offering"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Offering)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Offering_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(Offering.class))
- {
- case InventoryPackage.OFFERING__NAME:
- case InventoryPackage.OFFERING__DESCRIPTION:
- case InventoryPackage.OFFERING__PRICE:
- 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 InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Offering;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Offering} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class OfferingItemProvider 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 OfferingItemProvider(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);
+
+ addProductPropertyDescriptor(object);
+ addNamePropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ addPricePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Product feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addProductPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Offering_product_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Offering_product_feature", "_UI_Offering_type"),
+ InventoryPackage.Literals.OFFERING__PRODUCT, true, false, true, null, null, null));
+ }
+
+ /**
+ * 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_Offering_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Offering_name_feature", "_UI_Offering_type"),
+ InventoryPackage.Literals.OFFERING__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_Offering_description_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Offering_description_feature", "_UI_Offering_type"),
+ InventoryPackage.Literals.OFFERING__DESCRIPTION, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Price feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPricePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Offering_price_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Offering_price_feature", "_UI_Offering_type"),
+ InventoryPackage.Literals.OFFERING__PRICE, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Offering.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Offering"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Offering)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Offering_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(Offering.class))
+ {
+ case InventoryPackage.OFFERING__NAME:
+ case InventoryPackage.OFFERING__DESCRIPTION:
+ case InventoryPackage.OFFERING__PRICE:
+ 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 InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java
index dbdaae70e7..659c729a37 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java
@@ -1,164 +1,164 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Product;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Product} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class ProductItemProvider 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 ProductItemProvider(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_Product_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Product_name_feature", "_UI_Product_type"),
- InventoryPackage.Literals.PRODUCT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Product)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Product_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(Product.class))
- {
- case InventoryPackage.PRODUCT__NAME:
- 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 InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Product;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Product} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ProductItemProvider 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 ProductItemProvider(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_Product_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Product_name_feature", "_UI_Product_type"),
+ InventoryPackage.Literals.PRODUCT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Product)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Product_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(Product.class))
+ {
+ case InventoryPackage.PRODUCT__NAME:
+ 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 InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java
index 057d196fb4..2d420b7656 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java
@@ -1,192 +1,192 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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.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.ViewerNotification;
-
-import org.gastro.inventory.InventoryFactory;
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Recipe;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Recipe} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class RecipeItemProvider extends ProductItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public RecipeItemProvider(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);
-
- addCostPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Cost feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addCostPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Recipe_cost_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Recipe_cost_feature", "_UI_Recipe_type"),
- InventoryPackage.Literals.RECIPE__COST, false, false, false, ItemPropertyDescriptor.REAL_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(InventoryPackage.Literals.RECIPE__INGREDIENTS);
- }
- 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 Recipe.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Recipe"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Recipe)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Recipe_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(Recipe.class))
- {
- case InventoryPackage.RECIPE__COST:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case InventoryPackage.RECIPE__INGREDIENTS:
- 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(InventoryPackage.Literals.RECIPE__INGREDIENTS,
- InventoryFactory.eINSTANCE.createIngredient()));
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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.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.ViewerNotification;
+
+import org.gastro.inventory.InventoryFactory;
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Recipe;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Recipe} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class RecipeItemProvider extends ProductItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RecipeItemProvider(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);
+
+ addCostPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Cost feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCostPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Recipe_cost_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Recipe_cost_feature", "_UI_Recipe_type"),
+ InventoryPackage.Literals.RECIPE__COST, false, false, false, ItemPropertyDescriptor.REAL_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(InventoryPackage.Literals.RECIPE__INGREDIENTS);
+ }
+ 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 Recipe.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Recipe"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Recipe)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Recipe_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(Recipe.class))
+ {
+ case InventoryPackage.RECIPE__COST:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case InventoryPackage.RECIPE__INGREDIENTS:
+ 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(InventoryPackage.Literals.RECIPE__INGREDIENTS,
+ InventoryFactory.eINSTANCE.createIngredient()));
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java
index 865b2a41fa..2fbfbe146d 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java
@@ -1,241 +1,241 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryFactory;
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Restaurant;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Restaurant} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class RestaurantItemProvider 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 RestaurantItemProvider(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);
- addStationsPropertyDescriptor(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_Restaurant_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Restaurant_name_feature", "_UI_Restaurant_type"),
- InventoryPackage.Literals.RESTAURANT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the Stations feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addStationsPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Restaurant_stations_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Restaurant_stations_feature", "_UI_Restaurant_type"),
- InventoryPackage.Literals.RESTAURANT__STATIONS, false, false, false, null, 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(InventoryPackage.Literals.RESTAURANT__DEPARTMENTS);
- childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__MENU_CARDS);
- childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__TABLES);
- }
- 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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns Restaurant.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Restaurant"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Restaurant)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Restaurant_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(Restaurant.class))
- {
- case InventoryPackage.RESTAURANT__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case InventoryPackage.RESTAURANT__DEPARTMENTS:
- case InventoryPackage.RESTAURANT__MENU_CARDS:
- case InventoryPackage.RESTAURANT__TABLES:
- 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(InventoryPackage.Literals.RESTAURANT__DEPARTMENTS,
- InventoryFactory.eINSTANCE.createDepartment()));
-
- newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__MENU_CARDS,
- InventoryFactory.eINSTANCE.createMenuCard()));
-
- newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__TABLES,
- InventoryFactory.eINSTANCE.createTable()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryFactory;
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Restaurant;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Restaurant} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class RestaurantItemProvider 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 RestaurantItemProvider(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);
+ addStationsPropertyDescriptor(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_Restaurant_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Restaurant_name_feature", "_UI_Restaurant_type"),
+ InventoryPackage.Literals.RESTAURANT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Stations feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addStationsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Restaurant_stations_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Restaurant_stations_feature", "_UI_Restaurant_type"),
+ InventoryPackage.Literals.RESTAURANT__STATIONS, false, false, false, null, 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(InventoryPackage.Literals.RESTAURANT__DEPARTMENTS);
+ childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__MENU_CARDS);
+ childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__TABLES);
+ }
+ 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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Restaurant.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Restaurant"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Restaurant)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Restaurant_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(Restaurant.class))
+ {
+ case InventoryPackage.RESTAURANT__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case InventoryPackage.RESTAURANT__DEPARTMENTS:
+ case InventoryPackage.RESTAURANT__MENU_CARDS:
+ case InventoryPackage.RESTAURANT__TABLES:
+ 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(InventoryPackage.Literals.RESTAURANT__DEPARTMENTS,
+ InventoryFactory.eINSTANCE.createDepartment()));
+
+ newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__MENU_CARDS,
+ InventoryFactory.eINSTANCE.createMenuCard()));
+
+ newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__TABLES,
+ InventoryFactory.eINSTANCE.createTable()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java
index 66c8423cb9..264d86f0d3 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java
@@ -1,233 +1,233 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryFactory;
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Section;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Section} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class SectionItemProvider 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 SectionItemProvider(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);
-
- addTitlePropertyDescriptor(object);
- addTextPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addTitlePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Section_title_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Section_title_feature", "_UI_Section_type"),
- InventoryPackage.Literals.SECTION__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Text feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addTextPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Section_text_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Section_text_feature", "_UI_Section_type"),
- InventoryPackage.Literals.SECTION__TEXT, 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(InventoryPackage.Literals.SECTION__OFFERINGS);
- }
- 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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns Section.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Section"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Section)object).getTitle();
- return label == null || label.length() == 0 ? getString("_UI_Section_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(Section.class))
- {
- case InventoryPackage.SECTION__TITLE:
- case InventoryPackage.SECTION__TEXT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case InventoryPackage.SECTION__OFFERINGS:
- 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(InventoryPackage.Literals.SECTION__OFFERINGS,
- InventoryFactory.eINSTANCE.createOffering()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryFactory;
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Section;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Section} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class SectionItemProvider 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 SectionItemProvider(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);
+
+ addTitlePropertyDescriptor(object);
+ addTextPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTitlePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Section_title_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Section_title_feature", "_UI_Section_type"),
+ InventoryPackage.Literals.SECTION__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Text feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTextPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Section_text_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Section_text_feature", "_UI_Section_type"),
+ InventoryPackage.Literals.SECTION__TEXT, 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(InventoryPackage.Literals.SECTION__OFFERINGS);
+ }
+ 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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Section.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Section"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Section)object).getTitle();
+ return label == null || label.length() == 0 ? getString("_UI_Section_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(Section.class))
+ {
+ case InventoryPackage.SECTION__TITLE:
+ case InventoryPackage.SECTION__TEXT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case InventoryPackage.SECTION__OFFERINGS:
+ 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(InventoryPackage.Literals.SECTION__OFFERINGS,
+ InventoryFactory.eINSTANCE.createOffering()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java
index 22e7b12869..0f543901d3 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java
@@ -1,164 +1,164 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Station;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Station} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class StationItemProvider 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 StationItemProvider(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);
-
- addStationIDPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Station ID feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addStationIDPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Station_stationID_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Station_stationID_feature", "_UI_Station_type"),
- InventoryPackage.Literals.STATION__STATION_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Station)object).getStationID();
- return label == null || label.length() == 0 ? getString("_UI_Station_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(Station.class))
- {
- case InventoryPackage.STATION__STATION_ID:
- 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 InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Station;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Station} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class StationItemProvider 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 StationItemProvider(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);
+
+ addStationIDPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Station ID feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addStationIDPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Station_stationID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Station_stationID_feature", "_UI_Station_type"),
+ InventoryPackage.Literals.STATION__STATION_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Station)object).getStationID();
+ return label == null || label.length() == 0 ? getString("_UI_Station_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(Station.class))
+ {
+ case InventoryPackage.STATION__STATION_ID:
+ 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 InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java
index 6b07b0dac7..eb4a1b88ad 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java
@@ -1,216 +1,216 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-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;
-
-import org.gastro.inventory.InventoryFactory;
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Stock;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Stock} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class StockItemProvider 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 StockItemProvider(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_Stock_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Stock_name_feature", "_UI_Stock_type"),
- InventoryPackage.Literals.STOCK__NAME, 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(InventoryPackage.Literals.STOCK__PRODUCTS);
- }
- 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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns Stock.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Stock"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Stock)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Stock_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(Stock.class))
- {
- case InventoryPackage.STOCK__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case InventoryPackage.STOCK__PRODUCTS:
- 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(InventoryPackage.Literals.STOCK__PRODUCTS,
- InventoryFactory.eINSTANCE.createStockProduct()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return InventoryEditPlugin.INSTANCE;
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+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;
+
+import org.gastro.inventory.InventoryFactory;
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Stock;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Stock} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class StockItemProvider 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 StockItemProvider(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_Stock_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Stock_name_feature", "_UI_Stock_type"),
+ InventoryPackage.Literals.STOCK__NAME, 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(InventoryPackage.Literals.STOCK__PRODUCTS);
+ }
+ 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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Stock.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Stock"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Stock)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Stock_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(Stock.class))
+ {
+ case InventoryPackage.STOCK__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case InventoryPackage.STOCK__PRODUCTS:
+ 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(InventoryPackage.Literals.STOCK__PRODUCTS,
+ InventoryFactory.eINSTANCE.createStockProduct()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return InventoryEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java
index 3d9d6b750a..2de8832339 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java
@@ -1,187 +1,187 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-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.ViewerNotification;
-
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.StockProduct;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.StockProduct} object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class StockProductItemProvider extends ProductItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public StockProductItemProvider(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);
-
- addCostPropertyDescriptor(object);
- addAvailablePropertyDescriptor(object);
- addOrderLimitPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Cost feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addCostPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_StockProduct_cost_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_StockProduct_cost_feature", "_UI_StockProduct_type"),
- InventoryPackage.Literals.STOCK_PRODUCT__COST, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the Available feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addAvailablePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_StockProduct_available_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_StockProduct_available_feature", "_UI_StockProduct_type"),
- InventoryPackage.Literals.STOCK_PRODUCT__AVAILABLE, true, false, false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Order Limit feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addOrderLimitPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_StockProduct_orderLimit_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_StockProduct_orderLimit_feature",
- "_UI_StockProduct_type"), InventoryPackage.Literals.STOCK_PRODUCT__ORDER_LIMIT, true, false, false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
- }
-
- /**
- * This returns StockProduct.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/StockProduct"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((StockProduct)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_StockProduct_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(StockProduct.class))
- {
- case InventoryPackage.STOCK_PRODUCT__COST:
- case InventoryPackage.STOCK_PRODUCT__AVAILABLE:
- case InventoryPackage.STOCK_PRODUCT__ORDER_LIMIT:
- 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);
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+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.ViewerNotification;
+
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.StockProduct;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.StockProduct} object. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class StockProductItemProvider extends ProductItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public StockProductItemProvider(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);
+
+ addCostPropertyDescriptor(object);
+ addAvailablePropertyDescriptor(object);
+ addOrderLimitPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Cost feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCostPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_StockProduct_cost_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StockProduct_cost_feature", "_UI_StockProduct_type"),
+ InventoryPackage.Literals.STOCK_PRODUCT__COST, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Available feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addAvailablePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_StockProduct_available_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StockProduct_available_feature", "_UI_StockProduct_type"),
+ InventoryPackage.Literals.STOCK_PRODUCT__AVAILABLE, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Order Limit feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addOrderLimitPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_StockProduct_orderLimit_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StockProduct_orderLimit_feature",
+ "_UI_StockProduct_type"), InventoryPackage.Literals.STOCK_PRODUCT__ORDER_LIMIT, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns StockProduct.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/StockProduct"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((StockProduct)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_StockProduct_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(StockProduct.class))
+ {
+ case InventoryPackage.STOCK_PRODUCT__COST:
+ case InventoryPackage.STOCK_PRODUCT__AVAILABLE:
+ case InventoryPackage.STOCK_PRODUCT__ORDER_LIMIT:
+ 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);
+ }
+
+}
diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java
index 79862d565c..98f807c631 100644
--- a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java
+++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java
@@ -1,151 +1,151 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- *
- * Initial Publication:
- * Eclipse Magazin - http://www.eclipse-magazin.de
- */
-package org.gastro.inventory.provider;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-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.ViewerNotification;
-
-import org.gastro.inventory.InventoryPackage;
-import org.gastro.inventory.Table;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.inventory.Table} object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class TableItemProvider extends StationItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public TableItemProvider(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);
-
- addSeatsPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Seats feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addSeatsPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Table_seats_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Table_seats_feature", "_UI_Table_type"),
- InventoryPackage.Literals.TABLE__SEATS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * This returns Table.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Table"));
- }
-
- /**
- * <!-- 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 NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Table)object).getStationID();
- return label == null || label.length() == 0 ? getString("_UI_Table_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(Table.class))
- {
- case InventoryPackage.TABLE__SEATS:
- 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);
- }
-
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ *
+ * Initial Publication:
+ * Eclipse Magazin - http://www.eclipse-magazin.de
+ */
+package org.gastro.inventory.provider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+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.ViewerNotification;
+
+import org.gastro.inventory.InventoryPackage;
+import org.gastro.inventory.Table;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.gastro.inventory.Table} object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class TableItemProvider extends StationItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TableItemProvider(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);
+
+ addSeatsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Seats feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSeatsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Table_seats_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Table_seats_feature", "_UI_Table_type"),
+ InventoryPackage.Literals.TABLE__SEATS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * This returns Table.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Table"));
+ }
+
+ /**
+ * <!-- 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 NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Table)object).getStationID();
+ return label == null || label.length() == 0 ? getString("_UI_Table_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(Table.class))
+ {
+ case InventoryPackage.TABLE__SEATS:
+ 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);
+ }
+
+}

Back to the top