Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-07-19 08:22:04 +0000
committerEike Stepper2012-07-19 08:22:04 +0000
commit1460904fd3c193ffaf809913b2983a400fce9d94 (patch)
tree72f3a17b75fedba3ae1060df1d32c9c7889be954 /plugins/org.eclipse.emf.cdo.edit
parent5f360965ae87478e0681899bf310a210cafc2c44 (diff)
downloadcdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.gz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.xz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.zip
Fix line endings in master (dos2unix)
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.edit')
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.jdt.launching.prefs6
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/copyright.txt14
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/plugin.properties124
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/plugin.xml56
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java188
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOItemProviderAdapter.java1988
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/package-info.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java298
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java370
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java556
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java366
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java710
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/package-info.java36
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.java408
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java546
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java354
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/package-info.java36
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/Messages.java82
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/messages.properties88
20 files changed, 3132 insertions, 3132 deletions
diff --git a/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.core.resources.prefs
index cbf70eefef..fab51d3bb3 100644
--- a/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 04 12:54:50 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 04 12:54:50 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.jdt.launching.prefs b/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.jdt.launching.prefs
index 4658ec1435..556ed07a3c 100644
--- a/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.jdt.launching.prefs
+++ b/plugins/org.eclipse.emf.cdo.edit/.settings/org.eclipse.jdt.launching.prefs
@@ -1,3 +1,3 @@
-#Fri Sep 02 05:38:34 CEST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore
+#Fri Sep 02 05:38:34 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore
diff --git a/plugins/org.eclipse.emf.cdo.edit/copyright.txt b/plugins/org.eclipse.emf.cdo.edit/copyright.txt
index 8f6328980e..0a0f67e6d7 100644
--- a/plugins/org.eclipse.emf.cdo.edit/copyright.txt
+++ b/plugins/org.eclipse.emf.cdo.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.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
index 6b2a4a3a4b..d7cee7f0c2 100644
--- a/plugins/org.eclipse.emf.cdo.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
@@ -1,62 +1,62 @@
-# 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 Client 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_CDOResource_type = CDO Resource
-_UI_Unknown_type = Object
-
-_UI_Unknown_datatype= Value
-
-_UI_CDOResource_resourceSet_feature = Resource Set
-_UI_CDOResource_uRI_feature = URI
-_UI_CDOResource_contents_feature = Contents
-_UI_CDOResource_modified_feature = Modified
-_UI_CDOResource_loaded_feature = Loaded
-_UI_CDOResource_trackingModification_feature = Tracking Modification
-_UI_CDOResource_errors_feature = Errors
-_UI_CDOResource_warnings_feature = Warnings
-_UI_CDOResource_path_feature = Path
-_UI_Unknown_feature = Unspecified
-_UI_CDOResource_timeStamp_feature = Time Stamp
-_UI_CDOResourceNode_type = CDO Resource Node
-_UI_CDOResourceFolder_type = CDO Resource Folder
-_UI_CDOResourceNode_folder_feature = Folder
-_UI_CDOResourceNode_name_feature = Name
-_UI_CDOResourceNode_path_feature = Path
-_UI_CDOResourceFolder_contents_feature = Contents
-_UI_CDOResourceFolder_nodes_feature = Nodes
-_UI_ModelElement_type = Model Element
-_UI_Annotation_type = Annotation
-_UI_ModelElement_annotations_feature = Annotations
-_UI_Annotation_source_feature = Source
-_UI_Annotation_details_feature = Details
-_UI_Annotation_modelElement_feature = Model Element
-_UI_Annotation_contents_feature = Contents
-_UI_Annotation_references_feature = References
-_UI_Annotation_source_description = An identifier, typically an absolute URI, that uniquely identifies this kind of annotation
-_UI_Annotation_references_description = Objects referenced by this annotation
-_UI_CDOResourceLeaf_type = CDO Resource Leaf
-_UI_CDOFileResource_type = CDO File Resource
-_UI_CDOBinaryResource_type = CDO Binary Resource
-_UI_CDOTextResouurce_type = CDO Text Resouurce
-_UI_CDOBinaryResource_contents_feature = Contents
-_UI_CDOTextResouurce_contents_feature = Contents
-_UI_CDOTextResource_type = CDO Text Resource
-_UI_CDOTextResource_contents_feature = Contents
+# 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 Client 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_CDOResource_type = CDO Resource
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_CDOResource_resourceSet_feature = Resource Set
+_UI_CDOResource_uRI_feature = URI
+_UI_CDOResource_contents_feature = Contents
+_UI_CDOResource_modified_feature = Modified
+_UI_CDOResource_loaded_feature = Loaded
+_UI_CDOResource_trackingModification_feature = Tracking Modification
+_UI_CDOResource_errors_feature = Errors
+_UI_CDOResource_warnings_feature = Warnings
+_UI_CDOResource_path_feature = Path
+_UI_Unknown_feature = Unspecified
+_UI_CDOResource_timeStamp_feature = Time Stamp
+_UI_CDOResourceNode_type = CDO Resource Node
+_UI_CDOResourceFolder_type = CDO Resource Folder
+_UI_CDOResourceNode_folder_feature = Folder
+_UI_CDOResourceNode_name_feature = Name
+_UI_CDOResourceNode_path_feature = Path
+_UI_CDOResourceFolder_contents_feature = Contents
+_UI_CDOResourceFolder_nodes_feature = Nodes
+_UI_ModelElement_type = Model Element
+_UI_Annotation_type = Annotation
+_UI_ModelElement_annotations_feature = Annotations
+_UI_Annotation_source_feature = Source
+_UI_Annotation_details_feature = Details
+_UI_Annotation_modelElement_feature = Model Element
+_UI_Annotation_contents_feature = Contents
+_UI_Annotation_references_feature = References
+_UI_Annotation_source_description = An identifier, typically an absolute URI, that uniquely identifies this kind of annotation
+_UI_Annotation_references_description = Objects referenced by this annotation
+_UI_CDOResourceLeaf_type = CDO Resource Leaf
+_UI_CDOFileResource_type = CDO File Resource
+_UI_CDOBinaryResource_type = CDO Binary Resource
+_UI_CDOTextResouurce_type = CDO Text Resouurce
+_UI_CDOBinaryResource_contents_feature = Contents
+_UI_CDOTextResouurce_contents_feature = Contents
+_UI_CDOTextResource_type = CDO Text Resource
+_UI_CDOTextResource_contents_feature = Contents
diff --git a/plugins/org.eclipse.emf.cdo.edit/plugin.xml b/plugins/org.eclipse.emf.cdo.edit/plugin.xml
index 012686ff3a..638ef7c6a1 100644
--- a/plugins/org.eclipse.emf.cdo.edit/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.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/Eresource/4.0.0"
- class = "org.eclipse.emf.cdo.eresource.provider.EresourceItemProviderAdapterFactory"
- 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/Eresource/4.0.0"
+ class = "org.eclipse.emf.cdo.eresource.provider.EresourceItemProviderAdapterFactory"
+ 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.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
index 287ef7937d..74e86bd1a2 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
@@ -1,94 +1,94 @@
-/*
- * 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.edit;
-
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
-
-/**
- * This is the central singleton for the Etypes edit plugin. <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated
- */
-public final class CDOEditPlugin extends EMFPlugin
-{
- /**
- * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static final CDOEditPlugin INSTANCE = new CDOEditPlugin();
-
- /**
- * 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 CDOEditPlugin()
- {
- super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, });
- }
-
- /**
- * 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.edit;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the Etypes edit plugin. <!-- begin-user-doc -->
+ *
+ * @since 4.0 <!-- end-user-doc -->
+ * @generated
+ */
+public final class CDOEditPlugin extends EMFPlugin
+{
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final CDOEditPlugin INSTANCE = new CDOEditPlugin();
+
+ /**
+ * 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 CDOEditPlugin()
+ {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * 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.edit/src/org/eclipse/emf/cdo/edit/CDOItemProviderAdapter.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOItemProviderAdapter.java
index 6576749869..f48f1faf2e 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOItemProviderAdapter.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOItemProviderAdapter.java
@@ -1,994 +1,994 @@
-/*
- * 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.edit;
-
-import org.eclipse.emf.cdo.CDOLock;
-import org.eclipse.emf.cdo.CDOObject;
-import org.eclipse.emf.cdo.CDOState;
-import org.eclipse.emf.cdo.common.id.CDOID;
-import org.eclipse.emf.cdo.common.revision.CDORevision;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.internal.edit.messages.Messages;
-import org.eclipse.emf.cdo.util.CDOUtil;
-import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
-import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-
-import java.util.Collection;
-import java.util.List;
-
-/**
- * Adds CDO-specific properties to {@link EObject objects}, such as {@link CDOObject#cdoID() ID},
- * {@link CDORevision#getVersion() version} and {@link CDOObject#cdoState() state}.
- *
- * @author Eike Stepper
- */
-public class CDOItemProviderAdapter extends ItemProviderAdapter
-{
- public CDOItemProviderAdapter(AdapterFactory adapterFactory)
- {
- super(adapterFactory);
- }
-
- @Override
- @SuppressWarnings("deprecation")
- public boolean hasChildren(Object object)
- {
- Collection<? extends EStructuralFeature> anyChildrenFeatures = getChildrenFeatures(object);
- if (anyChildrenFeatures.isEmpty())
- {
- anyChildrenFeatures = getChildrenReferences(object);
- }
-
- EObject eObject = (EObject)object;
- for (EStructuralFeature feature : anyChildrenFeatures)
- {
- if (feature.isMany())
- {
- List<?> children = (List<?>)eObject.eGet(feature);
- if (!children.isEmpty())
- {
- return true;
- }
- }
- else
- {
- if (eObject.eIsSet(feature))
- {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * @since 2.0
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
- if (itemPropertyDescriptors == null)
- {
- super.getPropertyDescriptors(object);
- addIDDescriptor(object);
- addVersionDescriptor(object);
- addStateDescriptor(object);
- addViewDescriptor(object);
- addContainerDescriptor(object);
- addDirectResourceDescriptor(object);
- addReadLockedDescriptor(object);
- addWriteLockedDescriptor(object);
- addAdaptersDescriptor(object);
- addChangeSubscriptionPoliciesDescriptor(object);
- addURIDescriptor(object);
- }
-
- return itemPropertyDescriptors;
- }
-
- /**
- * @since 2.0
- */
- protected void addIDDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new IDDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addVersionDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new VersionDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addStateDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new StateDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addViewDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new ViewDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addContainerDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new ContainerDescriptor(adapterFactory));
- }
-
- /**
- * @since 2.0
- */
- protected void addDirectResourceDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new DirectResourceDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addReadLockedDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new ReadLockedDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addWriteLockedDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new WriteLockedDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addAdaptersDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new AdaptersDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addChangeSubscriptionPoliciesDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new ChangeSubscriptionPoliciesDescriptor());
- }
-
- /**
- * @since 2.0
- */
- protected void addURIDescriptor(Object object)
- {
- itemPropertyDescriptors.add(new URIDescriptor());
- }
-
- /**
- * Base abstract to add CDO debug information to PropertiesView. Users wanting to add new information to the
- * Properties View can subclass this class instead of directly implementing {@link IItemPropertyDescriptor}.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static abstract class CDOPropertyDescriptor implements IItemPropertyDescriptor
- {
- /**
- * The filter id for expert properties
- */
- public static final String[] FILTER_ID_EXPERT = { "org.eclipse.ui.views.properties.expert" }; //$NON-NLS-1$
-
- /**
- * PropertiesView category for CDO
- */
- public static final String CDO_CATEGORY = Messages.getString("CDOItemProviderAdapter.0"); //$NON-NLS-1$
-
- public CDOPropertyDescriptor()
- {
- }
-
- public boolean canSetProperty(Object object)
- {
- return false;
- }
-
- public void setPropertyValue(Object object, Object value)
- {
- }
-
- public void resetPropertyValue(Object object)
- {
- }
-
- public boolean isPropertySet(Object object)
- {
- return false;
- }
-
- public String getCategory(Object object)
- {
- return CDO_CATEGORY;
- }
-
- public Collection<?> getChoiceOfValues(Object object)
- {
- return null;
- }
-
- public Object getHelpContextIds(Object object)
- {
- return null;
- }
-
- public boolean isCompatibleWith(Object object, Object anotherObject,
- IItemPropertyDescriptor anotherPropertyDescriptor)
- {
- return false;
- }
-
- public boolean isMany(Object object)
- {
- return false;
- }
-
- public boolean isMultiLine(Object object)
- {
- return false;
- }
-
- public boolean isSortChoices(Object object)
- {
- return false;
- }
-
- public String[] getFilterFlags(Object object)
- {
- return FILTER_ID_EXPERT;
- }
-
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider();
- }
-
- /**
- * A default implementation of {@link IItemLabelProvider}.
- *
- * @author Eike Stepper
- */
- public static class DefaultLabelProvider implements IItemLabelProvider
- {
- public DefaultLabelProvider()
- {
- }
-
- public Object getImage(Object object)
- {
- return null;
- }
-
- public String getText(Object object)
- {
- return object.toString();
- }
- }
- }
-
- /**
- * Adds the {@link CDOID} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class IDDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.1"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.2"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.3"); //$NON-NLS-1$
-
- public IDDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- return CDOUtil.getCDOObject((EObject)object).cdoID();
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
- }
-
- /**
- * Adds the version of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class VersionDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.4"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.5"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.6"); //$NON-NLS-1$
-
- public VersionDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof CDOObject)
- {
- return CDOUtil.getCDOObject((EObject)object).cdoRevision();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider()
- {
- @Override
- public String getText(Object object)
- {
- if (object instanceof CDORevision)
- {
- return String.valueOf(((CDORevision)object).getVersion());
- }
-
- return null;
- }
- };
- }
- }
-
- /**
- * Adds the {@link CDOState state} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class StateDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.7"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.8"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.9"); //$NON-NLS-1$
-
- public StateDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof CDOObject)
- {
- return CDOUtil.getCDOObject((EObject)object).cdoState();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
- }
-
- /**
- * Adds the associate {@link CDOView view} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class ViewDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.10"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.11"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.12"); //$NON-NLS-1$
-
- public ViewDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof EObject)
- {
- return CDOUtil.getCDOObject((EObject)object).cdoView();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
- }
-
- /**
- * Adds the {@link EObject#eContainer() eContainer} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class ContainerDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.13"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.14"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.15"); //$NON-NLS-1$
-
- private static AdapterFactory adapterFactory;
-
- public ContainerDescriptor(AdapterFactory adapterFactory)
- {
- ContainerDescriptor.adapterFactory = adapterFactory;
- }
-
- public Object getPropertyValue(Object object)
- {
- return CDOUtil.getCDOObject((EObject)object).eContainer();
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- // Needs a wrapped delegator to IItemLabelProvider since eContainer might be null for top level CDOObjects
- // and we can't return a null IItemLabelProvider
- return new IItemLabelProvider()
- {
- public Object getImage(Object object)
- {
- if (object != null)
- {
- return ((IItemLabelProvider)ContainerDescriptor.adapterFactory.adapt(object, IItemLabelProvider.class))
- .getImage(object);
- }
-
- return null;
- }
-
- public String getText(Object object)
- {
- if (object != null)
- {
- return ((IItemLabelProvider)ContainerDescriptor.adapterFactory.adapt(object, IItemLabelProvider.class))
- .getText(object);
- }
-
- return null;
- }
- };
- }
- }
-
- /**
- * Adds the {@link InternalEObject#eDirectResource() direct resource} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class DirectResourceDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.16"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.17"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.18"); //$NON-NLS-1$
-
- public DirectResourceDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof InternalEObject)
- {
- return ((InternalEObject)object).eDirectResource();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider()
- {
- @Override
- public String getText(Object object)
- {
- if (object instanceof CDOResource)
- {
- return ((Resource)object).getURI().toString();
- }
-
- return null;
- }
- };
- }
- }
-
- /**
- * Adds the {@link CDOLock read lock} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class ReadLockedDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.19"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.20"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.21"); //$NON-NLS-1$
-
- public ReadLockedDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof EObject)
- {
- return CDOUtil.getCDOObject((EObject)object).cdoReadLock();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider()
- {
- @Override
- public String getText(Object object)
- {
- if (object instanceof CDOLock)
- {
- return String.valueOf(((CDOLock)object).isLocked());
- }
-
- return null;
- }
- };
- }
- }
-
- /**
- * Adds the {@link CDOLock write lock} of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class WriteLockedDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.22"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.23"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.24"); //$NON-NLS-1$
-
- public WriteLockedDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof EObject)
- {
- return CDOUtil.getCDOObject((EObject)object).cdoWriteLock();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider()
- {
- @Override
- public String getText(Object object)
- {
- if (object instanceof CDOLock)
- {
- return String.valueOf(((CDOLock)object).isLocked());
- }
-
- return null;
- }
- };
- }
- }
-
- /**
- * Adds the {@link EObject#eAdapters() eAdapters} list of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class AdaptersDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.25"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.26"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.27"); //$NON-NLS-1$
-
- public AdaptersDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof EObject)
- {
- return CDOUtil.getCDOObject((EObject)object).eAdapters();
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
- }
-
- /**
- * Adds the change subscription policies list of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class ChangeSubscriptionPoliciesDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.28"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.29"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.30"); //$NON-NLS-1$
-
- public ChangeSubscriptionPoliciesDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof EObject)
- {
- CDOView cdoView = CDOUtil.getCDOObject((EObject)object).cdoView();
- if (cdoView != null)
- {
- return cdoView.options().getChangeSubscriptionPolicies();
- }
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider()
- {
- @Override
- public String getText(Object object)
- {
- if (object instanceof CDOAdapterPolicy[])
- {
- StringBuilder builder = new StringBuilder();
- CDOAdapterPolicy[] policies = (CDOAdapterPolicy[])object;
- for (CDOAdapterPolicy policy : policies)
- {
- builder.append(policy.toString());
- builder.append(", "); //$NON-NLS-1$
- }
-
- return builder.toString();
- }
-
- return null;
- }
- };
- }
- }
-
- /**
- * Adds the URI of a {@link CDOObject} to the Properties View.
- *
- * @since 2.0
- * @author Victor Roldan Betancort
- */
- public static class URIDescriptor extends CDOPropertyDescriptor
- {
- private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.31"); //$NON-NLS-1$
-
- private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.32"); //$NON-NLS-1$
-
- private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.33"); //$NON-NLS-1$
-
- public URIDescriptor()
- {
- }
-
- public Object getPropertyValue(Object object)
- {
- if (object instanceof EObject)
- {
- CDOObject cdoObject = CDOUtil.getCDOObject((EObject)object);
- Resource resource = cdoObject.eResource();
- if (resource != null)
- {
- CDOID id = cdoObject.cdoID();
- String fragment = id != null ? id.toURIFragment() : resource.getURIFragment(cdoObject);
- return resource.getURI().appendFragment(fragment).toString();
- }
- }
-
- return null;
- }
-
- public String getDescription(Object object)
- {
- return DESCRIPTION;
- }
-
- public String getDisplayName(Object object)
- {
- return DISPLAY_NAME;
- }
-
- public Object getFeature(Object object)
- {
- return FEATURE_ID;
- }
-
- public String getId(Object object)
- {
- return FEATURE_ID;
- }
-
- @Override
- public IItemLabelProvider getLabelProvider(Object object)
- {
- return new DefaultLabelProvider()
- {
- @Override
- public String getText(Object object)
- {
- if (object instanceof String)
- {
- return (String)object;
- }
-
- return null;
- }
- };
- }
- }
-}
+/*
+ * 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.edit;
+
+import org.eclipse.emf.cdo.CDOLock;
+import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.CDOState;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.internal.edit.messages.Messages;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Adds CDO-specific properties to {@link EObject objects}, such as {@link CDOObject#cdoID() ID},
+ * {@link CDORevision#getVersion() version} and {@link CDOObject#cdoState() state}.
+ *
+ * @author Eike Stepper
+ */
+public class CDOItemProviderAdapter extends ItemProviderAdapter
+{
+ public CDOItemProviderAdapter(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ @Override
+ @SuppressWarnings("deprecation")
+ public boolean hasChildren(Object object)
+ {
+ Collection<? extends EStructuralFeature> anyChildrenFeatures = getChildrenFeatures(object);
+ if (anyChildrenFeatures.isEmpty())
+ {
+ anyChildrenFeatures = getChildrenReferences(object);
+ }
+
+ EObject eObject = (EObject)object;
+ for (EStructuralFeature feature : anyChildrenFeatures)
+ {
+ if (feature.isMany())
+ {
+ List<?> children = (List<?>)eObject.eGet(feature);
+ if (!children.isEmpty())
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if (eObject.eIsSet(feature))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @since 2.0
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null)
+ {
+ super.getPropertyDescriptors(object);
+ addIDDescriptor(object);
+ addVersionDescriptor(object);
+ addStateDescriptor(object);
+ addViewDescriptor(object);
+ addContainerDescriptor(object);
+ addDirectResourceDescriptor(object);
+ addReadLockedDescriptor(object);
+ addWriteLockedDescriptor(object);
+ addAdaptersDescriptor(object);
+ addChangeSubscriptionPoliciesDescriptor(object);
+ addURIDescriptor(object);
+ }
+
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addIDDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new IDDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addVersionDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new VersionDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addStateDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new StateDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addViewDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new ViewDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addContainerDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new ContainerDescriptor(adapterFactory));
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addDirectResourceDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new DirectResourceDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addReadLockedDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new ReadLockedDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addWriteLockedDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new WriteLockedDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addAdaptersDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new AdaptersDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addChangeSubscriptionPoliciesDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new ChangeSubscriptionPoliciesDescriptor());
+ }
+
+ /**
+ * @since 2.0
+ */
+ protected void addURIDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(new URIDescriptor());
+ }
+
+ /**
+ * Base abstract to add CDO debug information to PropertiesView. Users wanting to add new information to the
+ * Properties View can subclass this class instead of directly implementing {@link IItemPropertyDescriptor}.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static abstract class CDOPropertyDescriptor implements IItemPropertyDescriptor
+ {
+ /**
+ * The filter id for expert properties
+ */
+ public static final String[] FILTER_ID_EXPERT = { "org.eclipse.ui.views.properties.expert" }; //$NON-NLS-1$
+
+ /**
+ * PropertiesView category for CDO
+ */
+ public static final String CDO_CATEGORY = Messages.getString("CDOItemProviderAdapter.0"); //$NON-NLS-1$
+
+ public CDOPropertyDescriptor()
+ {
+ }
+
+ public boolean canSetProperty(Object object)
+ {
+ return false;
+ }
+
+ public void setPropertyValue(Object object, Object value)
+ {
+ }
+
+ public void resetPropertyValue(Object object)
+ {
+ }
+
+ public boolean isPropertySet(Object object)
+ {
+ return false;
+ }
+
+ public String getCategory(Object object)
+ {
+ return CDO_CATEGORY;
+ }
+
+ public Collection<?> getChoiceOfValues(Object object)
+ {
+ return null;
+ }
+
+ public Object getHelpContextIds(Object object)
+ {
+ return null;
+ }
+
+ public boolean isCompatibleWith(Object object, Object anotherObject,
+ IItemPropertyDescriptor anotherPropertyDescriptor)
+ {
+ return false;
+ }
+
+ public boolean isMany(Object object)
+ {
+ return false;
+ }
+
+ public boolean isMultiLine(Object object)
+ {
+ return false;
+ }
+
+ public boolean isSortChoices(Object object)
+ {
+ return false;
+ }
+
+ public String[] getFilterFlags(Object object)
+ {
+ return FILTER_ID_EXPERT;
+ }
+
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider();
+ }
+
+ /**
+ * A default implementation of {@link IItemLabelProvider}.
+ *
+ * @author Eike Stepper
+ */
+ public static class DefaultLabelProvider implements IItemLabelProvider
+ {
+ public DefaultLabelProvider()
+ {
+ }
+
+ public Object getImage(Object object)
+ {
+ return null;
+ }
+
+ public String getText(Object object)
+ {
+ return object.toString();
+ }
+ }
+ }
+
+ /**
+ * Adds the {@link CDOID} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class IDDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.1"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.2"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.3"); //$NON-NLS-1$
+
+ public IDDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ return CDOUtil.getCDOObject((EObject)object).cdoID();
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+ }
+
+ /**
+ * Adds the version of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class VersionDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.4"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.5"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.6"); //$NON-NLS-1$
+
+ public VersionDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof CDOObject)
+ {
+ return CDOUtil.getCDOObject((EObject)object).cdoRevision();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider()
+ {
+ @Override
+ public String getText(Object object)
+ {
+ if (object instanceof CDORevision)
+ {
+ return String.valueOf(((CDORevision)object).getVersion());
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+
+ /**
+ * Adds the {@link CDOState state} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class StateDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.7"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.8"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.9"); //$NON-NLS-1$
+
+ public StateDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof CDOObject)
+ {
+ return CDOUtil.getCDOObject((EObject)object).cdoState();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+ }
+
+ /**
+ * Adds the associate {@link CDOView view} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class ViewDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.10"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.11"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.12"); //$NON-NLS-1$
+
+ public ViewDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof EObject)
+ {
+ return CDOUtil.getCDOObject((EObject)object).cdoView();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+ }
+
+ /**
+ * Adds the {@link EObject#eContainer() eContainer} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class ContainerDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.13"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.14"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.15"); //$NON-NLS-1$
+
+ private static AdapterFactory adapterFactory;
+
+ public ContainerDescriptor(AdapterFactory adapterFactory)
+ {
+ ContainerDescriptor.adapterFactory = adapterFactory;
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ return CDOUtil.getCDOObject((EObject)object).eContainer();
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ // Needs a wrapped delegator to IItemLabelProvider since eContainer might be null for top level CDOObjects
+ // and we can't return a null IItemLabelProvider
+ return new IItemLabelProvider()
+ {
+ public Object getImage(Object object)
+ {
+ if (object != null)
+ {
+ return ((IItemLabelProvider)ContainerDescriptor.adapterFactory.adapt(object, IItemLabelProvider.class))
+ .getImage(object);
+ }
+
+ return null;
+ }
+
+ public String getText(Object object)
+ {
+ if (object != null)
+ {
+ return ((IItemLabelProvider)ContainerDescriptor.adapterFactory.adapt(object, IItemLabelProvider.class))
+ .getText(object);
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+
+ /**
+ * Adds the {@link InternalEObject#eDirectResource() direct resource} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class DirectResourceDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.16"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.17"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.18"); //$NON-NLS-1$
+
+ public DirectResourceDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof InternalEObject)
+ {
+ return ((InternalEObject)object).eDirectResource();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider()
+ {
+ @Override
+ public String getText(Object object)
+ {
+ if (object instanceof CDOResource)
+ {
+ return ((Resource)object).getURI().toString();
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+
+ /**
+ * Adds the {@link CDOLock read lock} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class ReadLockedDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.19"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.20"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.21"); //$NON-NLS-1$
+
+ public ReadLockedDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof EObject)
+ {
+ return CDOUtil.getCDOObject((EObject)object).cdoReadLock();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider()
+ {
+ @Override
+ public String getText(Object object)
+ {
+ if (object instanceof CDOLock)
+ {
+ return String.valueOf(((CDOLock)object).isLocked());
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+
+ /**
+ * Adds the {@link CDOLock write lock} of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class WriteLockedDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.22"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.23"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.24"); //$NON-NLS-1$
+
+ public WriteLockedDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof EObject)
+ {
+ return CDOUtil.getCDOObject((EObject)object).cdoWriteLock();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider()
+ {
+ @Override
+ public String getText(Object object)
+ {
+ if (object instanceof CDOLock)
+ {
+ return String.valueOf(((CDOLock)object).isLocked());
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+
+ /**
+ * Adds the {@link EObject#eAdapters() eAdapters} list of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class AdaptersDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.25"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.26"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.27"); //$NON-NLS-1$
+
+ public AdaptersDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof EObject)
+ {
+ return CDOUtil.getCDOObject((EObject)object).eAdapters();
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+ }
+
+ /**
+ * Adds the change subscription policies list of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class ChangeSubscriptionPoliciesDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.28"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.29"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.30"); //$NON-NLS-1$
+
+ public ChangeSubscriptionPoliciesDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof EObject)
+ {
+ CDOView cdoView = CDOUtil.getCDOObject((EObject)object).cdoView();
+ if (cdoView != null)
+ {
+ return cdoView.options().getChangeSubscriptionPolicies();
+ }
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider()
+ {
+ @Override
+ public String getText(Object object)
+ {
+ if (object instanceof CDOAdapterPolicy[])
+ {
+ StringBuilder builder = new StringBuilder();
+ CDOAdapterPolicy[] policies = (CDOAdapterPolicy[])object;
+ for (CDOAdapterPolicy policy : policies)
+ {
+ builder.append(policy.toString());
+ builder.append(", "); //$NON-NLS-1$
+ }
+
+ return builder.toString();
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+
+ /**
+ * Adds the URI of a {@link CDOObject} to the Properties View.
+ *
+ * @since 2.0
+ * @author Victor Roldan Betancort
+ */
+ public static class URIDescriptor extends CDOPropertyDescriptor
+ {
+ private static final String FEATURE_ID = Messages.getString("CDOItemProviderAdapter.31"); //$NON-NLS-1$
+
+ private static final String DISPLAY_NAME = Messages.getString("CDOItemProviderAdapter.32"); //$NON-NLS-1$
+
+ private static final String DESCRIPTION = Messages.getString("CDOItemProviderAdapter.33"); //$NON-NLS-1$
+
+ public URIDescriptor()
+ {
+ }
+
+ public Object getPropertyValue(Object object)
+ {
+ if (object instanceof EObject)
+ {
+ CDOObject cdoObject = CDOUtil.getCDOObject((EObject)object);
+ Resource resource = cdoObject.eResource();
+ if (resource != null)
+ {
+ CDOID id = cdoObject.cdoID();
+ String fragment = id != null ? id.toURIFragment() : resource.getURIFragment(cdoObject);
+ return resource.getURI().appendFragment(fragment).toString();
+ }
+ }
+
+ return null;
+ }
+
+ public String getDescription(Object object)
+ {
+ return DESCRIPTION;
+ }
+
+ public String getDisplayName(Object object)
+ {
+ return DISPLAY_NAME;
+ }
+
+ public Object getFeature(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ public String getId(Object object)
+ {
+ return FEATURE_ID;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object)
+ {
+ return new DefaultLabelProvider()
+ {
+ @Override
+ public String getText(Object object)
+ {
+ if (object instanceof String)
+ {
+ return (String)object;
+ }
+
+ return null;
+ }
+ };
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/package-info.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/package-info.java
index 38a62fa565..4c6f5cd129 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/package-info.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/package-info.java
@@ -1,16 +1,16 @@
-/*
- * 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
- */
-
-/**
- * Useful base classes that can be referenced from custom EMF generator models.
- */
-package org.eclipse.emf.cdo.edit;
-
+/*
+ * 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
+ */
+
+/**
+ * Useful base classes that can be referenced from custom EMF generator models.
+ */
+package org.eclipse.emf.cdo.edit;
+
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java
index e57b71ba40..3f794ec395 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java
@@ -1,149 +1,149 @@
-/*
- * 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.eresource.provider;
-
-import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-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.eresource.CDOBinaryResource} object. <!--
- * begin-user-doc -->
- *
- * @since 4.1
- * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
- * @generated
- */
-public class CDOBinaryResourceItemProvider extends CDOFileResourceItemProvider 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 CDOBinaryResourceItemProvider(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);
-
- addContentsPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Contents feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addContentsPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOBinaryResource_contents_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_CDOBinaryResource_contents_feature", "_UI_CDOBinaryResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_BINARY_RESOURCE__CONTENTS, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This returns CDOBinaryResource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOBinaryResource")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((CDOBinaryResource)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_CDOBinaryResource_type") : //$NON-NLS-1$
- 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(CDOBinaryResource.class))
- {
- case EresourcePackage.CDO_BINARY_RESOURCE__CONTENTS:
- 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.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+
+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.eresource.CDOBinaryResource} object. <!--
+ * begin-user-doc -->
+ *
+ * @since 4.1
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ */
+public class CDOBinaryResourceItemProvider extends CDOFileResourceItemProvider 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 CDOBinaryResourceItemProvider(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);
+
+ addContentsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Contents feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addContentsPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOBinaryResource_contents_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_CDOBinaryResource_contents_feature", "_UI_CDOBinaryResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_BINARY_RESOURCE__CONTENTS, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns CDOBinaryResource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOBinaryResource")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((CDOBinaryResource)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOBinaryResource_type") : //$NON-NLS-1$
+ 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(CDOBinaryResource.class))
+ {
+ case EresourcePackage.CDO_BINARY_RESOURCE__CONTENTS:
+ 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.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
index f19e4b1a7d..7e1e10470c 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java
@@ -1,185 +1,185 @@
-/*
- * 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.eresource.provider;
-
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.EresourceFactory;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-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.eresource.CDOResourceFolder} object. <!--
- * begin-user-doc -->
- *
- * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
- * @generated
- * @since 2.0
- */
-public class CDOResourceFolderItemProvider extends CDOResourceNodeItemProvider 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 CDOResourceFolderItemProvider(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(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES);
- }
- 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 CDOResourceFolder.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOResourceFolder")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- @Override
- public String getText(Object object)
- {
- String label = ((CDOResourceFolder)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_CDOResourceFolder_type") + "?" : "/" + label; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /**
- * Returns the parent of the folder. Might be another folder, or the root resource
- *
- * @ADDED
- */
- @Override
- public Object getParent(Object object)
- {
- return ((CDOResourceFolder)object).eContainer();
- }
-
- /**
- * 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(CDOResourceFolder.class))
- {
- case EresourcePackage.CDO_RESOURCE_FOLDER__NODES:
- 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(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
- EresourceFactory.eINSTANCE.createCDOResourceFolder()));
-
- newChildDescriptors.add(createChildParameter(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
- EresourceFactory.eINSTANCE.createCDOResource()));
-
- newChildDescriptors.add(createChildParameter(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
- EresourceFactory.eINSTANCE.createCDOBinaryResource()));
-
- newChildDescriptors.add(createChildParameter(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
- EresourceFactory.eINSTANCE.createCDOTextResource()));
- }
-
-}
+/*
+ * 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.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.eresource.EresourceFactory;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+
+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.eresource.CDOResourceFolder} object. <!--
+ * begin-user-doc -->
+ *
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ * @since 2.0
+ */
+public class CDOResourceFolderItemProvider extends CDOResourceNodeItemProvider 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 CDOResourceFolderItemProvider(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(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES);
+ }
+ 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 CDOResourceFolder.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOResourceFolder")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((CDOResourceFolder)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOResourceFolder_type") + "?" : "/" + label; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * Returns the parent of the folder. Might be another folder, or the root resource
+ *
+ * @ADDED
+ */
+ @Override
+ public Object getParent(Object object)
+ {
+ return ((CDOResourceFolder)object).eContainer();
+ }
+
+ /**
+ * 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(CDOResourceFolder.class))
+ {
+ case EresourcePackage.CDO_RESOURCE_FOLDER__NODES:
+ 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(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
+ EresourceFactory.eINSTANCE.createCDOResourceFolder()));
+
+ newChildDescriptors.add(createChildParameter(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
+ EresourceFactory.eINSTANCE.createCDOResource()));
+
+ newChildDescriptors.add(createChildParameter(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
+ EresourceFactory.eINSTANCE.createCDOBinaryResource()));
+
+ newChildDescriptors.add(createChildParameter(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES,
+ EresourceFactory.eINSTANCE.createCDOTextResource()));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
index ccb22ec70b..0a01008e8e 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java
@@ -1,278 +1,278 @@
-/*
- * 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.eresource.provider;
-
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.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.eresource.CDOResource} object. <!-- begin-user-doc
- * -->
- *
- * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
- * @generated
- */
-public class CDOResourceItemProvider extends CDOResourceLeafItemProvider 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 CDOResourceItemProvider(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);
-
- addURIPropertyDescriptor(object);
- addModifiedPropertyDescriptor(object);
- addLoadedPropertyDescriptor(object);
- addTrackingModificationPropertyDescriptor(object);
- addTimeStampPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the URI feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addURIPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOResource_uRI_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_uRI_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE__URI, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the Modified feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addModifiedPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOResource_modified_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_modified_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE__MODIFIED, false, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Loaded feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addLoadedPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOResource_loaded_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_loaded_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE__LOADED, false, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Tracking Modification feature. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- protected void addTrackingModificationPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOResource_trackingModification_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_CDOResource_trackingModification_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE__TRACKING_MODIFICATION, true, false, false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Time Stamp feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addTimeStampPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOResource_timeStamp_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_timeStamp_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE__TIME_STAMP, true, false, false,
- ItemPropertyDescriptor.INTEGRAL_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(EresourcePackage.Literals.CDO_RESOURCE__CONTENTS);
- }
- 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 CDOResource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOResource")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- @Override
- public String getText(Object object)
- {
- CDOResource resource = (CDOResource)object;
- String name = resource.getName();
- return name == null ? resource.toString() : name;
- }
-
- /**
- * Returns the parent of the argument CDOResource
- *
- * @ADDED
- * @since 2.0
- */
- @Override
- public Object getParent(Object object)
- {
- CDOResource resource = (CDOResource)object;
- if (resource.isRoot())
- {
- return resource.getResourceSet();
- }
-
- return resource.getFolder();
- }
-
- /**
- * 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(CDOResource.class))
- {
- case EresourcePackage.CDO_RESOURCE__RESOURCE_SET:
- case EresourcePackage.CDO_RESOURCE__URI:
- case EresourcePackage.CDO_RESOURCE__MODIFIED:
- case EresourcePackage.CDO_RESOURCE__LOADED:
- case EresourcePackage.CDO_RESOURCE__TRACKING_MODIFICATION:
- case EresourcePackage.CDO_RESOURCE__ERRORS:
- case EresourcePackage.CDO_RESOURCE__WARNINGS:
- case EresourcePackage.CDO_RESOURCE__TIME_STAMP:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case EresourcePackage.CDO_RESOURCE__CONTENTS:
- 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 NOT
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object 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.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.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.eresource.CDOResource} object. <!-- begin-user-doc
+ * -->
+ *
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ */
+public class CDOResourceItemProvider extends CDOResourceLeafItemProvider 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 CDOResourceItemProvider(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);
+
+ addURIPropertyDescriptor(object);
+ addModifiedPropertyDescriptor(object);
+ addLoadedPropertyDescriptor(object);
+ addTrackingModificationPropertyDescriptor(object);
+ addTimeStampPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the URI feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addURIPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOResource_uRI_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_uRI_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE__URI, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Modified feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addModifiedPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOResource_modified_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_modified_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE__MODIFIED, false, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Loaded feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addLoadedPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOResource_loaded_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_loaded_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE__LOADED, false, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Tracking Modification feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void addTrackingModificationPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOResource_trackingModification_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_CDOResource_trackingModification_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE__TRACKING_MODIFICATION, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Time Stamp feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTimeStampPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOResource_timeStamp_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_CDOResource_timeStamp_feature", "_UI_CDOResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE__TIME_STAMP, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_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(EresourcePackage.Literals.CDO_RESOURCE__CONTENTS);
+ }
+ 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 CDOResource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOResource")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object)
+ {
+ CDOResource resource = (CDOResource)object;
+ String name = resource.getName();
+ return name == null ? resource.toString() : name;
+ }
+
+ /**
+ * Returns the parent of the argument CDOResource
+ *
+ * @ADDED
+ * @since 2.0
+ */
+ @Override
+ public Object getParent(Object object)
+ {
+ CDOResource resource = (CDOResource)object;
+ if (resource.isRoot())
+ {
+ return resource.getResourceSet();
+ }
+
+ return resource.getFolder();
+ }
+
+ /**
+ * 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(CDOResource.class))
+ {
+ case EresourcePackage.CDO_RESOURCE__RESOURCE_SET:
+ case EresourcePackage.CDO_RESOURCE__URI:
+ case EresourcePackage.CDO_RESOURCE__MODIFIED:
+ case EresourcePackage.CDO_RESOURCE__LOADED:
+ case EresourcePackage.CDO_RESOURCE__TRACKING_MODIFICATION:
+ case EresourcePackage.CDO_RESOURCE__ERRORS:
+ case EresourcePackage.CDO_RESOURCE__WARNINGS:
+ case EresourcePackage.CDO_RESOURCE__TIME_STAMP:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case EresourcePackage.CDO_RESOURCE__CONTENTS:
+ 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 NOT
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
+ {
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
index aff72d421f..85936dd358 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
@@ -1,183 +1,183 @@
-/*
- * 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.eresource.provider;
-
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-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.ItemProviderAdapter;
-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.eresource.CDOResourceNode} object. <!--
- * begin-user-doc -->
- *
- * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
- * @generated
- * @since 2.0
- */
-public class CDOResourceNodeItemProvider extends ItemProviderAdapter 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 CDOResourceNodeItemProvider(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);
- addPathPropertyDescriptor(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_CDOResourceNode_name_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_CDOResourceNode_name_feature", "_UI_CDOResourceNode_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * This adds a property descriptor for the Path feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addPathPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors
- .add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_CDOResourceNode_path_feature"), //$NON-NLS-1$
- getString(
- "_UI_PropertyDescriptor_description", "_UI_CDOResourceNode_path_feature", "_UI_CDOResourceNode_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EresourcePackage.Literals.CDO_RESOURCE_NODE__PATH, false, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean hasChildren(Object object)
- {
- return hasChildren(object, true);
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((CDOResourceNode)object).getName();
- return label == null || label.length() == 0 ? getString("_UI_CDOResourceNode_type") : //$NON-NLS-1$
- getString("_UI_CDOResourceNode_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(CDOResourceNode.class))
- {
- case EresourcePackage.CDO_RESOURCE_NODE__NAME:
- case EresourcePackage.CDO_RESOURCE_NODE__PATH:
- 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.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceNode;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+
+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.ItemProviderAdapter;
+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.eresource.CDOResourceNode} object. <!--
+ * begin-user-doc -->
+ *
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ * @since 2.0
+ */
+public class CDOResourceNodeItemProvider extends ItemProviderAdapter 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 CDOResourceNodeItemProvider(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);
+ addPathPropertyDescriptor(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_CDOResourceNode_name_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_CDOResourceNode_name_feature", "_UI_CDOResourceNode_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Path feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPathPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CDOResourceNode_path_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_CDOResourceNode_path_feature", "_UI_CDOResourceNode_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_RESOURCE_NODE__PATH, false, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((CDOResourceNode)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOResourceNode_type") : //$NON-NLS-1$
+ getString("_UI_CDOResourceNode_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(CDOResourceNode.class))
+ {
+ case EresourcePackage.CDO_RESOURCE_NODE__NAME:
+ case EresourcePackage.CDO_RESOURCE_NODE__PATH:
+ 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.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
index 04025d61ff..cff56a5c3b 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
@@ -1,355 +1,355 @@
-/*
- * 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.eresource.provider;
-
-import org.eclipse.emf.cdo.edit.CDOEditPlugin;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-import org.eclipse.emf.cdo.eresource.util.EresourceAdapterFactory;
-
-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 --> @since 2.0 <!-- end-user-doc -->
- *
- * @generated
- */
-public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory 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(
- CDOEditPlugin.INSTANCE, EresourcePackage.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 EresourceItemProviderAdapterFactory()
- {
- 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.eresource.CDOResourceFolder} instances.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CDOResourceFolderItemProvider cdoResourceFolderItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCDOResourceFolderAdapter()
- {
- if (cdoResourceFolderItemProvider == null)
- {
- cdoResourceFolderItemProvider = new CDOResourceFolderItemProvider(this);
- }
-
- return cdoResourceFolderItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.eresource.CDOResource} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CDOResourceItemProvider cdoResourceItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResource}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCDOResourceAdapter()
- {
- if (cdoResourceItemProvider == null)
- {
- cdoResourceItemProvider = new CDOResourceItemProvider(this);
- }
-
- return cdoResourceItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.eresource.CDOBinaryResource} instances.
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- protected CDOBinaryResourceItemProvider cdoBinaryResourceItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOBinaryResource}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCDOBinaryResourceAdapter()
- {
- if (cdoBinaryResourceItemProvider == null)
- {
- cdoBinaryResourceItemProvider = new CDOBinaryResourceItemProvider(this);
- }
-
- return cdoBinaryResourceItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.eresource.CDOTextResource} instances.
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- protected CDOTextResourceItemProvider cdoTextResourceItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOTextResource}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createCDOTextResourceAdapter()
- {
- if (cdoTextResourceItemProvider == null)
- {
- cdoTextResourceItemProvider = new CDOTextResourceItemProvider(this);
- }
-
- return cdoTextResourceItemProvider;
- }
-
- /**
- * 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 (cdoResourceFolderItemProvider != null)
- cdoResourceFolderItemProvider.dispose();
- if (cdoResourceItemProvider != null)
- cdoResourceItemProvider.dispose();
- if (cdoBinaryResourceItemProvider != null)
- cdoBinaryResourceItemProvider.dispose();
- if (cdoTextResourceItemProvider != null)
- cdoTextResourceItemProvider.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.eresource.provider;
+
+import org.eclipse.emf.cdo.edit.CDOEditPlugin;
+import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.eresource.util.EresourceAdapterFactory;
+
+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 --> @since 2.0 <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory 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(
+ CDOEditPlugin.INSTANCE, EresourcePackage.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 EresourceItemProviderAdapterFactory()
+ {
+ 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.eresource.CDOResourceFolder} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CDOResourceFolderItemProvider cdoResourceFolderItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCDOResourceFolderAdapter()
+ {
+ if (cdoResourceFolderItemProvider == null)
+ {
+ cdoResourceFolderItemProvider = new CDOResourceFolderItemProvider(this);
+ }
+
+ return cdoResourceFolderItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.eresource.CDOResource} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CDOResourceItemProvider cdoResourceItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResource}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCDOResourceAdapter()
+ {
+ if (cdoResourceItemProvider == null)
+ {
+ cdoResourceItemProvider = new CDOResourceItemProvider(this);
+ }
+
+ return cdoResourceItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.eresource.CDOBinaryResource} instances.
+ * <!-- begin-user-doc -->
+ *
+ * @since 4.1 <!-- end-user-doc -->
+ * @generated
+ */
+ protected CDOBinaryResourceItemProvider cdoBinaryResourceItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOBinaryResource}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCDOBinaryResourceAdapter()
+ {
+ if (cdoBinaryResourceItemProvider == null)
+ {
+ cdoBinaryResourceItemProvider = new CDOBinaryResourceItemProvider(this);
+ }
+
+ return cdoBinaryResourceItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.cdo.eresource.CDOTextResource} instances.
+ * <!-- begin-user-doc -->
+ *
+ * @since 4.1 <!-- end-user-doc -->
+ * @generated
+ */
+ protected CDOTextResourceItemProvider cdoTextResourceItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.eresource.CDOTextResource}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCDOTextResourceAdapter()
+ {
+ if (cdoTextResourceItemProvider == null)
+ {
+ cdoTextResourceItemProvider = new CDOTextResourceItemProvider(this);
+ }
+
+ return cdoTextResourceItemProvider;
+ }
+
+ /**
+ * 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 (cdoResourceFolderItemProvider != null)
+ cdoResourceFolderItemProvider.dispose();
+ if (cdoResourceItemProvider != null)
+ cdoResourceItemProvider.dispose();
+ if (cdoBinaryResourceItemProvider != null)
+ cdoBinaryResourceItemProvider.dispose();
+ if (cdoTextResourceItemProvider != null)
+ cdoTextResourceItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/package-info.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/package-info.java
index d05d738e84..8842fdebd8 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/package-info.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/package-info.java
@@ -1,18 +1,18 @@
-/*
- * 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
- */
-
-/**
- * The generated EMF edit support of the CDO repository file system.
- *
- * @apiviz.exclude .*
- */
-package org.eclipse.emf.cdo.eresource.provider;
-
+/*
+ * 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
+ */
+
+/**
+ * The generated EMF edit support of the CDO repository file system.
+ *
+ * @apiviz.exclude .*
+ */
+package org.eclipse.emf.cdo.eresource.provider;
+
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.java
index b5f796365d..dddebd06e0 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.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.etypes.provider;
-
-import org.eclipse.emf.cdo.etypes.Annotation;
-import org.eclipse.emf.cdo.etypes.EtypesPackage;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.EcorePackage;
-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.etypes.Annotation} object. <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated
- */
-public class AnnotationItemProvider extends ModelElementItemProvider 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 AnnotationItemProvider(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);
-
- addSourcePropertyDescriptor(object);
- addReferencesPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Source feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addSourcePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Annotation_source_feature"), //$NON-NLS-1$
- getString("_UI_Annotation_source_description"), //$NON-NLS-1$
- EtypesPackage.Literals.ANNOTATION__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null, null));
- }
-
- /**
- * This adds a property descriptor for the References feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addReferencesPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_Annotation_references_feature"), //$NON-NLS-1$
- getString("_UI_Annotation_references_description"), //$NON-NLS-1$
- EtypesPackage.Literals.ANNOTATION__REFERENCES, true, false, true, null, null, null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
- {
- if (childrenFeatures == null)
- {
- super.getChildrenFeatures(object);
- childrenFeatures.add(EtypesPackage.Literals.ANNOTATION__DETAILS);
- childrenFeatures.add(EtypesPackage.Literals.ANNOTATION__CONTENTS);
- }
- 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 Annotation.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Annotation")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((Annotation)object).getSource();
- return label == null || label.length() == 0 ? getString("_UI_Annotation_type") : //$NON-NLS-1$
- getString("_UI_Annotation_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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(Annotation.class))
- {
- case EtypesPackage.ANNOTATION__SOURCE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case EtypesPackage.ANNOTATION__DETAILS:
- case EtypesPackage.ANNOTATION__CONTENTS:
- 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(EtypesPackage.Literals.ANNOTATION__DETAILS,
- EcoreFactory.eINSTANCE.create(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY)));
- }
-
-}
+/*
+ * 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.etypes.provider;
+
+import org.eclipse.emf.cdo.etypes.Annotation;
+import org.eclipse.emf.cdo.etypes.EtypesPackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+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.etypes.Annotation} object. <!-- begin-user-doc -->
+ *
+ * @since 4.0 <!-- end-user-doc -->
+ * @generated
+ */
+public class AnnotationItemProvider extends ModelElementItemProvider 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 AnnotationItemProvider(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);
+
+ addSourcePropertyDescriptor(object);
+ addReferencesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Source feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSourcePropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Annotation_source_feature"), //$NON-NLS-1$
+ getString("_UI_Annotation_source_description"), //$NON-NLS-1$
+ EtypesPackage.Literals.ANNOTATION__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the References feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addReferencesPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Annotation_references_feature"), //$NON-NLS-1$
+ getString("_UI_Annotation_references_description"), //$NON-NLS-1$
+ EtypesPackage.Literals.ANNOTATION__REFERENCES, true, false, true, null, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+ {
+ if (childrenFeatures == null)
+ {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(EtypesPackage.Literals.ANNOTATION__DETAILS);
+ childrenFeatures.add(EtypesPackage.Literals.ANNOTATION__CONTENTS);
+ }
+ 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 Annotation.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Annotation")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((Annotation)object).getSource();
+ return label == null || label.length() == 0 ? getString("_UI_Annotation_type") : //$NON-NLS-1$
+ getString("_UI_Annotation_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * 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(Annotation.class))
+ {
+ case EtypesPackage.ANNOTATION__SOURCE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case EtypesPackage.ANNOTATION__DETAILS:
+ case EtypesPackage.ANNOTATION__CONTENTS:
+ 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(EtypesPackage.Literals.ANNOTATION__DETAILS,
+ EcoreFactory.eINSTANCE.create(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY)));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java
index 2208ab439a..55b51505af 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java
@@ -1,273 +1,273 @@
-/*
- * 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.etypes.provider;
-
-import org.eclipse.emf.cdo.edit.CDOEditPlugin;
-import org.eclipse.emf.cdo.etypes.EtypesPackage;
-import org.eclipse.emf.cdo.etypes.util.EtypesAdapterFactory;
-
-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 -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated
- */
-public class EtypesItemProviderAdapterFactory extends EtypesAdapterFactory 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(
- CDOEditPlugin.INSTANCE, EtypesPackage.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 EtypesItemProviderAdapterFactory()
- {
- 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.etypes.Annotation} instances. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected AnnotationItemProvider annotationItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.emf.cdo.etypes.Annotation}. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- @Override
- public Adapter createAnnotationAdapter()
- {
- if (annotationItemProvider == null)
- {
- annotationItemProvider = new AnnotationItemProvider(this);
- }
-
- return annotationItemProvider;
- }
-
- /**
- * 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 (annotationItemProvider != null)
- annotationItemProvider.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.etypes.provider;
+
+import org.eclipse.emf.cdo.edit.CDOEditPlugin;
+import org.eclipse.emf.cdo.etypes.EtypesPackage;
+import org.eclipse.emf.cdo.etypes.util.EtypesAdapterFactory;
+
+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 -->
+ *
+ * @since 4.0 <!-- end-user-doc -->
+ * @generated
+ */
+public class EtypesItemProviderAdapterFactory extends EtypesAdapterFactory 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(
+ CDOEditPlugin.INSTANCE, EtypesPackage.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 EtypesItemProviderAdapterFactory()
+ {
+ 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.etypes.Annotation} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AnnotationItemProvider annotationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.cdo.etypes.Annotation}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAnnotationAdapter()
+ {
+ if (annotationItemProvider == null)
+ {
+ annotationItemProvider = new AnnotationItemProvider(this);
+ }
+
+ return annotationItemProvider;
+ }
+
+ /**
+ * 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 (annotationItemProvider != null)
+ annotationItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
index 8704be6a23..4ef68d133c 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
@@ -1,177 +1,177 @@
-/*
- * 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.etypes.provider;
-
-import org.eclipse.emf.cdo.etypes.EtypesFactory;
-import org.eclipse.emf.cdo.etypes.EtypesPackage;
-import org.eclipse.emf.cdo.etypes.ModelElement;
-
-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.ItemProviderAdapter;
-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.etypes.ModelElement} object. <!-- begin-user-doc
- * -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated
- */
-public class ModelElementItemProvider extends ItemProviderAdapter 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 ModelElementItemProvider(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(EtypesPackage.Literals.MODEL_ELEMENT__ANNOTATIONS);
- }
- 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 the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- return getString("_UI_ModelElement_type"); //$NON-NLS-1$
- }
-
- /**
- * 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(ModelElement.class))
- {
- case EtypesPackage.MODEL_ELEMENT__ANNOTATIONS:
- 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(EtypesPackage.Literals.MODEL_ELEMENT__ANNOTATIONS,
- EtypesFactory.eINSTANCE.createAnnotation()));
- }
-
- /**
- * 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.etypes.provider;
+
+import org.eclipse.emf.cdo.etypes.EtypesFactory;
+import org.eclipse.emf.cdo.etypes.EtypesPackage;
+import org.eclipse.emf.cdo.etypes.ModelElement;
+
+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.ItemProviderAdapter;
+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.etypes.ModelElement} object. <!-- begin-user-doc
+ * -->
+ *
+ * @since 4.0 <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelElementItemProvider extends ItemProviderAdapter 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 ModelElementItemProvider(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(EtypesPackage.Literals.MODEL_ELEMENT__ANNOTATIONS);
+ }
+ 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 the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ return getString("_UI_ModelElement_type"); //$NON-NLS-1$
+ }
+
+ /**
+ * 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(ModelElement.class))
+ {
+ case EtypesPackage.MODEL_ELEMENT__ANNOTATIONS:
+ 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(EtypesPackage.Literals.MODEL_ELEMENT__ANNOTATIONS,
+ EtypesFactory.eINSTANCE.createAnnotation()));
+ }
+
+ /**
+ * 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.edit/src/org/eclipse/emf/cdo/etypes/provider/package-info.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/package-info.java
index 376ff6237d..48dffc32d1 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/package-info.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/package-info.java
@@ -1,18 +1,18 @@
-/*
- * 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
- */
-
-/**
- * The generated EMF edit support of the CDO system data types and native annotations.
- *
- * @apiviz.exclude .*
- */
-package org.eclipse.emf.cdo.etypes.provider;
-
+/*
+ * 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
+ */
+
+/**
+ * The generated EMF edit support of the CDO system data types and native annotations.
+ *
+ * @apiviz.exclude .*
+ */
+package org.eclipse.emf.cdo.etypes.provider;
+
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/Messages.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/Messages.java
index 4b7854debd..3e6fac4b4f 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/Messages.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/Messages.java
@@ -1,41 +1,41 @@
-/*
- * 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:
- * Victor Roldan Betancort - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.emf.cdo.internal.edit.messages;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author Victor Roldan Betancort
- */
-public class Messages
-{
- private static final String BUNDLE_NAME = "org.eclipse.emf.cdo.internal.edit.messages.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages()
- {
- }
-
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-}
+/*
+ * 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.emf.cdo.internal.edit.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.emf.cdo.internal.edit.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/messages.properties b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/messages.properties
index 0794385d27..d723c95db9 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/messages.properties
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/internal/edit/messages/messages.properties
@@ -1,44 +1,44 @@
-# 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:
-# Victor Roldan Betancort - initial API and implementation
-# Eike Stepper - maintenance
-
-CDOItemProviderAdapter.0=CDO
-CDOItemProviderAdapter.1=ID
-CDOItemProviderAdapter.10=View
-CDOItemProviderAdapter.11=View
-CDOItemProviderAdapter.12=The view of this object
-CDOItemProviderAdapter.13=Container
-CDOItemProviderAdapter.14=Container
-CDOItemProviderAdapter.15=The container of this object
-CDOItemProviderAdapter.16=DirectResource
-CDOItemProviderAdapter.17=Direct Resource
-CDOItemProviderAdapter.18=The direct resource of this object
-CDOItemProviderAdapter.19=ReadLocked
-CDOItemProviderAdapter.2=ID
-CDOItemProviderAdapter.20=Read Locked
-CDOItemProviderAdapter.21=Shows if this object is read-locked
-CDOItemProviderAdapter.22=WriteLocked
-CDOItemProviderAdapter.23=Write Locked
-CDOItemProviderAdapter.24=Shows if this object is write-locked
-CDOItemProviderAdapter.25=Adapters
-CDOItemProviderAdapter.26=Adapters
-CDOItemProviderAdapter.27=The list of adapters attached to this object
-CDOItemProviderAdapter.28=ChangeSubscriptionPolicies
-CDOItemProviderAdapter.29=Change Subscription Policies
-CDOItemProviderAdapter.3=The CDOID uniquely identifies this object in the repository
-CDOItemProviderAdapter.30=The change subscription policies associated with the underlying view of this object
-CDOItemProviderAdapter.31=URI
-CDOItemProviderAdapter.32=URI
-CDOItemProviderAdapter.33=URI for this CDOObject
-CDOItemProviderAdapter.4=Version
-CDOItemProviderAdapter.5=Version
-CDOItemProviderAdapter.6=The version of this object
-CDOItemProviderAdapter.7=State
-CDOItemProviderAdapter.8=State
-CDOItemProviderAdapter.9=The local state of this 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+CDOItemProviderAdapter.0=CDO
+CDOItemProviderAdapter.1=ID
+CDOItemProviderAdapter.10=View
+CDOItemProviderAdapter.11=View
+CDOItemProviderAdapter.12=The view of this object
+CDOItemProviderAdapter.13=Container
+CDOItemProviderAdapter.14=Container
+CDOItemProviderAdapter.15=The container of this object
+CDOItemProviderAdapter.16=DirectResource
+CDOItemProviderAdapter.17=Direct Resource
+CDOItemProviderAdapter.18=The direct resource of this object
+CDOItemProviderAdapter.19=ReadLocked
+CDOItemProviderAdapter.2=ID
+CDOItemProviderAdapter.20=Read Locked
+CDOItemProviderAdapter.21=Shows if this object is read-locked
+CDOItemProviderAdapter.22=WriteLocked
+CDOItemProviderAdapter.23=Write Locked
+CDOItemProviderAdapter.24=Shows if this object is write-locked
+CDOItemProviderAdapter.25=Adapters
+CDOItemProviderAdapter.26=Adapters
+CDOItemProviderAdapter.27=The list of adapters attached to this object
+CDOItemProviderAdapter.28=ChangeSubscriptionPolicies
+CDOItemProviderAdapter.29=Change Subscription Policies
+CDOItemProviderAdapter.3=The CDOID uniquely identifies this object in the repository
+CDOItemProviderAdapter.30=The change subscription policies associated with the underlying view of this object
+CDOItemProviderAdapter.31=URI
+CDOItemProviderAdapter.32=URI
+CDOItemProviderAdapter.33=URI for this CDOObject
+CDOItemProviderAdapter.4=Version
+CDOItemProviderAdapter.5=Version
+CDOItemProviderAdapter.6=The version of this object
+CDOItemProviderAdapter.7=State
+CDOItemProviderAdapter.8=State
+CDOItemProviderAdapter.9=The local state of this object

Back to the top