diff --git a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileManager.java b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileManager.java index f633b13f951..fb4ea90eee2 100644 --- a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileManager.java +++ b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileManager.java @@ -33,6 +33,7 @@ public class JSchFileManager implements IRemoteFileManager { /** * @since 4.0 */ + @Override public String getDirectorySeparator() { return "/"; //$NON-NLS-1$ } @@ -44,12 +45,13 @@ public class JSchFileManager implements IRemoteFileManager { * org.eclipse.remote.core.IRemoteFileManager#getResource(java.lang. * String) */ + @Override public IFileStore getResource(String pathStr) { IPath path = new Path(pathStr); if (!path.isAbsolute()) { path = new Path(fConnection.getWorkingDirectory()).append(path); } - return new JschFileStore(JSchFileSystem.getURIFor(fConnection.getName(), path.toString())); + return JschFileStore.getInstance(JSchFileSystem.getURIFor(fConnection.getName(), path.toString())); } /* @@ -57,6 +59,7 @@ public class JSchFileManager implements IRemoteFileManager { * * @see org.eclipse.remote.core.IRemoteFileManager#toPath(java.net.URI) */ + @Override public String toPath(URI uri) { return uri.getPath(); } @@ -68,6 +71,7 @@ public class JSchFileManager implements IRemoteFileManager { * org.eclipse.remote.core.IRemoteFileManager#toURI(org.eclipse.core * .runtime.IPath) */ + @Override public URI toURI(IPath path) { try { return JSchFileSystem.getURIFor(fConnection.getName(), path.toString()); @@ -82,6 +86,7 @@ public class JSchFileManager implements IRemoteFileManager { * @see * org.eclipse.remote.core.IRemoteFileManager#toURI(java.lang.String) */ + @Override public URI toURI(String path) { return toURI(new Path(path)); } diff --git a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileSystem.java b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileSystem.java index 98a388fe608..2343b18b789 100644 --- a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileSystem.java +++ b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JSchFileSystem.java @@ -99,6 +99,16 @@ public class JSchFileSystem extends FileSystem { return true; } + /* + * (non-Javadoc) + * + * @see org.eclipse.core.filesystem.provider.FileSystem#getStore(org.eclipse.core.runtime.IPath) + */ + @Override + public IFileStore getStore(IPath path) { + return EFS.getNullFileSystem().getStore(path); + } + /* * (non-Javadoc) * @@ -115,14 +125,4 @@ public class JSchFileSystem extends FileSystem { return EFS.getNullFileSystem().getStore(uri); } } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.filesystem.provider.FileSystem#getStore(org.eclipse.core.runtime.IPath) - */ - @Override - public IFileStore getStore(IPath path) { - return null; - } } \ No newline at end of file diff --git a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JschFileStore.java b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JschFileStore.java index 6493afa25e6..d7af7c41e2f 100644 --- a/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JschFileStore.java +++ b/bundles/org.eclipse.remote.jsch.core/src/org/eclipse/remote/internal/jsch/core/JschFileStore.java @@ -44,8 +44,6 @@ import org.eclipse.remote.internal.jsch.core.commands.PutInfoCommand; import org.eclipse.remote.internal.jsch.core.messages.Messages; public class JschFileStore extends FileStore { - private static Map instanceMap = new HashMap(); - /** * Public factory method for obtaining JschFileStore instances. * @@ -64,11 +62,12 @@ public class JschFileStore extends FileStore { } } - // private final JSchConnection fConnection; + private static Map instanceMap = new HashMap(); + private final IPath fRemotePath; private final URI fURI; - public JschFileStore(URI uri) { + private JschFileStore(URI uri) { fURI = uri; fRemotePath = new Path(uri.getPath()); }