Remote FileitemHandle vs. local path only
3 answers
(1) how to get the remote IFileItem for one local code file when only
its local path is provided?
((IShareable)ResourcesPlugin.getWorkspace().getRoot().getFile
(path).getAdapter(IShareable.class)).getRemote();
(2) how to get local path when only the remote IFileItemHandle is
provided?
You need to know the remote workspace and component as well.
FileSystemCore.getSharingManager().findShareable
(FileSystemCore.getSharingManager().getDefaultCFARoot(), item, component,
workspace, monitor).getLocalFullPath();
- Dmitry
((IShareable)ResourcesPlugin.getWorkspace().getRoot().getFile
(path).getAdapter(IShareable.class)).getRemote();
it returns null with my input on path
"/project-name/src/package-name/class-name.java"
why is that result?
Either "project-name" is not shared, or "class-name.java" is a newly
added file that is not present on the server, or the file
"/project-name/src/package-name/class-name.java" does not exist at all.
- Dmitry