Eclipse“Customize perspective”引发了一个“StackOverflowError”(参见下面的部分堆栈跟踪),屏幕永远不会显示,Eclipse可能会变得不稳定,可能无法再次启动.
这种情况发生在Spring Tool Suite(sts-3.8.3)上,它基于在Ubuntu 16.x上运行的Eclipse 4.6.2(也可能在其他Linux上运行).
如何解锁Eclipse以及如何使用此版本制作“自定义透视图”?
堆栈跟踪 :
java.lang.StackOverflowError at org.eclipse.swt.events.ControlEvent.<init>(ControlEvent.java:35) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1345) at org.eclipse.swt.widgets.Control.setBounds(Control.java:1100) at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1527) at org.eclipse.swt.widgets.ToolBar.setBounds(ToolBar.java:589) at org.eclipse.swt.widgets.Control.setLocation(Control.java:1187) at org.eclipse.e4.ui.widgets.ImageBasedFrame.setFramedControlLocation(ImageBasedFrame.java:124) at org.eclipse.e4.ui.widgets.ImageBasedFrame.access$0(ImageBasedFrame.java:120) at org.eclipse.e4.ui.widgets.ImageBasedFrame$4.controlMoved(ImageBasedFrame.java:109) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225) (...)
解决方法
如果Eclipse被锁定,删除日志中可见的“writer.lock”文件没用,您必须删除工作区中的“workbench.xmi”:
<workspace_path>/.Metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
(提示:Eclipse (C/C++) Error: Job found still running after platform shutdown)
要启用“自定义透视图”屏幕,您必须切换到GTK 2.为此,只需编辑您的eclipse.ini(或STS.ini)并替换它:
--launcher.defaultAction
这样 :
--launcher.GTK_version 2