Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.edit')
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_contents_EObject.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOBinaryResource.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOFileResource.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOResourceLeaf.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResource.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResouurce.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOBinaryResource.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOFileResource.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOResourceLeaf.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResource.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResouurce.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/plugin.properties8
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java145
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOFileResourceItemProvider.java115
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceFolderItemProvider.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceLeafItemProvider.java115
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOTextResourceItemProvider.java144
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java56
21 files changed, 601 insertions, 9 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 fbb5be44fe..6fbe9601d0 100644
--- a/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.edit/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.edit; singleton:=true
-Bundle-Version: 4.0.100.qualifier
+Bundle-Version: 4.1.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.4.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.edit;version="4.0.100",
- org.eclipse.emf.cdo.eresource.provider;version="4.0.100",
- org.eclipse.emf.cdo.etypes.provider;version="4.0.100",
- org.eclipse.emf.cdo.internal.edit.messages;version="4.0.100";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.edit;version="4.1.0",
+ org.eclipse.emf.cdo.eresource.provider;version="4.1.0",
+ org.eclipse.emf.cdo.etypes.provider;version="4.1.0",
+ org.eclipse.emf.cdo.internal.edit.messages;version="4.1.0";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_contents_EObject.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_contents_EObject.gif
new file mode 100644
index 0000000000..b2556694e4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateAnnotation_contents_EObject.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOBinaryResource.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOBinaryResource.gif
new file mode 100644
index 0000000000..1dbde94c82
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOBinaryResource.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOFileResource.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOFileResource.gif
new file mode 100644
index 0000000000..305fa05b3c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOFileResource.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOResourceLeaf.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOResourceLeaf.gif
new file mode 100644
index 0000000000..9a441d452d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOResourceLeaf.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResource.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResource.gif
new file mode 100644
index 0000000000..d2845b4816
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResource.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResouurce.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResouurce.gif
new file mode 100644
index 0000000000..305fa05b3c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/ctool16/CreateCDOResourceFolder_nodes_CDOTextResouurce.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOBinaryResource.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOBinaryResource.gif
new file mode 100644
index 0000000000..caf2804510
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOBinaryResource.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOFileResource.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOFileResource.gif
new file mode 100644
index 0000000000..48e3cf2268
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOFileResource.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOResourceLeaf.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOResourceLeaf.gif
new file mode 100644
index 0000000000..338fb8d9a7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOResourceLeaf.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResource.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResource.gif
new file mode 100644
index 0000000000..8a5c70cbd7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResource.gif
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResouurce.gif b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResouurce.gif
new file mode 100644
index 0000000000..48e3cf2268
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/icons/full/obj16/CDOTextResouurce.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 bad352ee1a..bd9c8ffe37 100644
--- a/plugins/org.eclipse.emf.cdo.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.edit/plugin.properties
@@ -52,3 +52,11 @@ _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/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
new file mode 100644
index 0000000000..9de2952fc2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOBinaryResourceItemProvider.java
@@ -0,0 +1,145 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+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
+ */
+ @Override
+ public String getText(Object object)
+ {
+ String label = ((CDOBinaryResource)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOBinaryResource_type") : //$NON-NLS-1$
+ getString("_UI_CDOBinaryResource_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(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/CDOFileResourceItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOFileResourceItemProvider.java
new file mode 100644
index 0000000000..cd03523df5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOFileResourceItemProvider.java
@@ -0,0 +1,115 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOFileResource;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.eresource.CDOFileResource} object. <!--
+ * begin-user-doc -->
+ *
+ * @since 4.1
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ */
+public class CDOFileResourceItemProvider 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 CDOFileResourceItemProvider(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 returns CDOFileResource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOFileResource")); //$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 = ((CDOFileResource<?>)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOFileResource_type") : //$NON-NLS-1$
+ getString("_UI_CDOFileResource_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);
+ 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 91faef774c..88a9a8356c 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
@@ -35,8 +35,9 @@ import java.util.List;
/**
* This is the item provider adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
+ * begin-user-doc -->
*
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
* @generated
* @since 2.0
*/
@@ -173,6 +174,12 @@ public class CDOResourceFolderItemProvider extends CDOResourceNodeItemProvider i
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 9ef3e5f8a0..8b29d57b1d 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
@@ -37,11 +37,12 @@ import java.util.List;
/**
* This is the item provider adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResource} object. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
+ * -->
*
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
* @generated
*/
-public class CDOResourceItemProvider extends CDOResourceNodeItemProvider implements IEditingDomainItemProvider,
+public class CDOResourceItemProvider extends CDOResourceLeafItemProvider implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
{
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceLeafItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceLeafItemProvider.java
new file mode 100644
index 0000000000..64d5b1b1a6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceLeafItemProvider.java
@@ -0,0 +1,115 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResourceLeaf} object. <!--
+ * begin-user-doc -->
+ *
+ * @since 4.1
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ */
+public class CDOResourceLeafItemProvider 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 CDOResourceLeafItemProvider(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 returns CDOResourceLeaf.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOResourceLeaf")); //$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 = ((CDOResourceLeaf)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOResourceLeaf_type") : //$NON-NLS-1$
+ getString("_UI_CDOResourceLeaf_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);
+ 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/CDOResourceNodeItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java
index ac4e40d7bf..c2246391a1 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
@@ -38,8 +38,9 @@ import java.util.List;
/**
* This is the item provider adapter for a {@link org.eclipse.emf.cdo.eresource.CDOResourceNode} object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
+ * begin-user-doc -->
*
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
* @generated
* @since 2.0
*/
diff --git a/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOTextResourceItemProvider.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOTextResourceItemProvider.java
new file mode 100644
index 0000000000..8f41423141
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOTextResourceItemProvider.java
@@ -0,0 +1,144 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.emf.cdo.eresource.provider;
+
+import org.eclipse.emf.cdo.eresource.CDOTextResource;
+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.CDOTextResource} object. <!--
+ * begin-user-doc -->
+ *
+ * @since 4.1
+ * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
+ * @generated
+ */
+public class CDOTextResourceItemProvider 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 CDOTextResourceItemProvider(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_CDOTextResource_contents_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_CDOTextResource_contents_feature", "_UI_CDOTextResource_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EresourcePackage.Literals.CDO_TEXT_RESOURCE__CONTENTS, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns CDOTextResource.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object)
+ {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CDOTextResource")); //$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 = ((CDOTextResource)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_CDOTextResource_type") : //$NON-NLS-1$
+ getString("_UI_CDOTextResource_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(CDOTextResource.class))
+ {
+ case EresourcePackage.CDO_TEXT_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/EresourceItemProviderAdapterFactory.java b/plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/EresourceItemProviderAdapterFactory.java
index 7998be292c..31a995f813 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
@@ -155,6 +155,58 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory
}
/**
+ * 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
@@ -294,6 +346,10 @@ public class EresourceItemProviderAdapterFactory extends EresourceAdapterFactory
cdoResourceFolderItemProvider.dispose();
if (cdoResourceItemProvider != null)
cdoResourceItemProvider.dispose();
+ if (cdoBinaryResourceItemProvider != null)
+ cdoBinaryResourceItemProvider.dispose();
+ if (cdoTextResourceItemProvider != null)
+ cdoTextResourceItemProvider.dispose();
}
}

Back to the top