Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.company.edit')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/.api_filters198
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/copyright.txt14
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.properties162
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.xml56
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java408
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java452
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java184
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java390
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java974
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java290
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java388
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java396
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java494
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.java350
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java338
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java340
17 files changed, 2720 insertions, 2720 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/.api_filters
index b423266243..09179e73bc 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/.api_filters
@@ -1,99 +1,99 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.emf.cdo.examples.company.edit" version="2">
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.AddressableItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.AddressableItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.CategoryItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CategoryItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java" type="org.eclipse.emf.cdo.examples.company.provider.CompanyEditPlugin">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CompanyEditPlugin"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java" type="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProviderAdapterFactory">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProviderAdapterFactory"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.CustomerItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CustomerItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.OrderDetailItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.OrderDetailItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.OrderItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.OrderItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.ProductItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.ProductItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.PurchaseOrderItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.PurchaseOrderItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.SalesOrderItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.SalesOrderItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.SupplierItemProvider">
- <filter id="338755678">
- <message_arguments>
- <message_argument value="org.eclipse.emf.cdo.examples.company.provider.SupplierItemProvider"/>
- <message_argument value="copyright"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.emf.cdo.examples.company.edit" version="2">
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.AddressableItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.AddressableItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.CategoryItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CategoryItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java" type="org.eclipse.emf.cdo.examples.company.provider.CompanyEditPlugin">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CompanyEditPlugin"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java" type="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProviderAdapterFactory">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CompanyItemProviderAdapterFactory"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.CustomerItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.CustomerItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.OrderDetailItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.OrderDetailItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.OrderItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.OrderItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.ProductItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.ProductItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.PurchaseOrderItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.PurchaseOrderItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.SalesOrderItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.SalesOrderItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java" type="org.eclipse.emf.cdo.examples.company.provider.SupplierItemProvider">
+ <filter id="338755678">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.examples.company.provider.SupplierItemProvider"/>
+ <message_argument value="copyright"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/org.eclipse.core.resources.prefs
index d2308f97fe..c2d4a6afbe 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 04 12:55:49 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 04 12:55:49 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/copyright.txt b/plugins/org.eclipse.emf.cdo.examples.company.edit/copyright.txt
index 8f6328980e..0a0f67e6d7 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/copyright.txt
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/copyright.txt
@@ -1,8 +1,8 @@
-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:
+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 \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.properties
index 76014fbfde..5c7950da8a 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.properties
@@ -1,81 +1,81 @@
-# 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
-
-pluginName = CDO Model Repository Examples Company Edit Support
-providerName = Eclipse Modeling Project
-
-_UI_CreateChild_text = {0}
-_UI_CreateChild_text2 = {1} {0}
-_UI_CreateChild_text3 = {1}
-_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
-_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
-_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
-
-_UI_PropertyDescriptor_description = The {0} of the {1}
-
-_UI_Address_type = Address
-_UI_Order_type = Order
-_UI_Supplier_type = Supplier
-_UI_PurchaseOrder_type = Purchase Order
-_UI_OrderDetail_type = Order Detail
-_UI_Product_type = Product
-_UI_Category_type = Category
-_UI_Company_type = Company
-_UI_Customer_type = Customer
-_UI_SalesOrder_type = Sales Order
-_UI_Unknown_type = Object
-
-_UI_Unknown_datatype= Value
-
-_UI_Supplier_name_feature = Name
-_UI_PurchaseOrder_date_feature = Date
-_UI_PurchaseOrder_supplier_feature = Supplier
-_UI_OrderDetail_product_feature = Product
-_UI_OrderDetail_price_feature = Price
-_UI_Product_name_feature = Name
-_UI_Product_orderDetails_feature = Order Details
-_UI_Category_name_feature = Name
-_UI_Category_categories_feature = Categories
-_UI_Category_products_feature = Products
-_UI_Company_categories_feature = Categories
-_UI_Company_suppliers_feature = Suppliers
-_UI_Company_purchaseOrders_feature = Purchase Orders
-_UI_Company_customers_feature = Customers
-_UI_Company_salesOrders_feature = Sales Orders
-_UI_Customer_name_feature = Name
-_UI_Customer_salesOrders_feature = Sales Orders
-_UI_SalesOrder_id_feature = Id
-_UI_SalesOrder_customer_feature = Customer
-_UI_Unknown_feature = Unspecified
-
-_UI_Address_name_feature = Name
-_UI_Address_street_feature = Street
-_UI_Address_city_feature = City
-_UI_Supplier_purchaseOrders_feature = Purchase Orders
-_UI_Order_orderDetails_feature = Order Details
-_UI_OrderDetail_order_feature = Order
-
-_UI_Product_vat_feature = Vat
-_UI_VAT_vat0_literal = vat0
-_UI_VAT_vat7_literal = vat7
-_UI_VAT_vat15_literal = vat15
-_UI_Supplier_preferred_feature = Preferred
-_UI_OrderAddress_type = Order Address
-_UI_OrderAddress_testAttribute_feature = Test Attribute
-
-_UI_Company_name_feature = Name
-_UI_Company_orderDetails_feature = Order Details
-_UI_Company_vat_feature = Vat
-_UI_Company_description_feature = Description
-_UI_Product_description_feature = Description
-_UI_Addressable_type = Addressable
-_UI_Addressable_name_feature = Name
-_UI_Addressable_street_feature = Street
-_UI_Addressable_city_feature = City
-_UI_Product_price_feature = Price
+# 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
+
+pluginName = CDO Model Repository Examples Company Edit Support
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Address_type = Address
+_UI_Order_type = Order
+_UI_Supplier_type = Supplier
+_UI_PurchaseOrder_type = Purchase Order
+_UI_OrderDetail_type = Order Detail
+_UI_Product_type = Product
+_UI_Category_type = Category
+_UI_Company_type = Company
+_UI_Customer_type = Customer
+_UI_SalesOrder_type = Sales Order
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Supplier_name_feature = Name
+_UI_PurchaseOrder_date_feature = Date
+_UI_PurchaseOrder_supplier_feature = Supplier
+_UI_OrderDetail_product_feature = Product
+_UI_OrderDetail_price_feature = Price
+_UI_Product_name_feature = Name
+_UI_Product_orderDetails_feature = Order Details
+_UI_Category_name_feature = Name
+_UI_Category_categories_feature = Categories
+_UI_Category_products_feature = Products
+_UI_Company_categories_feature = Categories
+_UI_Company_suppliers_feature = Suppliers
+_UI_Company_purchaseOrders_feature = Purchase Orders
+_UI_Company_customers_feature = Customers
+_UI_Company_salesOrders_feature = Sales Orders
+_UI_Customer_name_feature = Name
+_UI_Customer_salesOrders_feature = Sales Orders
+_UI_SalesOrder_id_feature = Id
+_UI_SalesOrder_customer_feature = Customer
+_UI_Unknown_feature = Unspecified
+
+_UI_Address_name_feature = Name
+_UI_Address_street_feature = Street
+_UI_Address_city_feature = City
+_UI_Supplier_purchaseOrders_feature = Purchase Orders
+_UI_Order_orderDetails_feature = Order Details
+_UI_OrderDetail_order_feature = Order
+
+_UI_Product_vat_feature = Vat
+_UI_VAT_vat0_literal = vat0
+_UI_VAT_vat7_literal = vat7
+_UI_VAT_vat15_literal = vat15
+_UI_Supplier_preferred_feature = Preferred
+_UI_OrderAddress_type = Order Address
+_UI_OrderAddress_testAttribute_feature = Test Attribute
+
+_UI_Company_name_feature = Name
+_UI_Company_orderDetails_feature = Order Details
+_UI_Company_vat_feature = Vat
+_UI_Company_description_feature = Description
+_UI_Product_description_feature = Description
+_UI_Addressable_type = Addressable
+_UI_Addressable_name_feature = Name
+_UI_Addressable_street_feature = Street
+_UI_Addressable_city_feature = City
+_UI_Product_price_feature = Price
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.xml b/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.xml
index ef1e9705db..bf0e659a81 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.examples.company.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.eclipse.org/emf/CDO/examples/company/1.0.0"
- class = "org.eclipse.emf.cdo.examples.company.provider.CompanyItemProviderAdapterFactory"
- 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.eclipse.org/emf/CDO/examples/company/1.0.0"
+ class = "org.eclipse.emf.cdo.examples.company.provider.CompanyItemProviderAdapterFactory"
+ 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.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java
index 55ad3b62e6..363d2679a0 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/AddressableItemProvider.java
@@ -1,204 +1,204 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
-import org.eclipse.emf.cdo.examples.company.Addressable;
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-
-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.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Addressable} object. <!--
- * begin-user-doc -->
- *
- * @since 4.0<!-- end-user-doc -->
- * @generated
- */
-public class AddressableItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public AddressableItemProvider(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);
- addStreetPropertyDescriptor(object);
- addCityPropertyDescriptor(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_Addressable_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Addressable_name_feature", "_UI_Addressable_type"),
- CompanyPackage.Literals.ADDRESSABLE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the Street feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addStreetPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Addressable_street_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Addressable_street_feature", "_UI_Addressable_type"),
- CompanyPackage.Literals.ADDRESSABLE__STREET, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the City feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addCityPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Addressable_city_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Addressable_city_feature", "_UI_Addressable_type"),
- CompanyPackage.Literals.ADDRESSABLE__CITY, 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
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Addressable)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Addressable_type") : getString("_UI_Addressable_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(Addressable.class))
- {
- case CompanyPackage.ADDRESSABLE__NAME:
- case CompanyPackage.ADDRESSABLE__STREET:
- case CompanyPackage.ADDRESSABLE__CITY:
- 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 ((IChildCreationExtender)adapterFactory).getResourceLocator();
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
+import org.eclipse.emf.cdo.examples.company.Addressable;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+
+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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Addressable} object. <!--
+ * begin-user-doc -->
+ *
+ * @since 4.0<!-- end-user-doc -->
+ * @generated
+ */
+public class AddressableItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AddressableItemProvider(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);
+ addStreetPropertyDescriptor(object);
+ addCityPropertyDescriptor(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_Addressable_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_name_feature", "_UI_Addressable_type"),
+ CompanyPackage.Literals.ADDRESSABLE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Street feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addStreetPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Addressable_street_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_street_feature", "_UI_Addressable_type"),
+ CompanyPackage.Literals.ADDRESSABLE__STREET, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the City feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCityPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Addressable_city_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_city_feature", "_UI_Addressable_type"),
+ CompanyPackage.Literals.ADDRESSABLE__CITY, 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
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Addressable)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Addressable_type") : getString("_UI_Addressable_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(Addressable.class))
+ {
+ case CompanyPackage.ADDRESSABLE__NAME:
+ case CompanyPackage.ADDRESSABLE__STREET:
+ case CompanyPackage.ADDRESSABLE__CITY:
+ 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 ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java
index 629a13c56f..7b1eb64b19 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CategoryItemProvider.java
@@ -1,226 +1,226 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
-import org.eclipse.emf.cdo.examples.company.Category;
-import org.eclipse.emf.cdo.examples.company.CompanyFactory;
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-
-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.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Category} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class CategoryItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public CategoryItemProvider(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_Category_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Category_name_feature", "_UI_Category_type"),
- CompanyPackage.Literals.CATEGORY__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(CompanyPackage.Literals.CATEGORY__CATEGORIES);
- childrenFeatures.add(CompanyPackage.Literals.CATEGORY__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 Category.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Category"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Category)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Category_type") : getString("_UI_Category_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(Category.class))
- {
- case CompanyPackage.CATEGORY__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case CompanyPackage.CATEGORY__CATEGORIES:
- case CompanyPackage.CATEGORY__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(CompanyPackage.Literals.CATEGORY__CATEGORIES,
- CompanyFactory.eINSTANCE.createCategory()));
-
- newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.CATEGORY__PRODUCTS,
- CompanyFactory.eINSTANCE.createProduct()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
+import org.eclipse.emf.cdo.examples.company.Category;
+import org.eclipse.emf.cdo.examples.company.CompanyFactory;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+
+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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Category} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CategoryItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CategoryItemProvider(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_Category_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Category_name_feature", "_UI_Category_type"),
+ CompanyPackage.Literals.CATEGORY__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(CompanyPackage.Literals.CATEGORY__CATEGORIES);
+ childrenFeatures.add(CompanyPackage.Literals.CATEGORY__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 Category.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Category"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Category)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Category_type") : getString("_UI_Category_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(Category.class))
+ {
+ case CompanyPackage.CATEGORY__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case CompanyPackage.CATEGORY__CATEGORIES:
+ case CompanyPackage.CATEGORY__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(CompanyPackage.Literals.CATEGORY__CATEGORIES,
+ CompanyFactory.eINSTANCE.createCategory()));
+
+ newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.CATEGORY__PRODUCTS,
+ CompanyFactory.eINSTANCE.createProduct()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java
index 20d07973b2..18e3eb6d81 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyEditPlugin.java
@@ -1,92 +1,92 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the Company edit plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public final class CompanyEditPlugin extends EMFPlugin
-{
- /**
- * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final CompanyEditPlugin INSTANCE = new CompanyEditPlugin();
-
- /**
- * 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 CompanyEditPlugin()
- {
- 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Company edit plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class CompanyEditPlugin extends EMFPlugin
+{
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final CompanyEditPlugin INSTANCE = new CompanyEditPlugin();
+
+ /**
+ * 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 CompanyEditPlugin()
+ {
+ 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.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java
index 23a4c0f7f9..055c14e0bd 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProvider.java
@@ -1,195 +1,195 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.examples.company.Company;
-import org.eclipse.emf.cdo.examples.company.CompanyFactory;
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-
-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.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Company} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class CompanyItemProvider extends AddressableItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public CompanyItemProvider(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(CompanyPackage.Literals.COMPANY__CATEGORIES);
- childrenFeatures.add(CompanyPackage.Literals.COMPANY__SUPPLIERS);
- childrenFeatures.add(CompanyPackage.Literals.COMPANY__CUSTOMERS);
- childrenFeatures.add(CompanyPackage.Literals.COMPANY__PURCHASE_ORDERS);
- childrenFeatures.add(CompanyPackage.Literals.COMPANY__SALES_ORDERS);
- }
- 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 Company.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Company"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Company)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Company_type") : getString("_UI_Company_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(Company.class))
- {
- case CompanyPackage.COMPANY__CATEGORIES:
- case CompanyPackage.COMPANY__SUPPLIERS:
- case CompanyPackage.COMPANY__CUSTOMERS:
- case CompanyPackage.COMPANY__PURCHASE_ORDERS:
- case CompanyPackage.COMPANY__SALES_ORDERS:
- 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(CompanyPackage.Literals.COMPANY__CATEGORIES,
- CompanyFactory.eINSTANCE.createCategory()));
-
- newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__SUPPLIERS,
- CompanyFactory.eINSTANCE.createSupplier()));
-
- newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__CUSTOMERS,
- CompanyFactory.eINSTANCE.createCustomer()));
-
- newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__PURCHASE_ORDERS,
- CompanyFactory.eINSTANCE.createPurchaseOrder()));
-
- newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__SALES_ORDERS,
- CompanyFactory.eINSTANCE.createSalesOrder()));
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.examples.company.Company;
+import org.eclipse.emf.cdo.examples.company.CompanyFactory;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+
+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.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Company} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CompanyItemProvider extends AddressableItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CompanyItemProvider(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(CompanyPackage.Literals.COMPANY__CATEGORIES);
+ childrenFeatures.add(CompanyPackage.Literals.COMPANY__SUPPLIERS);
+ childrenFeatures.add(CompanyPackage.Literals.COMPANY__CUSTOMERS);
+ childrenFeatures.add(CompanyPackage.Literals.COMPANY__PURCHASE_ORDERS);
+ childrenFeatures.add(CompanyPackage.Literals.COMPANY__SALES_ORDERS);
+ }
+ 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 Company.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Company"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Company)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Company_type") : getString("_UI_Company_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(Company.class))
+ {
+ case CompanyPackage.COMPANY__CATEGORIES:
+ case CompanyPackage.COMPANY__SUPPLIERS:
+ case CompanyPackage.COMPANY__CUSTOMERS:
+ case CompanyPackage.COMPANY__PURCHASE_ORDERS:
+ case CompanyPackage.COMPANY__SALES_ORDERS:
+ 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(CompanyPackage.Literals.COMPANY__CATEGORIES,
+ CompanyFactory.eINSTANCE.createCategory()));
+
+ newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__SUPPLIERS,
+ CompanyFactory.eINSTANCE.createSupplier()));
+
+ newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__CUSTOMERS,
+ CompanyFactory.eINSTANCE.createCustomer()));
+
+ newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__PURCHASE_ORDERS,
+ CompanyFactory.eINSTANCE.createPurchaseOrder()));
+
+ newChildDescriptors.add(createChildParameter(CompanyPackage.Literals.COMPANY__SALES_ORDERS,
+ CompanyFactory.eINSTANCE.createSalesOrder()));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java
index ee8be91789..67199c8ed2 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CompanyItemProviderAdapterFactory.java
@@ -1,487 +1,487 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.util.CompanyAdapterFactory;
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
-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.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * 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 CompanyItemProviderAdapterFactory extends CompanyAdapterFactory implements ComposeableAdapterFactory,
- IChangeNotifier, IDisposable, IChildCreationExtender
-{
- /**
- * 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 helps manage the child creation extenders. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(
- CompanyEditPlugin.INSTANCE, CompanyPackage.eNS_URI);
-
- /**
- * 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 CompanyItemProviderAdapterFactory()
- {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(ITableItemLabelProvider.class);
- supportedTypes.add(ITableItemColorProvider.class);
- supportedTypes.add(ITableItemFontProvider.class);
- supportedTypes.add(IItemColorProvider.class);
- supportedTypes.add(IItemFontProvider.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Supplier} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected SupplierItemProvider supplierItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Supplier}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createSupplierAdapter()
- {
- if (supplierItemProvider == null)
- {
- supplierItemProvider = new SupplierItemProvider(this);
- }
-
- return supplierItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}
- * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected PurchaseOrderItemProvider purchaseOrderItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createPurchaseOrderAdapter()
- {
- if (purchaseOrderItemProvider == null)
- {
- purchaseOrderItemProvider = new PurchaseOrderItemProvider(this);
- }
-
- return purchaseOrderItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.OrderDetail}
- * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected OrderDetailItemProvider orderDetailItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.OrderDetail}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createOrderDetailAdapter()
- {
- if (orderDetailItemProvider == null)
- {
- orderDetailItemProvider = new OrderDetailItemProvider(this);
- }
-
- return orderDetailItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Category} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CategoryItemProvider categoryItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Category}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCategoryAdapter()
- {
- if (categoryItemProvider == null)
- {
- categoryItemProvider = new CategoryItemProvider(this);
- }
-
- return categoryItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Product} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected ProductItemProvider productItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Product}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createProductAdapter()
- {
- if (productItemProvider == null)
- {
- productItemProvider = new ProductItemProvider(this);
- }
-
- return productItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Company} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CompanyItemProvider companyItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Company}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCompanyAdapter()
- {
- if (companyItemProvider == null)
- {
- companyItemProvider = new CompanyItemProvider(this);
- }
-
- return companyItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Customer} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CustomerItemProvider customerItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Customer}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCustomerAdapter()
- {
- if (customerItemProvider == null)
- {
- customerItemProvider = new CustomerItemProvider(this);
- }
-
- return customerItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Order} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected OrderItemProvider orderItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Order}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createOrderAdapter()
- {
- if (orderItemProvider == null)
- {
- orderItemProvider = new OrderItemProvider(this);
- }
-
- return orderItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.SalesOrder} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected SalesOrderItemProvider salesOrderItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.SalesOrder}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createSalesOrderAdapter()
- {
- if (salesOrderItemProvider == null)
- {
- salesOrderItemProvider = new SalesOrderItemProvider(this);
- }
-
- return salesOrderItemProvider;
- }
-
- /**
- * 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;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public List<IChildCreationExtender> getChildCreationExtenders()
- {
- return childCreationExtenderManager.getChildCreationExtenders();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain)
- {
- return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator()
- {
- return childCreationExtenderManager;
- }
-
- /**
- * 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 (companyItemProvider != null)
- companyItemProvider.dispose();
- if (supplierItemProvider != null)
- supplierItemProvider.dispose();
- if (customerItemProvider != null)
- customerItemProvider.dispose();
- if (orderItemProvider != null)
- orderItemProvider.dispose();
- if (orderDetailItemProvider != null)
- orderDetailItemProvider.dispose();
- if (purchaseOrderItemProvider != null)
- purchaseOrderItemProvider.dispose();
- if (salesOrderItemProvider != null)
- salesOrderItemProvider.dispose();
- if (categoryItemProvider != null)
- categoryItemProvider.dispose();
- if (productItemProvider != null)
- productItemProvider.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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.util.CompanyAdapterFactory;
+
+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.common.util.ResourceLocator;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 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 CompanyItemProviderAdapterFactory extends CompanyAdapterFactory implements ComposeableAdapterFactory,
+ IChangeNotifier, IDisposable, IChildCreationExtender
+{
+ /**
+ * 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 helps manage the child creation extenders. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(
+ CompanyEditPlugin.INSTANCE, CompanyPackage.eNS_URI);
+
+ /**
+ * 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 CompanyItemProviderAdapterFactory()
+ {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Supplier} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SupplierItemProvider supplierItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Supplier}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSupplierAdapter()
+ {
+ if (supplierItemProvider == null)
+ {
+ supplierItemProvider = new SupplierItemProvider(this);
+ }
+
+ return supplierItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PurchaseOrderItemProvider purchaseOrderItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createPurchaseOrderAdapter()
+ {
+ if (purchaseOrderItemProvider == null)
+ {
+ purchaseOrderItemProvider = new PurchaseOrderItemProvider(this);
+ }
+
+ return purchaseOrderItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.OrderDetail}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OrderDetailItemProvider orderDetailItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.OrderDetail}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createOrderDetailAdapter()
+ {
+ if (orderDetailItemProvider == null)
+ {
+ orderDetailItemProvider = new OrderDetailItemProvider(this);
+ }
+
+ return orderDetailItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Category} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CategoryItemProvider categoryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Category}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCategoryAdapter()
+ {
+ if (categoryItemProvider == null)
+ {
+ categoryItemProvider = new CategoryItemProvider(this);
+ }
+
+ return categoryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Product} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProductItemProvider productItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Product}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createProductAdapter()
+ {
+ if (productItemProvider == null)
+ {
+ productItemProvider = new ProductItemProvider(this);
+ }
+
+ return productItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Company} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CompanyItemProvider companyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Company}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCompanyAdapter()
+ {
+ if (companyItemProvider == null)
+ {
+ companyItemProvider = new CompanyItemProvider(this);
+ }
+
+ return companyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Customer} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CustomerItemProvider customerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Customer}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCustomerAdapter()
+ {
+ if (customerItemProvider == null)
+ {
+ customerItemProvider = new CustomerItemProvider(this);
+ }
+
+ return customerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.Order} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OrderItemProvider orderItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.Order}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createOrderAdapter()
+ {
+ if (orderItemProvider == null)
+ {
+ orderItemProvider = new OrderItemProvider(this);
+ }
+
+ return orderItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.examples.company.SalesOrder} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SalesOrderItemProvider salesOrderItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.examples.company.SalesOrder}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSalesOrderAdapter()
+ {
+ if (salesOrderItemProvider == null)
+ {
+ salesOrderItemProvider = new SalesOrderItemProvider(this);
+ }
+
+ return salesOrderItemProvider;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders()
+ {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain)
+ {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ResourceLocator getResourceLocator()
+ {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * 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 (companyItemProvider != null)
+ companyItemProvider.dispose();
+ if (supplierItemProvider != null)
+ supplierItemProvider.dispose();
+ if (customerItemProvider != null)
+ customerItemProvider.dispose();
+ if (orderItemProvider != null)
+ orderItemProvider.dispose();
+ if (orderDetailItemProvider != null)
+ orderDetailItemProvider.dispose();
+ if (purchaseOrderItemProvider != null)
+ purchaseOrderItemProvider.dispose();
+ if (salesOrderItemProvider != null)
+ salesOrderItemProvider.dispose();
+ if (categoryItemProvider != null)
+ categoryItemProvider.dispose();
+ if (productItemProvider != null)
+ productItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java
index d2b27f4686..5caeaa4a3e 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/CustomerItemProvider.java
@@ -1,145 +1,145 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.Customer;
-
-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.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Customer} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class CustomerItemProvider extends AddressableItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public CustomerItemProvider(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);
-
- addSalesOrdersPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Sales Orders feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addSalesOrdersPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Customer_salesOrders_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Customer_salesOrders_feature", "_UI_Customer_type"),
- CompanyPackage.Literals.CUSTOMER__SALES_ORDERS, true, false, true, null, null, null));
- }
-
- /**
- * This returns Customer.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Customer"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Customer)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Customer_type") : getString("_UI_Customer_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);
- 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.Customer;
+
+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.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Customer} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CustomerItemProvider extends AddressableItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CustomerItemProvider(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);
+
+ addSalesOrdersPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Sales Orders feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSalesOrdersPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Customer_salesOrders_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Customer_salesOrders_feature", "_UI_Customer_type"),
+ CompanyPackage.Literals.CUSTOMER__SALES_ORDERS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Customer.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Customer"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Customer)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Customer_type") : getString("_UI_Customer_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);
+ 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.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java
index 1dc69785ba..05c0020767 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderDetailItemProvider.java
@@ -1,194 +1,194 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.OrderDetail;
-
-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.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.OrderDetail} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class OrderDetailItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public OrderDetailItemProvider(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);
- 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_OrderDetail_product_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_OrderDetail_product_feature", "_UI_OrderDetail_type"),
- CompanyPackage.Literals.ORDER_DETAIL__PRODUCT, true, false, true, null, 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_OrderDetail_price_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_OrderDetail_price_feature", "_UI_OrderDetail_type"),
- CompanyPackage.Literals.ORDER_DETAIL__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 OrderDetail.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/OrderDetail"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- OrderDetail orderDetail = (OrderDetail)object;
- return getString("_UI_OrderDetail_type") + " " + orderDetail.getPrice();
- }
-
- /**
- * 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(OrderDetail.class))
- {
- case CompanyPackage.ORDER_DETAIL__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 ((IChildCreationExtender)adapterFactory).getResourceLocator();
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.OrderDetail;
+
+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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.OrderDetail} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class OrderDetailItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OrderDetailItemProvider(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);
+ 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_OrderDetail_product_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OrderDetail_product_feature", "_UI_OrderDetail_type"),
+ CompanyPackage.Literals.ORDER_DETAIL__PRODUCT, true, false, true, null, 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_OrderDetail_price_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OrderDetail_price_feature", "_UI_OrderDetail_type"),
+ CompanyPackage.Literals.ORDER_DETAIL__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 OrderDetail.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/OrderDetail"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ OrderDetail orderDetail = (OrderDetail)object;
+ return getString("_UI_OrderDetail_type") + " " + orderDetail.getPrice();
+ }
+
+ /**
+ * 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(OrderDetail.class))
+ {
+ case CompanyPackage.ORDER_DETAIL__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 ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java
index 494db4795e..414b047e8c 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/OrderItemProvider.java
@@ -1,198 +1,198 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
-import org.eclipse.emf.cdo.examples.company.CompanyFactory;
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.Order;
-
-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.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Order} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class OrderItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public OrderItemProvider(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(CompanyPackage.Literals.ORDER__ORDER_DETAILS);
- }
- 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 Order.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Order"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- return getString("_UI_Order_type");
- }
-
- /**
- * 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(Order.class))
- {
- case CompanyPackage.ORDER__ORDER_DETAILS:
- 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(CompanyPackage.Literals.ORDER__ORDER_DETAILS,
- CompanyFactory.eINSTANCE.createOrderDetail()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
+import org.eclipse.emf.cdo.examples.company.CompanyFactory;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.Order;
+
+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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Order} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class OrderItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OrderItemProvider(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(CompanyPackage.Literals.ORDER__ORDER_DETAILS);
+ }
+ 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 Order.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Order"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ return getString("_UI_Order_type");
+ }
+
+ /**
+ * 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(Order.class))
+ {
+ case CompanyPackage.ORDER__ORDER_DETAILS:
+ 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(CompanyPackage.Literals.ORDER__ORDER_DETAILS,
+ CompanyFactory.eINSTANCE.createOrderDetail()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java
index ac65560a84..cef78613b9 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/ProductItemProvider.java
@@ -1,247 +1,247 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.Product;
-
-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.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Company} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class ProductItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * 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);
- addOrderDetailsPropertyDescriptor(object);
- addVatPropertyDescriptor(object);
- addDescriptionPropertyDescriptor(object);
- addPricePropertyDescriptor(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"),
- CompanyPackage.Literals.PRODUCT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Order Details feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addOrderDetailsPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Product_orderDetails_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Product_orderDetails_feature", "_UI_Product_type"),
- CompanyPackage.Literals.PRODUCT__ORDER_DETAILS, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Vat feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addVatPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Product_vat_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Product_vat_feature", "_UI_Product_type"),
- CompanyPackage.Literals.PRODUCT__VAT, 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_Product_description_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Product_description_feature", "_UI_Product_type"),
- CompanyPackage.Literals.PRODUCT__DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the Price feature. <!-- begin-user-doc -->
- *
- * @since 4.0<!-- end-user-doc -->
- * @generated
- */
- protected void addPricePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(), getString("_UI_Product_price_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Product_price_feature", "_UI_Product_type"),
- CompanyPackage.Literals.PRODUCT__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 Product.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Product"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Product)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Product_type") : 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 CompanyPackage.PRODUCT__NAME:
- case CompanyPackage.PRODUCT__VAT:
- case CompanyPackage.PRODUCT__DESCRIPTION:
- case CompanyPackage.PRODUCT__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 ((IChildCreationExtender)adapterFactory).getResourceLocator();
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.edit.CDOItemProviderAdapter;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.Product;
+
+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.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Company} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ProductItemProvider extends CDOItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * 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);
+ addOrderDetailsPropertyDescriptor(object);
+ addVatPropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ addPricePropertyDescriptor(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"),
+ CompanyPackage.Literals.PRODUCT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Order Details feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addOrderDetailsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Product_orderDetails_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Product_orderDetails_feature", "_UI_Product_type"),
+ CompanyPackage.Literals.PRODUCT__ORDER_DETAILS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Vat feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addVatPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Product_vat_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Product_vat_feature", "_UI_Product_type"),
+ CompanyPackage.Literals.PRODUCT__VAT, 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_Product_description_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Product_description_feature", "_UI_Product_type"),
+ CompanyPackage.Literals.PRODUCT__DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Price feature. <!-- begin-user-doc -->
+ *
+ * @since 4.0<!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPricePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(), getString("_UI_Product_price_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Product_price_feature", "_UI_Product_type"),
+ CompanyPackage.Literals.PRODUCT__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 Product.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Product"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Product)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Product_type") : 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 CompanyPackage.PRODUCT__NAME:
+ case CompanyPackage.PRODUCT__VAT:
+ case CompanyPackage.PRODUCT__DESCRIPTION:
+ case CompanyPackage.PRODUCT__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 ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.java
index 38d331d6df..27ff2c4fbb 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/PurchaseOrderItemProvider.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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.PurchaseOrder;
-
-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.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class PurchaseOrderItemProvider extends OrderItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public PurchaseOrderItemProvider(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);
-
- addDatePropertyDescriptor(object);
- addSupplierPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Date feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addDatePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_PurchaseOrder_date_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PurchaseOrder_date_feature", "_UI_PurchaseOrder_type"),
- CompanyPackage.Literals.PURCHASE_ORDER__DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the Supplier feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addSupplierPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PurchaseOrder_supplier_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PurchaseOrder_supplier_feature",
- "_UI_PurchaseOrder_type"), CompanyPackage.Literals.PURCHASE_ORDER__SUPPLIER, true, false, true, null,
- null, null));
- }
-
- /**
- * This returns PurchaseOrder.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/PurchaseOrder"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- Date labelValue = ((PurchaseOrder)object).getDate();
- String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ? getString("_UI_PurchaseOrder_type")
- : getString("_UI_PurchaseOrder_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(PurchaseOrder.class))
- {
- case CompanyPackage.PURCHASE_ORDER__DATE:
- 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.PurchaseOrder;
+
+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.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PurchaseOrderItemProvider extends OrderItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PurchaseOrderItemProvider(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);
+
+ addDatePropertyDescriptor(object);
+ addSupplierPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Date feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDatePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_PurchaseOrder_date_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PurchaseOrder_date_feature", "_UI_PurchaseOrder_type"),
+ CompanyPackage.Literals.PURCHASE_ORDER__DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Supplier feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSupplierPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PurchaseOrder_supplier_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PurchaseOrder_supplier_feature",
+ "_UI_PurchaseOrder_type"), CompanyPackage.Literals.PURCHASE_ORDER__SUPPLIER, true, false, true, null,
+ null, null));
+ }
+
+ /**
+ * This returns PurchaseOrder.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PurchaseOrder"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ Date labelValue = ((PurchaseOrder)object).getDate();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_PurchaseOrder_type")
+ : getString("_UI_PurchaseOrder_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(PurchaseOrder.class))
+ {
+ case CompanyPackage.PURCHASE_ORDER__DATE:
+ 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.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java
index 99180f685c..fa43f961e5 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SalesOrderItemProvider.java
@@ -1,169 +1,169 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.SalesOrder;
-
-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.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.SalesOrder} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class SalesOrderItemProvider extends OrderItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public SalesOrderItemProvider(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);
-
- addIdPropertyDescriptor(object);
- addCustomerPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Id feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addIdPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_SalesOrder_id_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_SalesOrder_id_feature", "_UI_SalesOrder_type"),
- CompanyPackage.Literals.SALES_ORDER__ID, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Customer feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addCustomerPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_SalesOrder_customer_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_SalesOrder_customer_feature", "_UI_SalesOrder_type"),
- CompanyPackage.Literals.SALES_ORDER__CUSTOMER, true, false, true, null, null, null));
- }
-
- /**
- * This returns SalesOrder.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/SalesOrder"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- SalesOrder salesOrder = (SalesOrder)object;
- return getString("_UI_SalesOrder_type") + " " + salesOrder.getId();
- }
-
- /**
- * 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(SalesOrder.class))
- {
- case CompanyPackage.SALES_ORDER__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);
- }
-
-}
+/*
+ * 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.SalesOrder;
+
+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.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.SalesOrder} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class SalesOrderItemProvider extends OrderItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SalesOrderItemProvider(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);
+
+ addIdPropertyDescriptor(object);
+ addCustomerPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_SalesOrder_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_SalesOrder_id_feature", "_UI_SalesOrder_type"),
+ CompanyPackage.Literals.SALES_ORDER__ID, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Customer feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCustomerPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_SalesOrder_customer_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_SalesOrder_customer_feature", "_UI_SalesOrder_type"),
+ CompanyPackage.Literals.SALES_ORDER__CUSTOMER, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns SalesOrder.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/SalesOrder"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ SalesOrder salesOrder = (SalesOrder)object;
+ return getString("_UI_SalesOrder_type") + " " + salesOrder.getId();
+ }
+
+ /**
+ * 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(SalesOrder.class))
+ {
+ case CompanyPackage.SALES_ORDER__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);
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java
index eb1a32cb81..684d5007b3 100644
--- a/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.examples.company.edit/src/org/eclipse/emf/cdo/examples/company/provider/SupplierItemProvider.java
@@ -1,170 +1,170 @@
-/*
- * 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
- */
-package org.eclipse.emf.cdo.examples.company.provider;
-
-import org.eclipse.emf.cdo.examples.company.CompanyPackage;
-import org.eclipse.emf.cdo.examples.company.Supplier;
-
-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.IItemColorProvider;
-import org.eclipse.emf.edit.provider.IItemFontProvider;
-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.ITableItemColorProvider;
-import org.eclipse.emf.edit.provider.ITableItemFontProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Supplier} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class SupplierItemProvider extends AddressableItemProvider implements IEditingDomainItemProvider,
- IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
- ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
-{
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public SupplierItemProvider(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);
-
- addPurchaseOrdersPropertyDescriptor(object);
- addPreferredPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Purchase Orders feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addPurchaseOrdersPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Supplier_purchaseOrders_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Supplier_purchaseOrders_feature", "_UI_Supplier_type"),
- CompanyPackage.Literals.SUPPLIER__PURCHASE_ORDERS, true, false, true, null, null, null));
- }
-
- /**
- * This adds a property descriptor for the Preferred feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addPreferredPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Supplier_preferred_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Supplier_preferred_feature", "_UI_Supplier_type"),
- CompanyPackage.Literals.SUPPLIER__PREFERRED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This returns Supplier.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Supplier"));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected boolean shouldComposeCreationImage()
- {
- return true;
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Supplier)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_Supplier_type") : getString("_UI_Supplier_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(Supplier.class))
- {
- case CompanyPackage.SUPPLIER__PREFERRED:
- 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
+ */
+package org.eclipse.emf.cdo.examples.company.provider;
+
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.Supplier;
+
+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.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+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.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.examples.company.Supplier} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class SupplierItemProvider extends AddressableItemProvider implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SupplierItemProvider(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);
+
+ addPurchaseOrdersPropertyDescriptor(object);
+ addPreferredPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Purchase Orders feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPurchaseOrdersPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Supplier_purchaseOrders_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Supplier_purchaseOrders_feature", "_UI_Supplier_type"),
+ CompanyPackage.Literals.SUPPLIER__PURCHASE_ORDERS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Preferred feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPreferredPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Supplier_preferred_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Supplier_preferred_feature", "_UI_Supplier_type"),
+ CompanyPackage.Literals.SUPPLIER__PREFERRED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This returns Supplier.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Supplier"));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Supplier)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Supplier_type") : getString("_UI_Supplier_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(Supplier.class))
+ {
+ case CompanyPackage.SUPPLIER__PREFERRED:
+ 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