Community
Participate
Working Groups
eclipse.buildId=I20050118-1015 1. Import a binary plugin with content like jdt.ui 2. Open SurroundWithTryCatchAnalyzer 3. Perform a call hierarchy on getExceptions 4. Delete the jdt.ui project (although my original scenario did an extract from CVS) 5. Select a member in the call hierarchy Notice the .log filling up with: Java Model Exception: Java Model Status [org.eclipse.jdt.ui does not exist] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:527) at org.eclipse.jdt.internal.core.JavaProject.buildStructure(JavaProject.java:336) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:203) at org.eclipse.jdt.internal.core.Openable.openParent(Openable.java:420) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:192) at org.eclipse.jdt.internal.core.JarPackageFragment.generateInfos(JarPackageFragment.java:113) at org.eclipse.jdt.internal.core.Openable.openParent(Openable.java:420) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:192) at org.eclipse.jdt.internal.core.BinaryMember.generateInfos(BinaryMember.java:46) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:547) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:291) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:277) at org.eclipse.jdt.internal.core.BinaryMethod.getFlags(BinaryMethod.java:146) at org.eclipse.jdt.internal.corext.util.JdtFlags.isEnum(JdtFlags.java:159) at org.eclipse.jdt.internal.corext.refactoring.structure.PushDownRefactoring.isPushable(PushDownRefactoring.java:317) at org.eclipse.jdt.internal.corext.refactoring.structure.PushDownRefactoring.areAllPushable(PushDownRefactoring.java:226) at org.eclipse.jdt.internal.corext.refactoring.structure.PushDownRefactoring.isAvailable(PushDownRefactoring.java:306) at org.eclipse.jdt.ui.actions.PushDownAction.canEnable(PushDownAction.java:177) at org.eclipse.jdt.ui.actions.PushDownAction.selectionChanged(PushDownAction.java:93) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:200) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged(SelectionDispatchAction.java:195) at org.eclipse.jdt.internal.ui.typehierarchy.SelectionProviderMediator.fireSelectionChanged(SelectionProviderMediator.java:129) at org.eclipse.jdt.internal.ui.typehierarchy.SelectionProviderMediator.doSelectionChanged(SelectionProviderMediator.java:110) at org.eclipse.jdt.internal.ui.typehierarchy.SelectionProviderMediator$InternalListener.selectionChanged(SelectionProviderMediator.java:39) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:163) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1061) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:161) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1667) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:935) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:961) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:364) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2810) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2455) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1575) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1541) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:287) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:274) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.basicRun(Main.java:255) at org.eclipse.core.launcher.Main.run(Main.java:811) at org.eclipse.core.launcher.Main.main(Main.java:795)
Eclipse 3.1 RC2: I have the same behavoir during refactoring of method signatures. If "call hierarchy" was caled for some method, and then the signature of this method was changed, then I have error if I try to click somewhere in the method call hierarchy view: Java Model Exception: Java Model Status [rotateByte(byte, int, int) {key=Lde/ loskutov/ai/impl/delta/DeltaUtils;.rotateByte(BII)B} [in DeltaUtils [in [Working copy] DeltaUtils.java [in de.loskutov.ai.impl.delta [in src [in Optimizer]]]]] does not exist] at org.eclipse.jdt.internal.core.JavaElement. newNotPresentException(JavaElement.java:468) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement. java:499) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement. java:232) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement. java:218) at org.eclipse.jdt.internal.core.Member.getNameRange(Member.java:247) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI. openInEditor(CallHierarchyUI.java:144) at org.eclipse.jdt.internal.ui.callhierarchy.OpenLocationAction. run(OpenLocationAction.java:71) at org.eclipse.jdt.ui.actions.SelectionDispatchAction. dispatchRun(SelectionDispatchAction.java:222) at org.eclipse.jdt.ui.actions.SelectionDispatchAction. run(SelectionDispatchAction.java:198) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewer$1. open(CallHierarchyViewer.java:57) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java: 741) at org.eclipse.core.internal.runtime.InternalPlatform. run(InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer. java:739) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer. java:968) at org.eclipse.jface.viewers.StructuredViewer$6. handleOpen(StructuredViewer.java:1067) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java: 243) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:238) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java: 277) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:844) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3058) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2691) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1716) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1680) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java: 365) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1. run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter. java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter. java:163) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) Ok, I can understand it, that the view does not refresh the content while editing method signature in editor. But if I then say "refresh" in the hierarchy view, I get the next error: java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.MatchLocator. findIndexMatches(MatchLocator.java:307) at org.eclipse.jdt.internal.core.search.PatternSearchJob. search(PatternSearchJob.java:114) at org.eclipse.jdt.internal.core.search.PatternSearchJob. execute(PatternSearchJob.java:64) at org.eclipse.jdt.internal.core.search.processing.JobManager. performConcurrentJob(JobManager.java:261) at org.eclipse.jdt.internal.core.search.BasicSearchEngine. findMatches(BasicSearchEngine.java:193) at org.eclipse.jdt.internal.core.search.BasicSearchEngine. search(BasicSearchEngine.java:421) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:532) at org.eclipse.jdt.internal.corext.callhierarchy.CallerMethodWrapper. findChildren(CallerMethodWrapper.java:75) at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper. performSearch(MethodWrapper.java:253) at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper. doFindChildren(MethodWrapper.java:194) at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper. getCalls(MethodWrapper.java:76) at org.eclipse.jdt.internal.ui.callhierarchy.DeferredMethodWrapper. getCalls(DeferredMethodWrapper.java:62) at org.eclipse.jdt.internal.ui.callhierarchy.DeferredMethodWrapper. fetchDeferredChildren(DeferredMethodWrapper.java:80) at org.eclipse.ui.progress.DeferredTreeContentManager$1. run(DeferredTreeContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) To reproduce this, simply perform "call hierarchy" on method static int foo(int i, int j){ } and then change the signature to static int foo(byte i, byte j){ } and double click on the foo(...) method in the "call hierarchy". After the first error you could then try to refresh view, and you should get second exception. P.S. I propose to change the summary to: [call hierarchy] CallHierarchy fails after change in Java Model
Indeed, the call hierarchy should listen to java model changes and remove non-existing elements. Not critical for 3.1.
*** Bug 102124 has been marked as a duplicate of this bug. ***
*** Bug 66520 has been marked as a duplicate of this bug. ***
Code to remove changed elements is similar to SearchResultUpdater. See also bug 121900 for problems with document changes.
I'll try to do this together with bug 121900.
Sorry, didn't make it for 3.2.
*** Bug 162196 has been marked as a duplicate of this bug. ***
This is marked P2, with a target milestone of 3.4. Do we still believe it will be addressed for 3.4?
(In reply to comment #9) I don't think I'll find time for this in M7. Moving to 3.5. The log is no longer filling up with exceptions, thanks to bug 121900 comment 4.
*** Bug 268801 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.