-
Notifications
You must be signed in to change notification settings - Fork 193
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
Eclipse 4.6.1 hangs sometimes during code proposal #223
Comments
This is where the exception comes from: private String calculateTypeName() {
String message = getQuickFixProblemContext().getProblemDescriptor().getMarkerMessages()[0];
String name = message.substring(message.lastIndexOf(" ") + 1); Would you happen to have the text of the problem marker you are trying to run the quick-fix on? |
I try to reproduce it, at the moment without success. I will report all exceptions I get. Another one:
|
That's the problem with DSLDStore that comes up from time to time. I tried to protect the maps, but they contain lists that are not synchronized. I may get old-school and use Hashtable<String, Vector>. Otherwise, the interface needs to be refactored so that these lookups and additions are properly synchronized. |
Another problem exists, when working with multiple opened groovy files containing errors, then you get unlimited exceptions clicking in the editor window: `eclipse.buildId=4.6.1.M20160907-1200 org.eclipse.core.jobs java.lang.StringIndexOutOfBoundsException: String index out of range: -19 |
Would you mind sending just the class declaration line of the open file or files when this happens? public class Something extends SomethingElse implements SomeInterface { |
Sure the Groovy class:
And the Base Java Class:
And the interface:
|
...and the ServiceBase is:
|
Thanks. Could you try changing |
..well, strange I can't reproduce it any more, with or without the import... but a colleague has the problem, with and without the import...strange, I will verify with the newest build and a clean Eclipse setup.. One cosmetic thing, if you start Eclipse with opened groovy files, the g Icon in the editor tap is displayed, activating the editor tap, the g changes to j, like Java files. |
You mentioned this last error happened when you had syntax or compile errors. Can you recall where in the class the error was and what editing action you were taking when the error came? |
At the moment, I can't reproduce it any more, but colleagues will try... Another compile error I have from time to time: `
` |
Has something to do with the CompileStatic annotation, removing it, the error disappears. But other classes with the same structure have no problems with this combination, only this one. |
Are you using the latest 2.9.2 snapshot? Number literals with a leading + or - required a fix for source position and this is likely why the literal is improperly formed. |
No, indeed the latest build fixes it. Thanks! Please close this bug report, I will open a new one, when I find a new reproduceable one. |
First, thanks for your work! Sure, I also installed the newest version and I observe sometimes a complete hang of eclipse (4.6.1) during code proposals. Hope the following stack trace helps:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at org.codehaus.groovy.eclipse.quickfix.proposals.AddClassCastResolver$AddClassCastProposal.calculateTypeName(AddClassCastResolver.java:90) at org.codehaus.groovy.eclipse.quickfix.proposals.AddClassCastResolver$AddClassCastProposal.<init>(AddClassCastResolver.java:60) at org.codehaus.groovy.eclipse.quickfix.proposals.AddClassCastResolver.getQuickFixProposals(AddClassCastResolver.java:43) at org.codehaus.groovy.eclipse.quickfix.processors.GroovyQuickFixProcessor.getCorrections(GroovyQuickFixProcessor.java:73) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionCollector.safeRun(JavaCorrectionProcessor.java:384) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.run(JavaCorrectionProcessor.java:344) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor$SafeCorrectionProcessorAccess.process(JavaCorrectionProcessor.java:339) at org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorrections(JavaCorrectionProcessor.java:474) at org.eclipse.jdt.internal.ui.text.java.hover.ProblemHover$ProblemInfo.getJavaAnnotationFixes(ProblemHover.java:102) at org.eclipse.jdt.internal.ui.text.java.hover.ProblemHover$ProblemInfo.getCompletionProposals(ProblemHover.java:76) at org.eclipse.jdt.internal.ui.text.java.hover.AbstractAnnotationHover$AnnotationInformationControl.deferredCreateContent(AbstractAnnotationHover.java:287) at org.eclipse.jdt.internal.ui.text.java.hover.AbstractAnnotationHover$AnnotationInformationControl.setInput(AbstractAnnotationHover.java:187) at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1194) at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1163) at org.eclipse.jface.text.AbstractHoverInformationControlManager.presentInformation(AbstractHoverInformationControlManager.java:894) at org.eclipse.jface.text.TextViewerHoverManager.doPresentInformation(TextViewerHoverManager.java:244) at org.eclipse.jface.text.TextViewerHoverManager$5.run(TextViewerHoverManager.java:234) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4203) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819) 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:687) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
The text was updated successfully, but these errors were encountered: