Emulate "Open Local File" action of ChangeExplorer
I want to emulate the "Open Local File" action provided in the ChangeExplorer view in my application. All I have is the change-set information. From my view, I'm able to programmatically open ChangeExplorer view giving it ChangeSetInput.
Now, I want to give another action in my view that would do the "Open Local File" action. Looked at SDK's OpenLocalFileAction class, which uses IShareable to open a file. How do I create an IShareable from a changeSet ? If that is possible, then I can use the OpenLocalFileAction directly. |
Accepted answer
IShareable doesn't map to a change set. A shareable represents a resource that is shared with RTC. This can be a file so you'll have to look into the change set to get the items.
ISharingManager sharingManager = FileSystemCore.getSharingManager(); With the sharing manager, you can use the items from the change set (the versionables) to find the shareable on disk. sharingManager.findShareables(versionableHandle, progressMonitor); Atul Kumar selected this answer as the correct answer
Comments
Atul Kumar
commented Jun 06 '14, 3:21 a.m.
Thanks Tim. I could achieve "Open Local File" action through following code:
|
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.