Q:

Eclipse | Using content assist on findViewById error

Whenever I try to use content assist on findViewById(), the code doesn't get completed. It just stays the same as it was. When I look at the error log, it shows this:
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)

I am on Eclipse-Juno. I sometimes get this error using the View.onClickListener content assist. But the error happens less often. The error log also shows that the plugin responsible is org.eclipse.ui. However, I don't see that plugin on my eclipse/plugin folder. I only see org.eclipse.ui.intro.universal_3.2.600.v20120912-155524
In addition, I also get the "Unhandled event loop exception" when using content assist for View.onClickListener Inner Type.
I found a somehow similar problem. It was reported as a bug in eclipse. Here is the link:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=207496

A:

I got it! I moved the eclipse folder into another location (my Desktop) and BOOM! No more errors! I managed to use the content assist without returning an "Unhandled event loop exception". Maybe the location was crowded with too many files.

