Eclipse Juno -断言失败(当从插件调用代码时出现问题:“org.eclipse.jface”)。

时间:2023-01-15 13:03:59

I recently installed Eclispe Juno for Java for Android. I usually press . after a class name to know the associated methods, in case I wish to choose some other method instead of one already chosen from this list the following error pops up in the IDE.

我最近为Android安装了Java的Eclispe Juno。我通常的新闻。在一个类名之后,要知道相关的方法,如果我希望选择其他方法,而不是从这个列表中选择的方法,那么在IDE中会出现以下错误。

How can tell IDE that this is not an error and there is no need to pop this message again and again?

如何告诉IDE这不是一个错误,并且不需要一次又一次地弹出这个消息?

Eclipse Juno -断言失败(当从插件调用代码时出现问题:“org.eclipse.jface”)。

The following is the error log from Eclipse

下面是来自Eclipse的错误日志。

!ENTRY org.eclipse.jface 4 2 2012-07-01 02:04:29.242
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
    at org.eclipse.ui.texteditor.EditorStatusLine$StatusLineClearer.selectionChanged(EditorStatusLine.java:41)
    at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
    at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2738)
    at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2717)
    at org.eclipse.jface.text.TextViewer.setSelectedRange(TextViewer.java:2402)
    at org.eclipse.jface.text.link.LinkedModeUI.select(LinkedModeUI.java:933)
    at org.eclipse.jface.text.link.LinkedModeUI.switchPosition(LinkedModeUI.java:851)
    at org.eclipse.jface.text.link.LinkedModeUI.next(LinkedModeUI.java:798)
    at org.eclipse.jface.text.link.LinkedModeUI.enter(LinkedModeUI.java:717)
    at org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal.apply(ParameterGuessingProposal.java:174)
    at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.apply(AbstractJavaCompletionProposal.java:477)
    at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.apply(LazyJavaCompletionProposal.java:488)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:940)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:891)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:1323)
    at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:808)
    at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:491)
    at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:65)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
    at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5932)
    at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5629)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1521)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    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:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

2 个解决方案

#1


6  

As mentioned before, the problem is caused by the plugin Coffee-Byte plugin for Eclipse. I managed to work-around the problem, for myself at least; disabled everything except Import Statements, Source Headers, Javadocs, and User Defined Regions. I had to manually add regions to the template of methods to get them to fold automatically, but it's a small price to pay for having custom folding.

如前所述,这个问题是由Eclipse的plugin Coffee-Byte插件引起的。我设法解决了这个问题,至少对我自己来说;禁用除导入语句、源头、Javadocs和用户定义区域之外的所有内容。我必须手动将区域添加到方法模板中,以使它们自动折叠,但对于定制折叠来说,这是一个很小的代价。

Also, if anyone is interested in fixing it, the error only occurs if Report problems as you type is enabled in Preferences->Java->Editor. If disabled, then all types of folding work.

另外,如果有人对修复它感兴趣,那么只有当您在首选项中启用了该类型的报告问题时才会出现错误——>Java->编辑器。如果禁用,则所有类型的折叠工作。

Update: I'm currently using Eclipse version Kepler Service Release 1, and build id 20130919-0819. I've re-enabled Normal Methods, Constructors, and Getters and setters; so far, the assertion error hasn't appeared. It seems that the problem has been fixed.

更新:我目前正在使用Eclipse版本的开普勒服务版本1,并构建id 20130919-0819。我重新启用了常规方法、构造函数、getter和setter;到目前为止,断言错误还没有出现。看来问题已经解决了。

#2


4  

Looks like the problem was caused by Coffee-Byte plugin of Eclipse (plugin used for folding) http://kosiara87.blogspot.in/2011/12/how-to-install-coffee-bytes-plugin-in.html?showComment=1341091754230#c8853438068212069468.

看起来这个问题是由Eclipse(用于折叠的插件)的咖啡字节插件引起的。

#1


6  

As mentioned before, the problem is caused by the plugin Coffee-Byte plugin for Eclipse. I managed to work-around the problem, for myself at least; disabled everything except Import Statements, Source Headers, Javadocs, and User Defined Regions. I had to manually add regions to the template of methods to get them to fold automatically, but it's a small price to pay for having custom folding.

如前所述,这个问题是由Eclipse的plugin Coffee-Byte插件引起的。我设法解决了这个问题,至少对我自己来说;禁用除导入语句、源头、Javadocs和用户定义区域之外的所有内容。我必须手动将区域添加到方法模板中,以使它们自动折叠,但对于定制折叠来说,这是一个很小的代价。

Also, if anyone is interested in fixing it, the error only occurs if Report problems as you type is enabled in Preferences->Java->Editor. If disabled, then all types of folding work.

另外,如果有人对修复它感兴趣,那么只有当您在首选项中启用了该类型的报告问题时才会出现错误——>Java->编辑器。如果禁用,则所有类型的折叠工作。

Update: I'm currently using Eclipse version Kepler Service Release 1, and build id 20130919-0819. I've re-enabled Normal Methods, Constructors, and Getters and setters; so far, the assertion error hasn't appeared. It seems that the problem has been fixed.

更新:我目前正在使用Eclipse版本的开普勒服务版本1,并构建id 20130919-0819。我重新启用了常规方法、构造函数、getter和setter;到目前为止,断言错误还没有出现。看来问题已经解决了。

#2


4  

Looks like the problem was caused by Coffee-Byte plugin of Eclipse (plugin used for folding) http://kosiara87.blogspot.in/2011/12/how-to-install-coffee-bytes-plugin-in.html?showComment=1341091754230#c8853438068212069468.

看起来这个问题是由Eclipse(用于折叠的插件)的咖啡字节插件引起的。