API to determine local (not checked in) changes?
Srimanth Gunturi (206●12●5)
| asked Oct 24 '10, 12:56 a.m.
JAZZ DEVELOPER retagged Dec 16 '13, 12:18 p.m. by David Lafreniere (4.8k●7)
Hello,
Was wondering if there is any public API to determine the presence of and/or details about files not checked in? We need to do our operation only when no changes have been made to the workspace. All the API I have seen are to do with ChangeSets, and when the user does not check-in, there is no changeset. Regards, Srimanth. |
8 answers
Geoffrey Clemm (30.1k●3●30●35)
| answered Oct 24 '10, 9:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Note that the RTC repository has no notion of a "checked out file" (in
RTC, that is a client-side only concept). So you'll be looking for an Eclipse client API call, not a server API call. Cheers, Geoff On 10/24/2010 12:56 AM, Srimanth Gunturi wrote: Hello, |
Srimanth
The API you want is the ILocalChangeManager which can be obtain using FileSystemCore.getSharingManager().getLocalChanegManager(). Michael Srimanth Gunturi wrote: Hello, |
Hi,
I'm facing the same problem. When I try to use FileSystemCore I've always get some null object. For example if I use FileSystemCore.getSharingManager.allShares I got an empty IShare array, and every try I made for findShareable returns null. How do I have to use FileSystemCore in order to have these objects? I've seen there is a startUp method, how it has to be used? Thanks, Michele. Srimanth Hello, |
Are you using the plain java client? Have you loaded content from the repository? You won't get any shares until something is either loaded from the repository or shared.
|
Yes I'm using plain java client. I've a workspace repository and I've load on a local eclipse workspace using RTC eclipse client. Do I have do load repository using java plain api in order to use these methods?
Thanks, Michele. Are you using the plain java client? Have you loaded content from the repository? You won't get any shares until something is either loaded from the repository or shared. |
Technically you don't but it would be less error prone if you did. I would suggest trying to do the load using the plain java client and see if you can access the info after that.
|
It seems that FileSystemCore does not work properly with me. I've obtained ISharable object but only using ISandbox.findSharable and not using ISharingManager.findSharable/s. And also I can't get any ILocalChange using ILocalChangeManager.getPendingChanges.
Here is my code:
I've obtained IWorkspaceHandle and IComponentHandle using queries. Can you see something I'm doing wrong using ISharingManager? Thanks Michele. |
I think I've found the problem: if I use ISandbox.allShares (although I don't use the IShare[] returned object) then getPendingChanges works.
I really don't understand which link exists between the two methods... I also remove FileSystemCore.startUp() method. It seems to do nothing for me... |
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.