Community
Participate
Working Groups
I200311050952 I tried to search for references of a particular method and this is what happened: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.jface.window.ApplicationWindow$1.run (ApplicationWindow.java:444) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.window.ApplicationWindow.run (ApplicationWindow.java:441) at org.eclipse.ui.internal.WorkbenchWindow.run (WorkbenchWindow.java:1464) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyContentProvider.getChildr en(CallHierarchyContentProvider.java:72) at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren (AbstractTreeViewer.java:729) at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren (StructuredViewer.java:463) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren (StructuredViewer.java:567) at org.eclipse.jface.viewers.AbstractTreeViewer$1.run (AbstractTreeViewer.java:361) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren (AbstractTreeViewer.java:349) at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel (AbstractTreeViewer.java:926) at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel (AbstractTreeViewer.java:935) at org.eclipse.jface.viewers.AbstractTreeViewer$5.run (AbstractTreeViewer.java:809) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:810) at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged (AbstractTreeViewer.java:798) at org.eclipse.jface.viewers.ContentViewer.setInput (ContentViewer.java:238) at org.eclipse.jface.viewers.StructuredViewer.setInput (StructuredViewer.java:1004) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewer.setMethodWrapper (CallHierarchyViewer.java:70) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.updateView (CallHierarchyViewPart.java:914) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.refresh (CallHierarchyViewPart.java:577) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.setMethod (CallHierarchyViewPart.java:199) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI.openInViewPart (CallHierarchyUI.java:212) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI.open (CallHierarchyUI.java:199) at org.eclipse.jdt.internal.ui.callhierarchy.OpenCallHierarchyAction.run (OpenCallHierarchyAction.java:187) at org.eclipse.jdt.internal.ui.callhierarchy.OpenCallHierarchyAction.run (OpenCallHierarchyAction.java:126) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:196) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:172) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:542) at org.eclipse.jface.action.ActionContributionItem.access$4 (ActionContributionItem.java:494) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:466) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2187) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1877) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1611) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1594) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:765) at org.eclipse.core.launcher.Main.main(Main.java:599) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.PatternLocator.qualifiedSourceName (PatternLocator.java:84) at org.eclipse.jdt.internal.core.search.matching.PatternLocator.qualifiedSourceName (PatternLocator.java:82) at org.eclipse.jdt.internal.core.search.matching.PatternLocator.resolveLevelForType (PatternLocator.java:277) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevelAsSubtyp e(MethodLocator.java:260) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevel (MethodLocator.java:217) at org.eclipse.jdt.internal.core.search.matching.ClassFileMatchLocator.locateMatche s(ClassFileMatchLocator.java:79) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process (MatchLocator.java:860) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java:607) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java:644) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java:731) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:597) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:524) at org.eclipse.jdt.internal.corext.callhierarchy.CallerMethodWrapper.findChildren (CallerMethodWrapper.java:67) at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.performSearch (MethodWrapper.java:282) at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.doFindChildren (MethodWrapper.java:220) at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.getCalls (MethodWrapper.java:80) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyContentProvider$MethodWra pperRunnable.run(CallHierarchyContentProvider.java:40) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)
Any steps to reproduce?
not really..it is only happening on this on particular method which was a public method. It occurs when I press (CTRL+SHIFT+G) and when i choose display call hierarchy!
Can you please paste in the source for the method/class?
I have bad news I am afraid. I have forgotten which method it is. Although I do remember that I had compilation errors somewhere in my workspace not necessarily on the file/method I was searching for. Sorry! If I manage to reproduce I will make better notes!
Added protection if the enclosing type of a local type is null.
Verified.