Repository navigation
Closed
Description
Describe the bug
Spring Boot Language Server Feature breaks Eclipse preferences page Windows > Preferences > TextMate > Grammar.
When selecting an arbitrary grammar in the Create, edit or remove TextMate grammars the NPE below is thrown. With the NPW the whole preference page is no longer functional.
java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Button.setEnabled(boolean)" because the return value of "org.eclipse.tm4e.ui.internal.widgets.ThemeAssociationsWidget.getNewButton()" is null
at org.eclipse.tm4e.ui.internal.preferences.GrammarPreferencePage$1.selectionChanged(GrammarPreferencePage.java:244)
at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2128)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1176)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1205)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:263)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:421)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5796)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5025)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4477)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5796)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5025)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4477)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
To Reproduce
- Download an unzip eclipse-java-2022-09-R-linux-gtk-x86_64.tar.gz
- Add STS update site https://download.springsource.com/release/TOOLS/sts4/update/e4.25/
- Install Spring Boot Language Server Feature
- Restart Eclipse
- Go to Windows > Preferences > TextMate > Grammar and select arbitrary grammar in table Create, edit or remove TextMate grammars
Activity
martinlippert commentedon Dec 2, 2022
Thanks @bvo42 for reporting this.
Nevertheless, need to investigate why this happens on 4.16.1
martinlippert commentedon Dec 2, 2022
You can fix this by installing the latest TM4E version from here:
https://download.eclipse.org/tm4e/releases/0.6.2/
Go to
Install New Software, paste in the mentioned URL, and install the feature calledTextMate Core. After that upgrade, the preference page works again.This new version of TM4E will be included by default in the upcoming 4.17.0.RELEASE.
bvo42 commentedon Dec 5, 2022
Upgrading TextMate Core from 0.5.1 to 0.5.2 helped. Thank you for your help.