Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inplace type hierarchy throws exception in 2025-03 #2002

Closed
martinlippert opened this issue Feb 7, 2025 · 3 comments · Fixed by #2006
Closed

inplace type hierarchy throws exception in 2025-03 #2002

martinlippert opened this issue Feb 7, 2025 · 3 comments · Fixed by #2006
Labels
bug Something isn't working regression Regression defect

Comments

@martinlippert
Copy link

I am using Eclipse JEE package 2025-03 M2. Created a simple plain Java 21 project, created one empty class.
Java editor is open, then invoking the inplace type hierarchy popup (Cmd-T on macOS). That works. Pressing CMd-T again to switch the mode doesn't work and throws tons of exception in the Error Log instead:

java.lang.NullPointerException: Cannot invoke "java.util.Set.add(Object)" because "this.visited" is null
	at org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl$2.shouldExpand(HierarchyInformationControl.java:159)
	at org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl$2.internalExpandToLevel(HierarchyInformationControl.java:148)
	at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1166)
	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1123)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:1123)
	at org.eclipse.jface.viewers.AbstractTreeViewer.expandAll(AbstractTreeViewer.java:1084)
	at org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl.toggleHierarchy(HierarchyInformationControl.java:364)
	at org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl$1.keyPressed(HierarchyInformationControl.java:105)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:205)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4660)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1657)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1680)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1665)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1694)
	at org.eclipse.swt.widgets.Text.sendKeyEvent(Text.java:1753)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1690)
	at org.eclipse.swt.widgets.Text.sendKeyEvent(Text.java:1718)
	at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1052)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6443)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:239)
	at org.eclipse.swt.widgets.Widget.superKeyDown(Widget.java:2217)
	at org.eclipse.swt.widgets.Widget.keyDown(Widget.java:1200)
	at org.eclipse.swt.widgets.Control.keyDown(Control.java:2425)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6289)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:239)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2407)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2502)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6401)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5705)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5845)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4000)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:665)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:573)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:178)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
@jukzi jukzi added bug Something isn't working regression Regression defect labels Feb 10, 2025
@jukzi
Copy link
Contributor

jukzi commented Feb 10, 2025

regression from a17cf63, @fedejeanne please take a look

@jukzi
Copy link
Contributor

jukzi commented Feb 10, 2025

Probably AbstractTreeViewer#expandToLevel needs a override too

@fedejeanne
Copy link
Contributor

I will look into it, thank you for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Regression defect
Projects
None yet
3 participants