Community
Participate
Working Groups
3.1 RC4 See bug 101625: Had to disable cancelling due to NPEs.
Created attachment 23953 [details] possible fix
Created attachment 25830 [details] Better fix This is a better fix that also cancels a pending tree node expansion in tree depth > 2. Patch released to HEAD. Here's a class for manual testing. The first fix did not cancel the search when expanding toString in this caller hierarchy: take(Object) + run() - run2() - toString() ... + hashCode() public class CallHierarchyTest { public void take(Object o) { //start CH here } public void run() { take("A"); } void run2() { take("B"); } public String toString() { run(); run2(); return super.toString(); } public int hashCode() { run(); run2(); return super.hashCode(); } }
Markus, can you please step by an explain the patch to me. I don't see what the advantage is of creating the wrapper via an extension point now. Code wise it doesn't look too different.
Created attachment 25980 [details] Fix without extension point for adapter
Patch looks good for me. One little thing: shouldn't we assist in MethodWrapperWorkbenchAdapter that the methodWrapper is not null. Martin, can you please have a look as well ?
Yes, we could add an assert to check that the MethodWrapper is not null. However, this is currently guaranteed by construction and we also didn't have it in DeferredMethodWrapper. I'll add it when I release to HEAD. Explanation for Martin: The MethodWrapperWorkbenchAdapter is necessary because of the way the DeferredTreeContentManager determines the Jobs to cancel: - We request cancellation of the tree root MethodWrapper - The DeferredTreeContentManager asks all running jobs whether thy run on a child of the element to cancel. To determine the parent of a tree element, it tries to adapt each parent element to IWorkbenchAdapter and then asks the adapter for its parent.
patch reviewed, ok to release.
Released to 3.1.1. Released to HEAD with assert in MethodWrapperWorkbenchAdapter.
start verifying...
Verified that the first top level search any any search caused be expanding a node can be canceled. Verified on M20050831-1200 + plug-in export.