It's all about the answers!

Ask a question

client SDK - IWorkspace from IFileItemHandle


Bernd van Oostrum (21725371) | asked Nov 29 '19, 7:59 a.m.
Hi,

Given an opened file, I'd like to retrieve the RTC Repository Workspace it is based on.
Can anyone share how to do this using the client SDK?

Regards,
Bernd.

Accepted answer


permanent link
Shashikant Padur (4.2k27) | answered Dec 02 '19, 11:23 p.m.
JAZZ DEVELOPER

IShareable shareable = FileSystemCore.getSharingManager().findShareable(fullPath, ResourceType.FILE);

IShare share = shareable.getShare();
ISharingDescriptor sharingDescriptor = share.getSharingDescriptor();
IWorkspaceHandle workspaceHandle = (IWorkspaceHandle) sharingDescriptor.getConnectionHandle();

Bernd van Oostrum selected this answer as the correct answer

Comments
Bernd van Oostrum commented Dec 03 '19, 4:14 a.m.
Many thanks Shashikant!

2 other answers



permanent link
Ralph Schoon (63.1k33645) | answered Dec 02 '19, 6:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Bernd,

please provide more context.

permanent link
Bernd van Oostrum (21725371) | answered Dec 02 '19, 7:42 a.m.

 
Hi Ralph,

The plugin I'm working on will check for a file in the sandbox (= based on the development-stream), if it matches the version from the production stream. If not, the plugin will notify the developer as it means the version he will start working on has been changed in the current release, by someone else.

As a start, I need to know from which stream the IFileItemHandle is derived (= the file is opened in the sandbox, but to which repository workspace is it connected?)

I could also check all streams for the file and then compare them (which is what I have implemented now as a workaround), but that's the other way around. I want to start from the opened file...

Best regards,
Bernd.

Your answer


Register or to post 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.