Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-13 10:53:03 +0000
committerEike Stepper2012-09-13 10:53:03 +0000
commit60bd9db3a11ef8619f73069628e3317fe6bfb288 (patch)
tree23b461e622959fd3ea72b05d6d7b1a9db6eb13bf /plugins/org.eclipse.emf.cdo.transfer/src
parent7e37ab497ef46dfd7441815b17df74609f8ebb72 (diff)
downloadcdo-60bd9db3a11ef8619f73069628e3317fe6bfb288.tar.gz
cdo-60bd9db3a11ef8619f73069628e3317fe6bfb288.tar.xz
cdo-60bd9db3a11ef8619f73069628e3317fe6bfb288.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/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/spi/transfer/FileSystemTransferSystem.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/transfer/CDOTransfer.java14
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/spi/transfer/FileSystemTransferSystem.java b/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/spi/transfer/FileSystemTransferSystem.java
index 29abe67eaa..0b3ef6caaf 100644
--- a/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/spi/transfer/FileSystemTransferSystem.java
+++ b/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/spi/transfer/FileSystemTransferSystem.java
@@ -37,6 +37,8 @@ import java.io.Writer;
*/
public class FileSystemTransferSystem extends CDOTransferSystem
{
+ public static final FileSystemTransferSystem INSTANCE = new FileSystemTransferSystem();
+
public static final String TYPE = "fs";
public FileSystemTransferSystem()
diff --git a/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/transfer/CDOTransfer.java b/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/transfer/CDOTransfer.java
index ed1f6b3c0a..dedc0d42d9 100644
--- a/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/transfer/CDOTransfer.java
+++ b/plugins/org.eclipse.emf.cdo.transfer/src/org/eclipse/emf/cdo/transfer/CDOTransfer.java
@@ -188,15 +188,17 @@ public class CDOTransfer implements INotifier
protected CDOTransferType getTransferType(CDOTransferElement source)
{
- CDOTransferType type = source.getSystem().getDefaultTransferType(source);
- if (type == CDOTransferType.UNKNOWN)
+ if (source.isDirectory())
{
- if (modelTransferContext.hasResourceFactory(source))
- {
- return CDOTransferType.MODEL;
- }
+ return CDOTransferType.FOLDER;
+ }
+
+ if (modelTransferContext.hasResourceFactory(source))
+ {
+ return CDOTransferType.MODEL;
}
+ CDOTransferType type = sourceSystem.getDefaultTransferType(source);
if (type == CDOTransferType.UNKNOWN)
{
type = getDefaultTransferType();

Back to the top