Community
Participate
Working Groups
Build 20020328 I have the following code pattern (non-essential aspects snipped out). When I do a search for references to ActionGroup.updateActionBars(), it finds them all. However, if I select the updateActionBars() reference in ResourceNavigator.updateActionBars(IStructuredSelection) and search for references, it matches the reference just selected (correct) and 2 of the 5 refs in ResourceNavigatorActionGroup.updateActionBars(). Either it should match none of these (if the search means all refs to ResourceNavigatorActionGroup.updateActionBars()) or all of them (if the search includes all refs to ActionGroup.updateActionBars()). public class ActionGroup { public void updateActionBars(); } public class ResourceNavigator { protected ResourceNavigatorActionGroup actionGroup; protected void updateActionBars(IStructuredSelection selection) { actionGroup.setContext(new ActionContext(selection)); actionGroup.updateActionBars(); } } public class ResourceNavigatorActionGroup extends ActionGroup { // these all directly subclass ActionGroup private GotoActionGroup gotoGroup; private OpenActionGroup openGroup; private RefactorActionGroup refactorGroup; private SortAndFilterActionGroup sortAndFilterGroup; private WorkspaceActionGroup workspaceGroup; /** * Overrides the super implementation to delegate to the subgroups. */ public void updateActionBars() { gotoGroup.updateActionBars(); openGroup.updateActionBars(); refactorGroup.updateActionBars(); sortAndFilterGroup.updateActionBars(); workspaceGroup.updateActionBars(); } }
The 2 refs matched above in ResourceNavigatorActionGroup.updateActionBars() were: openGroup.updateActionBars(); workspaceGroup.updateActionBars(); The other 3 were not matched.
Created attachment 533 [details] Export.zip containing the relevant sources
The search means all refs to ResourceNavigationActionGroup.updateActionBars() or one of its superclasses (in this case ActionGroup.updateActionBars()) The 3 method references gotoGroup.updateActionBars(), refactorGroup.updateActionBars() and sortAndFilterGroup.updateActionBars() are not references to ActionGroup.updateActionBars() since the respective receiver types overrides updateActionBars(). So matching one of this 3 references would be incorrect since the receiver types are not a ResourceNavigationActionGroup or an ActionGroup.
Closed again... incorrectly marked for verification.