diff options
author | Eike Stepper | 2012-07-19 08:22:04 +0000 |
---|---|---|
committer | Eike Stepper | 2012-07-19 08:22:04 +0000 |
commit | 1460904fd3c193ffaf809913b2983a400fce9d94 (patch) | |
tree | 72f3a17b75fedba3ae1060df1d32c9c7889be954 /plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java | |
parent | 5f360965ae87478e0681899bf310a210cafc2c44 (diff) | |
download | cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.gz cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.xz cdo-1460904fd3c193ffaf809913b2983a400fce9d94.zip |
Fix line endings in master (dos2unix)
Diffstat (limited to 'plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java')
-rw-r--r-- | plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java | 440 |
1 files changed, 220 insertions, 220 deletions
diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java index 5938b126ca..948a694cce 100644 --- a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java @@ -1,220 +1,220 @@ -/*
- * 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.business.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.business.BusinessPackage;
-import org.gastro.business.Waiter;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.gastro.business.Waiter} object.
- * <!-- begin-user-doc --> <!--
- * end-user-doc -->
- * @generated
- */
-public class WaiterItemProvider 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 WaiterItemProvider(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);
-
- addTablesPropertyDescriptor(object);
- addEmployeePropertyDescriptor(object);
- addFromPropertyDescriptor(object);
- addUntilPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Tables feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected void addTablesPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Waiter_tables_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Waiter_tables_feature", "_UI_Waiter_type"),
- BusinessPackage.Literals.WAITER__TABLES, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Employee feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected void addEmployeePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Waiter_employee_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Waiter_employee_feature", "_UI_Waiter_type"),
- BusinessPackage.Literals.WAITER__EMPLOYEE, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the From feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected void addFromPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Waiter_from_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Waiter_from_feature", "_UI_Waiter_type"),
- BusinessPackage.Literals.WAITER__FROM, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Until feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- protected void addUntilPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Waiter_until_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Waiter_until_feature", "_UI_Waiter_type"),
- BusinessPackage.Literals.WAITER__UNTIL, 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 Waiter.gif.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Waiter"));
- }
-
- /**
- * <!-- 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)
- {
- Waiter waiter = (Waiter)object;
- return waiter.getEmployee() == null ? getString("_UI_Waiter_type") : waiter.getEmployee().getName();
- }
-
- /**
- * 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(Waiter.class))
- {
- case BusinessPackage.WAITER__FROM:
- case BusinessPackage.WAITER__UNTIL:
- 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 BusinessEditPlugin.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.business.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.business.BusinessPackage; +import org.gastro.business.Waiter; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.business.Waiter} object. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @generated + */ +public class WaiterItemProvider 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 WaiterItemProvider(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); + + addTablesPropertyDescriptor(object); + addEmployeePropertyDescriptor(object); + addFromPropertyDescriptor(object); + addUntilPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Tables feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addTablesPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_Waiter_tables_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Waiter_tables_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__TABLES, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Employee feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addEmployeePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_Waiter_employee_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Waiter_employee_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__EMPLOYEE, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the From feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addFromPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_Waiter_from_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Waiter_from_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__FROM, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * This adds a property descriptor for the Until feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + protected void addUntilPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_Waiter_until_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Waiter_until_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__UNTIL, 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 Waiter.gif. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Waiter")); + } + + /** + * <!-- 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) + { + Waiter waiter = (Waiter)object; + return waiter.getEmployee() == null ? getString("_UI_Waiter_type") : waiter.getEmployee().getName(); + } + + /** + * 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(Waiter.class)) + { + case BusinessPackage.WAITER__FROM: + case BusinessPackage.WAITER__UNTIL: + 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 BusinessEditPlugin.INSTANCE; + } + +} |