findViewById() でコンテンツ アシストを使用しようとすると、コードが完成しません。それは元のままです。エラーログを見ると、次のように表示されます。
Unhandled event loop exception
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:533)
at java.lang.StringBuffer.append(StringBuffer.java:323)
at org.eclipse.jdt.internal.core.util.MementoTokenizer.nextToken(MementoTokenizer.java:112)
at org.eclipse.jdt.internal.core.JavaModel.getHandleFromMemento(JavaModel.java:165)
at org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento(JavaElement.java:276)
at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:2928)
at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:2903)
at org.eclipse.jdt.internal.core.util.Util.getPackageFragment(Util.java:946)
at org.eclipse.jdt.internal.core.util.Util.getClassFile(Util.java:759)
at org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(Util.java:1526)
at org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(Util.java:1371)
at org.eclipse.jdt.core.dom.MethodBinding.getUnresolvedJavaElement(MethodBinding.java:254)
at org.eclipse.jdt.core.dom.MethodBinding.getJavaElement(MethodBinding.java:240)
at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.suggestArgumentNames(StubUtility.java:1254)
at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.createParameters(StubUtility2.java:485)
at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.createImplementationStub(StubUtility2.java:416)
at org.eclipse.jdt.internal.ui.text.java.OverrideCompletionProposal.updateReplacementString(OverrideCompletionProposal.java:158)
at org.eclipse.jdt.internal.ui.text.java.JavaTypeCompletionProposal.apply(JavaTypeCompletionProposal.java:107)
at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.apply(AbstractJavaCompletionProposal.java:477)
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:1276)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1285)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
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:1276)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1285)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1312)
at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:748)
at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3050)
at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:741)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1773)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:5116)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4377)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8317)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1193)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2342)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3184)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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)
私はEclipse-Junoを使用しています。View.onClickListener コンテンツ アシストを使用すると、このエラーが発生することがあります。しかし、エラーはあまり発生しません。エラー ログには、プラグインが org.eclipse.ui であることも示されています。ただし、Eclipse/plugin フォルダーにそのプラグインが表示されません。org.eclipse.ui.intro.universal_3.2.600.v20120912-155524 しか表示されません
さらに、View.onClickListener Inner Type のコンテンツ アシストを使用すると、「未処理のイベント ループ例外」も発生します。
なんとなく似たような問題を見つけました。Eclipse のバグとして報告されました。リンクは次のとおりです。