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,
But when I use the following to get the before state's IShareable (locally), it still returns a non-null result:
Does it mean Jazz also persist the before/after state object locally?
Thanks in advance,
Owen
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
One answer
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