Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to get the IMethod when using diff

1. when we use the diff tool to compare two Java files, there will be a "box" at the top summarizing the methods that are different from the current ones. Is it possible to get the IMethod objects of these changed methods? I mean how to convert the DiffNode to IMethod (using Differencer.findDifferences will return a DiffNode of two states).

2. IChange.beforeState() and IChange.afterState() both return a IVersionableHandler that identifies a change state. We normally asked the repository for the content of these two states before making a diff. For example,
IWorkspaceManager.versionableManager().fetchCompleteState(IChange.beforeState(), monitor);


But when I use the following to get the before state's IShareable (locally), it still returns a non-null result:

FileSystemCore.getSharingManager().findShareables(FileSystemCore.getSharingManager().getDefaultCFARoot(),IChange.beforeState(), component, monitor);


Does it mean Jazz also persist the before/after state object locally?

Thanks in advance,
Owen

0 votes



One answer

Permanent link
But when I use the following to get the before state's IShareable
(locally), it still returns a non-null result:

FileSystemCore.getSharingManager().findShareables
(FileSystemCore.getSharingManager().getDefaultCFARoot

(),IChange.beforeState(),
component, monitor);


Does it mean Jazz also persist the before/after state object locally?


No. findShareables() looks up a shareable by itemId, it ignores the
stateId. So in fact you get back 2 shareables that are exactly the same.

- Dmitry

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,930

Question asked: Sep 18 '08, 12:44 p.m.

Question was seen: 5,364 times

Last updated: Sep 18 '08, 12:44 p.m.

Confirmation Cancel Confirm