没有完成,奇怪的Eclipse行为 [英] No completions available, strange Eclipse behavior

查看:126
本文介绍了没有完成,奇怪的Eclipse行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我启动了Eclipse,内容协助工作正常;

  2. 我想在我的Swing项目中创建一个LineBorder;

  3. 我键入 LineBorder panelBorder = new Li 并按Ctrl + Space;

  4. 不出现弹出窗口,状态栏中写入红色无可用;

  5. 我尝试Ctrl + Space在内容辅助工作正常2秒钟以上的元素,它不再工作。

  6. 我在同一个项目中尝试同样的事情在其他项目在关闭并重新打开它之后,在清理它之后,内容辅助工作在我尝试使用LineBorder构造函数之前就很好,那么它会崩溃。

我试过:


  1. 在首选项 - > Java->编辑器 - >内容辅助 - >高级中重置为默认值;

  2. 检查同一菜单中的每个复选框;

  3. 创建ea new workspace and try it there;

  4. 删除.metadata / .plugins / org.eclipse.jdt.core中的.index文件和'savedIndexNames.txt'

  5. 检查重复的库。

我没有尝试重新安装Eclipse。我使用的版本是Eclipse IDE for Java Developers(Juno)。



没有什么可以工作。



更新:



已将日志检查为 iGili 建议。
失败时引发了一些异常:

  org.eclipse.e4.core.di.InjectionException :org.eclipse.core.commands.ExecutionException:执行该操作时发生异常
导致:org.eclipse.core.commands.ExecutionException:执行该操作时发生异常
导致:java.lang.ArrayIndexOutOfBoundsException:1
在org.eclipse.jdt.internal.codeassist.InternalCompletionProposal.findConstructorParameterNames(InternalCompletionProposal.java:257)
在org.eclipse.jdt.internal.codeassist.InternalCompletionProposal。 findParameterNames(InternalCompletionProposal.java:1456)
在org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider.appendUnboundedParameterList(CompletionProposalLabelProvider.java:113)
在org.eclipse.jdt.ui.text。 java.CompletionProposalLabelProvider.createMethodProposalLabel(CompletionProposalLabelProvider.java:272)
在org.eclipse.jdt.ui.text.java。 CompletionProposalLabelProvider.createStyledLabel(CompletionProposalLabelProvider.java:570)
在org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.computeDisplayString(LazyJavaCompletionProposal.java:262)
在org.eclipse.jdt。 internal.ui.text.java.LazyJavaCompletionProposal.getStyledDisplayString(LazyJavaCompletionProposal.java:238)
在org.eclipse.jface.text.contentassist.CompletionProposalPopup.handleSetData(CompletionProposalPopup.java:841)
在org。 eclipse.jface.text.contentassist.CompletionProposalPopup.access $ 24(CompletionProposalPopup.java:831)
在org.eclipse.jface.text.contentassist.CompletionProposalPopup $ 3.handleEvent(CompletionProposalPopup.java:593)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
在org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
在org.eclipse。 swt.widgets.Widget.sendEvent(Widget.java:1077)
在org.eclipse.swt.widgets.Widget.sendEvent(Widge t.java:1062)
在org.eclipse.swt.widgets.Table.checkData(Table.java:1166)
在org.eclipse.swt.widgets.Table.wmNotifyChild(Table.java: 6749)
在org.eclipse.swt.widgets.Control.wmNotify(Control.java:5534)
在org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1896)
在org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5086)
在org.eclipse.swt.widgets.Control.windowProc(Control.java:4584)
在org .eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
在org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
在org.eclipse.swt .widgets.Shell.windowProc(Shell.java:2069)
在org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
在org.eclipse.swt.internal.win32 .COSWallProcW Table.java:564)
在org.eclipse.swt。 widgets.Table.callWindowProc(Table.java:430)
在org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)

它继续下去,我不知道发布长堆栈跟踪的约定是什么

解决方案

我也是一样的Windows - >首选项 - > Java - >编辑器 - >内容辅助 - >高级。确保-Java建议 - 被勾选。


I think I tried every suggested solution, but this Eclipse auto-complete problem is quite particular:

  1. I launch Eclipse, content assist works fine;
  2. I want to create a LineBorder in my Swing project;
  3. I type LineBorder panelBorder = new Li and hit Ctrl+Space;
  4. No popup appears and in the status bar it writes in red "No completion available";
  5. I try Ctrl+Space on the elements where content assist worked fine 2 secs earlier, it doesn't work anymore.
  6. I try the same thing on other project, on the same project after closing and reopening it, after cleaning it and content assist works just fine before I try using LineBorder constructor, then it crashes.

What I tried:

  1. Reset to defaults in 'Preferences->Java->Editor->Content Assist->Advanced';
  2. Check every single checkbox in the same menu;
  3. Create a new workspace and try it there;
  4. Delete .index files and 'savedIndexNames.txt' in .metadata/.plugins/org.eclipse.jdt.core;
  5. Check for the duplicate libraries.

What I didn't try is reinstalling Eclipse. The version I use is Eclipse IDE for Java Developers (Juno).

Nothing seems to work.

UPDATE:

Checked the logs as iGili suggested. There are some exceptions raised at the time of failure:

org.eclipse.e4.core.di.InjectionException: org.eclipse.core.commands.ExecutionException: While executing the action, an exception occurred
Caused by: org.eclipse.core.commands.ExecutionException: While executing the action, an exception occurred
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at org.eclipse.jdt.internal.codeassist.InternalCompletionProposal.findConstructorParameterNames(InternalCompletionProposal.java:257)
    at org.eclipse.jdt.internal.codeassist.InternalCompletionProposal.findParameterNames(InternalCompletionProposal.java:1456)
    at org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider.appendUnboundedParameterList(CompletionProposalLabelProvider.java:113)
    at org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider.createMethodProposalLabel(CompletionProposalLabelProvider.java:272)
    at org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider.createStyledLabel(CompletionProposalLabelProvider.java:570)
    at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.computeDisplayString(LazyJavaCompletionProposal.java:262)
    at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.getStyledDisplayString(LazyJavaCompletionProposal.java:238)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.handleSetData(CompletionProposalPopup.java:841)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$24(CompletionProposalPopup.java:831)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$3.handleEvent(CompletionProposalPopup.java:593)
    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.Table.checkData(Table.java:1166)
    at org.eclipse.swt.widgets.Table.wmNotifyChild(Table.java:6749)
    at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5534)
    at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1896)
    at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5086)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4584)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
    at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2440)
    at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:564)
    at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:430)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)

and it goes on, I don't know what is the convention for posting long stack traces

解决方案

I had the same. Windows-->Preferences --> Java --> Editor --> Content Assist --> Advanced. Make sure -Java Proposals- is ticked.

这篇关于没有完成,奇怪的Eclipse行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆