Community
Participate
Working Groups
When applying filters to the Cross References view, it clears the view if the part focus is not the editor for the file to which the cross references apply. For examplem, if you are looking at a file in an editor, the cross references view will have a tree, even if it is a single branch, i.e. no relationships. Now click into the Cross References view so that the part tab becomes highlighted. Being careful not to click out of the Cross References View, bring up the View Menu from the drop down button in the Cross References toolbar and select the 'Filters...' button. In the presented dialog, check a relationship checkbox and click OK. The Cross References View is now emptied. This should not happen.
From Ben's investigation, when the xref view is refreshed from the filter dialog it goes through the runInUIThread(..) in XReferenceViewUpdateJob (this is also used to update the xref view after a build). In the case described when the bug was raised, the ISelection was an IStructuredSelection and the IWorkbenchPart was the last active editor. Therefore, when following through the logic and trying to calcualte the xrefs, an empty list was being returned because the selection wasn't a text selection. The fix is to check that if the last active editor is equal to the last editor recorded in the xref view, then to use the corresponding last selection (the xref view keeps a record of the last selection and last selected workbench part). Otherwise, retrieve the current selection. This keeps together the workbench part and selection which is what should happen - they shouldn't get out of sync.
XReferenceViewUpdateJob was created for bug 84317 to enable the xref view to update after a build. This is currently the only other mechanism which uses this so we have to make sure that the fix here doesn't break that. Unfortunately, I've been unable to find any tests for bug 84317 :-( so I'm writing those before applying this fix.
It turns out that the fix for this bug also fixes bug 107589. Bug 107589 is a serious problem, therefore I've integrated the fix. Just waiting for a clean build containing this fix to close the bug.
The fix can be found in the AJDT 1.3 stream: BUILD COMPLETE - build.81 Date of build: 08/25/2005 14:57:05 Time to build: 34 minutes 29 seconds Last changed: 08/25/2005 14:41:37 Last log entry: fix and manual tests for bugs 107719 and 107589 (same fix for both bugs) It's also been integrated into the following AJDT 1.2 build: BUILD COMPLETE - build.513 Date of build: 08/25/2005 15:32:57 Time to build: 32 minutes 7 seconds Last changed: 08/25/2005 15:06:14 Last log entry: fix and manual tests for bugs 107589 and 197719 (same fix for both bugs) Therefore, closing this bug as fixed.