我在Debian Buster下使用Eclipse Oxygen和WindowBuilder Pro,当我想在设计选项卡中打开一个.java文件(带有Swing JFrame)时,我得到一个"设计师,没有更多句柄" -错误。之后,我被问到是否要退出工作台,因为可能会发生更多SWT错误,并且可能会意外关闭。
点击否后,我仍然可以看到设计师,但是它对尝试改变JFrame的任何点击或动作都没有反应。
错误Stacktrace:
org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:4559)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.SWT.error(SWT.java:4419)
at org.eclipse.swt.graphics.Cursor.<init>(Cursor.java:180)
at org.eclipse.wb.draw2d.ICursorConstants.<clinit>(ICursorConstants.java:98)
at org.eclipse.wb.gef.graphical.tools.MarqueeSelectionTool.<init>(MarqueeSelectionTool.java:61)
at org.eclipse.wb.core.editor.palette.model.entry.MarqueeSelectionToolEntryInfo.<init>(MarqueeSelectionToolEntryInfo.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager$6.run(PaletteManager.java:443)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runLog(ExecutionUtils.java:106)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager.processCategoryChild(PaletteManager.java:429)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager.processPaletteChildren(PaletteManager.java:418)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager.processCategory(PaletteManager.java:388)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager.parseExtensionPalette(PaletteManager.java:360)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager.access$0(PaletteManager.java:345)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager$1.run(PaletteManager.java:139)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runLog(ExecutionUtils.java:106)
at org.eclipse.wb.internal.core.editor.palette.PaletteManager.reloadPalette(PaletteManager.java:137)
at org.eclipse.wb.internal.core.editor.palette.DesignerPalette.reloadPalette(DesignerPalette.java:171)
at org.eclipse.wb.internal.core.editor.palette.DesignerPalette.setInput(DesignerPalette.java:138)
at org.eclipse.wb.internal.core.editor.JavaDesignComposite.refresh(JavaDesignComposite.java:146)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:585)
at org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:522)
at org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:449)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:5439)
at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:446)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:483)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:465)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:415)
at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381)
at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90)
at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:263)
at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:241)
at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1357)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1142)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3187)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1870)
at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:328)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
答案 0 :(得分:3)
在命令行中键入:
daniel @ DanielPC:〜/ eclipse / jee-oxygen / eclipse $ 导出SWT_GTK3 = 0 daniel @ DanielPC:〜/ eclipse / jee-oxygen / eclipse $ ./eclipse
问题是GTK3。上面的命令强制Eclipse使用GTK2。
答案 1 :(得分:1)
它解决了问题(以及其他像偶尔大量抖动的上下文菜单)才能像这样启动eclipse并使用GTK2代替GTK3:SWT_GTK3=0 ./eclipse
编辑:它似乎也以这种方式工作:https://askubuntu.com/a/838703我使用上述方法丢失了菜单图标。链接的方法没有这个缺陷。