Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Complete Error #315

Closed
piacenti opened this issue Jun 26, 2017 · 5 comments
Closed

Auto Complete Error #315

piacenti opened this issue Jun 26, 2017 · 5 comments

Comments

@piacenti
Copy link

I'm hitting a situation that consistently causes the error below. I'm using groovy compiler 2.4.11. The situation that causes this to happen is a library that I'm using that has the following pattern.

UtilitiesFacade.ioUtils.

Where UtilitiesFacade is a class that has static instances of other classes such as "ioUtils". The error happens when attempting to do code completion after the ioUtils piece. The error happens to other sibling fields also such as "UtilitiesFacade.xUtils."

Eclipse version: Neon
Groovy Eclipse - 2.9.2.xx-201706120159-e46

eclipse.buildId=3.8.4.201703310825-RELEASE-e46
java.version=1.8.0_131
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.springsource.sts.ide
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.sts.ide

org.eclipse.jdt.ui
Warning
Mon Jun 26 09:33:00 PDT 2017
The 'Groovy Code Completions' proposal computer from the 'org.codehaus.groovy.eclipse.codeassist.completion' plug-in did not complete normally. The extension has thrown a runtime exception.

java.lang.IllegalStateException
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.syntheticMethods(SourceTypeBinding.java:2468)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeMembers(JDTClassNode.java:301)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initialize(JDTClassNode.java:228)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.lazyClassInit(JDTClassNode.java:159)
at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1124)
at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1114)
at org.codehaus.groovy.ast.ClassNode.getSuperClass(ClassNode.java:1108)
at org.codehaus.groovy.ast.ClassNode.getDeclaredMethodsMap(ClassNode.java:528)
at org.codehaus.groovy.ast.ClassNode.getAllDeclaredMethods(ClassNode.java:507)
at org.codehaus.groovy.eclipse.codeassist.creators.AbstractProposalCreator.getAllMethods(AbstractProposalCreator.java:94)
at org.codehaus.groovy.eclipse.codeassist.creators.MethodProposalCreator.findAllProposals(MethodProposalCreator.java:49)
at org.codehaus.groovy.eclipse.codeassist.processors.StatementAndExpressionCompletionProcessor.proposalCreatorLoop(StatementAndExpressionCompletionProcessor.java:456)
at org.codehaus.groovy.eclipse.codeassist.processors.StatementAndExpressionCompletionProcessor.generateProposals(StatementAndExpressionCompletionProcessor.java:350)
at org.codehaus.groovy.eclipse.codeassist.requestor.GroovyCompletionProposalComputer.computeCompletionProposals(GroovyCompletionProposalComputer.java:210)
at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:333)
at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:337)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:331)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:288)
at org.eclipse.jface.text.contentassist.ContentAssistant$3.run(ContentAssistant.java:1931)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1928)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:565)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:560)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:494)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:487)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1747)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:184)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:84)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:81)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:118)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1078)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1130)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1126)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1547)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4918)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:364)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4799)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3822)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

@eric-milles
Copy link
Member

eric-milles commented Jun 26, 2017 via email

@piacenti
Copy link
Author

piacenti commented Jun 26, 2017

UtilitiesFacade is a java class from an internal java library that is used as a dependency. That has the format below. The utility classes just have instance methods, no static methods.

public final class UtilitiesFacade {
    private UtilitiesFacade() {
    }

  
    @NonNull  public static final IOUtils ioUtils = new IOUtils();
  
    @NonNull public static final XUtils xUtils=new XUtils();

    @NonNull public static final YUtils yUtils=new YUtils();


}

@eric-milles
Copy link
Member

eric-milles commented Jun 26, 2017 via email

@piacenti
Copy link
Author

piacenti commented Jun 26, 2017

No, it fails for all of them. It correctly completes from UtilitiesFacade but not from any of its fields.

@piacenti
Copy link
Author

all working fine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants