Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-24 10:46:30 +0000
committerEike Stepper2012-09-24 10:46:30 +0000
commit6a638ab57dd982c3164a172e99ce8c064953b006 (patch)
tree7857c4e372c7dc33a6055a120def7c3731a27178 /plugins/org.eclipse.emf.cdo.transfer.workspace.ui
parent5099a29f7a689840273b7c75102ed404a278c6ac (diff)
downloadcdo-6a638ab57dd982c3164a172e99ce8c064953b006.tar.gz
cdo-6a638ab57dd982c3164a172e99ce8c064953b006.tar.xz
cdo-6a638ab57dd982c3164a172e99ce8c064953b006.zip
[388928] Develop a resource transfer framework
https://bugs.eclipse.org/bugs/show_bug.cgi?id=388928
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.transfer.workspace.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer.workspace.ui/src/org/eclipse/emf/cdo/transfer/internal/workspace/WorkspaceUIProvider.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.transfer.workspace.ui/src/org/eclipse/emf/cdo/transfer/internal/workspace/WorkspaceUIProvider.java b/plugins/org.eclipse.emf.cdo.transfer.workspace.ui/src/org/eclipse/emf/cdo/transfer/internal/workspace/WorkspaceUIProvider.java
index d07f9f5eba..d8712413bb 100644
--- a/plugins/org.eclipse.emf.cdo.transfer.workspace.ui/src/org/eclipse/emf/cdo/transfer/internal/workspace/WorkspaceUIProvider.java
+++ b/plugins/org.eclipse.emf.cdo.transfer.workspace.ui/src/org/eclipse/emf/cdo/transfer/internal/workspace/WorkspaceUIProvider.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.cdo.transfer.spi.workspace.WorkspaceTransferSystem;
import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -62,7 +63,8 @@ public class WorkspaceUIProvider implements TransferUIProvider
for (int i = 0; i < resources.length; i++)
{
IResource resource = resources[i];
- CDOTransferElement element = WorkspaceTransferSystem.INSTANCE.getElement(resource.getFullPath());
+ IPath path = resource.getFullPath();
+ CDOTransferElement element = WorkspaceTransferSystem.INSTANCE.getElement(path);
result.add(element);
}
@@ -74,7 +76,13 @@ public class WorkspaceUIProvider implements TransferUIProvider
public CDOTransferElement convertTransferTarget(Object target)
{
- // TODO: implement WorkspaceUIProvider.convertTransferTarget(target)
+ if (target instanceof IResource)
+ {
+ IResource resource = (IResource)target;
+ IPath path = resource.getFullPath();
+ return WorkspaceTransferSystem.INSTANCE.getElement(path);
+ }
+
return null;
}

Back to the top