Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-01-04 20:00:09 +0000
committerEike Stepper2011-01-04 20:00:09 +0000
commit68c7086726a9a853a7aa0afd24d841fb83df3f24 (patch)
treed706d2f9967828999db4361c2aa43bff305dd0b0 /plugins
parentcbc8a6ec72e51b24de191f492640ea7d81d37413 (diff)
downloadcdo-68c7086726a9a853a7aa0afd24d841fb83df3f24.tar.gz
cdo-68c7086726a9a853a7aa0afd24d841fb83df3f24.tar.xz
cdo-68c7086726a9a853a7aa0afd24d841fb83df3f24.zip
[284307] Add support for streaming of large byte arrays / BLOB
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284307
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_details_EStringToStringMapEntry.gifbin0 -> 350 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateModelElement_annotations_Annotation.gifbin0 -> 585 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/Annotation.gifbin0 -> 554 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/plugin.properties6
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java (renamed from plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceEditPlugin.java)13
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.java187
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java275
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java177
-rw-r--r--plugins/org.eclipse.emf.cdo/model/eresource.genmodel2
-rw-r--r--plugins/org.eclipse.emf.cdo/model/etypes.genmodel54
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java32
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java19
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java1
16 files changed, 700 insertions, 78 deletions
diff --git a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
index 77eeac90ab..c0a283bc57 100644
--- a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.emf.cdo.eresource.provider.EresourceEditPlugin$Implementation
+Bundle-Activator: org.eclipse.emf.cdo.edit.CDOEditPlugin$Implementation
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
@@ -16,4 +16,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.edit;version="4.0.0",
org.eclipse.emf.cdo.eresource.provider;version="4.0.0",
+ org.eclipse.emf.cdo.etypes.provider;version="4.0.0",
org.eclipse.emf.cdo.internal.edit.messages;version="4.0.0";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_details_EStringToStringMapEntry.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_details_EStringToStringMapEntry.gif
new file mode 100644
index 0000000000..ecb89fffc7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_details_EStringToStringMapEntry.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateModelElement_annotations_Annotation.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateModelElement_annotations_Annotation.gif
new file mode 100644
index 0000000000..588cca4118
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateModelElement_annotations_Annotation.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/Annotation.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/Annotation.gif
new file mode 100644
index 0000000000..0df81a30b2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/Annotation.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
index ab735be95f..e48aafa356 100644
--- a/plugins/org.eclipse.emf.cdo.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
@@ -42,3 +42,9 @@ _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
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceEditPlugin.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
index 6b63a1296a..b708e140be 100644
--- a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceEditPlugin.java
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/edit/CDOEditPlugin.java
@@ -4,29 +4,30 @@
* 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;
+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 Eresource edit plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * This is the central singleton for the Etypes edit plugin. <!-- begin-user-doc -->
*
+ * @since 4.0 <!-- end-user-doc -->
* @generated
*/
-public final class EresourceEditPlugin extends EMFPlugin
+public final class CDOEditPlugin extends EMFPlugin
{
/**
* Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
- public static final EresourceEditPlugin INSTANCE = new EresourceEditPlugin();
+ public static final CDOEditPlugin INSTANCE = new CDOEditPlugin();
/**
* Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -40,7 +41,7 @@ public final class EresourceEditPlugin extends EMFPlugin
*
* @generated
*/
- public EresourceEditPlugin()
+ public CDOEditPlugin()
{
super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, });
}
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 bb62c92d03..5190675e83 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
@@ -10,6 +10,7 @@
*/
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;
@@ -74,7 +75,7 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory
* @generated
*/
protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(
- EresourceEditPlugin.INSTANCE, EresourcePackage.eNS_URI);
+ CDOEditPlugin.INSTANCE, EresourcePackage.eNS_URI);
/**
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!--
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
new file mode 100644
index 0000000000..0ec45211e5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/AnnotationItemProvider.java
@@ -0,0 +1,187 @@
+/**
+ * Copyright (c) 2004 - 2011 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);
+ }
+ 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_PropertyDescriptor_description", "_UI_Annotation_source_feature", "_UI_Annotation_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EtypesPackage.Literals.ANNOTATION__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
+ {
+ if (childrenFeatures == null)
+ {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(EtypesPackage.Literals.ANNOTATION__DETAILS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child)
+ {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * 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:
+ 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
new file mode 100644
index 0000000000..e8a3c03d93
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/EtypesItemProviderAdapterFactory.java
@@ -0,0 +1,275 @@
+/**
+ * Copyright (c) 2004 - 2011 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
new file mode 100644
index 0000000000..bdc97f81b3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/etypes/provider/ModelElementItemProvider.java
@@ -0,0 +1,177 @@
+/**
+ * Copyright (c) 2004 - 2011 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/model/eresource.genmodel b/plugins/org.eclipse.emf.cdo/model/eresource.genmodel
index b92f660d9a..a952b14dba 100644
--- a/plugins/org.eclipse.emf.cdo/model/eresource.genmodel
+++ b/plugins/org.eclipse.emf.cdo/model/eresource.genmodel
@@ -3,7 +3,7 @@
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText=""
modelDirectory="/org.eclipse.emf.cdo/src" editDirectory="/org.eclipse.emf.cdo.edit/src"
- editorDirectory="" modelPluginID="org.eclipse.emf.cdo" modelName="Eresource" editPluginClass="org.eclipse.emf.cdo.eresource.provider.EresourceEditPlugin"
+ editorDirectory="" modelPluginID="org.eclipse.emf.cdo" modelName="Eresource" editPluginClass="org.eclipse.emf.cdo.edit.CDOEditPlugin"
editorPluginClass="" updateClasspath="false" nonNLSMarkers="true" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject"
rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true"
codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore"
diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel
index d4e54e6c7c..e586d826fe 100644
--- a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel
+++ b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel
@@ -1,39 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.cdo/src" editDirectory="" editorDirectory="" modelPluginID="org.eclipse.emf.cdo" modelName="Etypes" editorPluginClass="" updateClasspath="false" nonNLSMarkers="true" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true" codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.cdo" featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" testsPluginID="org.eclipse.emf.cdo.edit" optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true">
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.cdo/src"
+ editDirectory="/org.eclipse.emf.cdo.edit/src" editorDirectory="" modelPluginID="org.eclipse.emf.cdo"
+ modelName="Etypes" editPluginClass="org.eclipse.emf.cdo.edit.CDOEditPlugin" editorPluginClass=""
+ updateClasspath="false" nonNLSMarkers="true" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject"
+ rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true"
+ codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.cdo"
+ featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" testsPluginID="org.eclipse.emf.cdo.editor"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
<foreignModel>etypes.ecore</foreignModel>
<modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
- <genPackages prefix="Etypes" basePackage="org.eclipse.emf.cdo" disposableProviderFactory="true" extensibleProviderFactory="true" childCreationExtenders="true">
- <ecorePackage href="etypes.ecore#/"/>
- <genDataTypes>
- <ecoreDataType href="etypes.ecore#//Blob"/>
- </genDataTypes>
- <genDataTypes>
- <ecoreDataType href="etypes.ecore#//Clob"/>
- </genDataTypes>
- <genClasses image="false">
- <ecoreClass href="etypes.ecore#//ModelElement"/>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="etypes.ecore#//ModelElement/annotations"/>
- </genFeatures>
- <genOperations>
- <ecoreOperation href="etypes.ecore#//ModelElement/getAnnotation"/>
- <genParameters>
- <ecoreParameter href="etypes.ecore#//ModelElement/getAnnotation/source"/>
- </genParameters>
+ <genPackages prefix="Etypes" basePackage="org.eclipse.emf.cdo" disposableProviderFactory="true"
+ extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="etypes.ecore#/">
+ <genDataTypes ecoreDataType="etypes.ecore#//Blob"/>
+ <genDataTypes ecoreDataType="etypes.ecore#//Clob"/>
+ <genClasses image="false" ecoreClass="etypes.ecore#//ModelElement">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etypes.ecore#//ModelElement/annotations"/>
+ <genOperations ecoreOperation="etypes.ecore#//ModelElement/getAnnotation">
+ <genParameters ecoreParameter="etypes.ecore#//ModelElement/getAnnotation/source"/>
</genOperations>
</genClasses>
- <genClasses>
- <ecoreClass href="etypes.ecore#//Annotation"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="etypes.ecore#//Annotation/source"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="etypes.ecore#//Annotation/details"/>
- </genFeatures>
- <genFeatures property="None" notify="false" createChild="false">
- <ecoreFeature xsi:type="ecore:EReference" href="etypes.ecore#//Annotation/modelElement"/>
- </genFeatures>
+ <genClasses ecoreClass="etypes.ecore#//Annotation">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etypes.ecore#//Annotation/source"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etypes.ecore#//Annotation/details"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference etypes.ecore#//Annotation/modelElement"/>
</genClasses>
</genPackages>
- <usedGenPackages href="../../../plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"/>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
index ac5ad767cd..83923f99bc 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java
@@ -116,9 +116,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public static EresourcePackage init()
{
if (isInited)
- {
return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI);
- }
// Obtain or create and register package
EresourcePackageImpl theEresourcePackage = (EresourcePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EresourcePackageImpl ? EPackage.Registry.INSTANCE
@@ -365,9 +363,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -412,9 +408,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -430,16 +424,16 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
// Set bounds for type parameters
// Add supertypes to classes
- cdoResourceFolderEClass.getESuperTypes().add(getCDOResourceNode());
- cdoResourceEClass.getESuperTypes().add(getCDOResourceNode());
+ cdoResourceFolderEClass.getESuperTypes().add(this.getCDOResourceNode());
+ cdoResourceEClass.getESuperTypes().add(this.getCDOResourceNode());
// Initialize classes and features; add operations and parameters
initEClass(cdoResourceNodeEClass, CDOResourceNode.class,
"CDOResourceNode", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
getCDOResourceNode_Folder(),
- getCDOResourceFolder(),
- getCDOResourceFolder_Nodes(),
+ this.getCDOResourceFolder(),
+ this.getCDOResourceFolder_Nodes(),
"folder", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResourceNode_Name(),
@@ -454,26 +448,26 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
"CDOResourceFolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
getCDOResourceFolder_Nodes(),
- getCDOResourceNode(),
- getCDOResourceNode_Folder(),
+ this.getCDOResourceNode(),
+ this.getCDOResourceNode_Folder(),
"nodes", null, 0, -1, CDOResourceFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- EOperation op = addEOperation(cdoResourceFolderEClass, getCDOResourceFolder(),
+ EOperation op = addEOperation(cdoResourceFolderEClass, this.getCDOResourceFolder(),
"addResourceFolder", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- op = addEOperation(cdoResourceFolderEClass, getCDOResource(), "addResource", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ op = addEOperation(cdoResourceFolderEClass, this.getCDOResource(), "addResource", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
initEClass(cdoResourceEClass, CDOResource.class,
"CDOResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEAttribute(
getCDOResource_ResourceSet(),
- getResourceSet(),
+ this.getResourceSet(),
"resourceSet", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_URI(),
- getURI(),
+ this.getURI(),
"uRI", null, 0, 1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getCDOResource_Contents(),
@@ -494,11 +488,11 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
"trackingModification", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_Errors(),
- getDiagnostic(),
+ this.getDiagnostic(),
"errors", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_Warnings(),
- getDiagnostic(),
+ this.getDiagnostic(),
"warnings", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(
getCDOResource_TimeStamp(),
@@ -528,7 +522,7 @@ public class EresourcePackageImpl extends EPackageImpl implements EresourcePacka
*/
protected void createDBStoreAnnotations()
{
- String source = "http://www.eclipse.org/CDO/DBStore"; //$NON-NLS-1$
+ String source = "http://www.eclipse.org/CDO/DBStore"; //$NON-NLS-1$
addAnnotation(getCDOResourceNode_Name(), source, new String[] { "columnType", "VARCHAR", //$NON-NLS-1$ //$NON-NLS-2$
"columnLength", "255" //$NON-NLS-1$ //$NON-NLS-2$
});
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
index d67637ef86..36fc61b7e3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java
@@ -102,9 +102,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
public static EtypesPackage init()
{
if (isInited)
- {
return (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI);
- }
// Obtain or create and register package
EtypesPackageImpl theEtypesPackage = (EtypesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EtypesPackageImpl ? EPackage.Registry.INSTANCE
@@ -235,9 +233,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -270,9 +266,7 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -288,18 +282,19 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
// Set bounds for type parameters
// Add supertypes to classes
- annotationEClass.getESuperTypes().add(getModelElement());
+ annotationEClass.getESuperTypes().add(this.getModelElement());
// Initialize classes and features; add operations and parameters
initEClass(modelElementEClass, ModelElement.class,
"ModelElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
getModelElement_Annotations(),
- getAnnotation(),
- getAnnotation_ModelElement(),
+ this.getAnnotation(),
+ this.getAnnotation_ModelElement(),
"annotations", null, 0, -1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- EOperation op = addEOperation(modelElementEClass, getAnnotation(), "getAnnotation", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ EOperation op = addEOperation(modelElementEClass, this.getAnnotation(),
+ "getAnnotation", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
addEParameter(op, theEcorePackage.getEString(), "source", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
initEClass(annotationEClass, Annotation.class,
@@ -315,8 +310,8 @@ public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage
"details", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getAnnotation_ModelElement(),
- getModelElement(),
- getModelElement_Annotations(),
+ this.getModelElement(),
+ this.getModelElement_Annotations(),
"modelElement", null, 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
// Initialize data types
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java
index 21b093ee21..b0d4374573 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/util/EtypesSwitch.java
@@ -97,9 +97,7 @@ public class EtypesSwitch<T>
ModelElement modelElement = (ModelElement)theEObject;
T result = caseModelElement(modelElement);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case EtypesPackage.ANNOTATION:
@@ -107,13 +105,9 @@ public class EtypesSwitch<T>
Annotation annotation = (Annotation)theEObject;
T result = caseAnnotation(annotation);
if (result == null)
- {
result = caseModelElement(annotation);
- }
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java
index 60a1738e93..2bc24043de 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.CDONotification;
import org.eclipse.emf.cdo.common.model.EMFUtil;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;

Back to the top