Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-12-31 10:08:21 +0000
committerEike Stepper2012-12-31 10:08:21 +0000
commit0b8b349bf962fc03fa7c7db5203d3ab898ed7871 (patch)
tree10a57cdfd7eb0a839d0b610244b31d7d7b189e4f
parentb828bce0e95375216b08498779b309993bd71e4e (diff)
downloadcdo-0b8b349bf962fc03fa7c7db5203d3ab898ed7871.tar.gz
cdo-0b8b349bf962fc03fa7c7db5203d3ab898ed7871.tar.xz
cdo-0b8b349bf962fc03fa7c7db5203d3ab898ed7871.zip
[385325] CDOResourceFolderItemProvider.getParent(Object) should be moved
up to CDOResourceNodeItemProvider https://bugs.eclipse.org/bugs/show_bug.cgi?id=385325
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceItemProvider.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.edit/src/org/eclipse/emf/cdo/eresource/provider/CDOResourceNodeItemProvider.java20
2 files changed, 19 insertions, 19 deletions
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 98e552f13f..cba28a0838 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
@@ -217,24 +217,6 @@ public class CDOResourceItemProvider extends CDOResourceLeafItemProvider impleme
}
/**
- * 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 -->
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 0af61ed1f0..f4e9033792 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
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.eresource.provider;
+import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.CDOResourceNode;
import org.eclipse.emf.cdo.eresource.EresourcePackage;
@@ -39,7 +40,7 @@ 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
@@ -179,4 +180,21 @@ public class CDOResourceNodeItemProvider extends ItemProviderAdapter implements
return ((IChildCreationExtender)adapterFactory).getResourceLocator();
}
+ /**
+ * Returns the parent of the argument CDOResource
+ *
+ * @ADDED
+ * @since 4.2
+ */
+ @Override
+ public Object getParent(Object object)
+ {
+ CDOResourceNode resourceNode = (CDOResourceNode)object;
+ if (resourceNode.isRoot())
+ {
+ return ((CDOResource)resourceNode).getResourceSet();
+ }
+
+ return resourceNode.getFolder();
+ }
}

Back to the top