Remote FileitemHandle vs. local path only
Dears,
Does anybody know (1) how to get the remote IFileItem for one local code file when only its local path is provided? (2) how to get local path when only the remote IFileItemHandle is provided? Thanks. |
3 answers
(1) how to get the remote IFileItem for one local code file when only ((IShareable)ResourcesPlugin.getWorkspace().getRoot().getFile (path).getAdapter(IShareable.class)).getRemote(); (2) how to get local path when only the remote IFileItemHandle is 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 it returns null with my input on path "/project-name/src/package-name/class-name.java" why is that result? |
((IShareable)ResourcesPlugin.getWorkspace().getRoot().getFile 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 |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.