groovy / groovy-eclipse Goto Github PK
View Code? Open in Web Editor NEWEclipse Groovy Development Tools
Eclipse Groovy Development Tools
The eclipse groovy update site http://dist.springsource.org/snapshot/GRECLIPSE/e4.5 gives the following error when use in 'Install a new software' section in eclipse Mars (4.5)
Is there a workaround to this problem?
Hi,
as a committer to Eclipse Code Recommenders, I’d like to bring Eclipse Bug 470406 to your attention. It causes content assist in the Groovy Editor to stop working – until a restart. Thereafter, everything is fine: the “Groovy Content” and “Java Proposals (Code Recommenders)” proposal kinds happily co-exist on the default content assist list (Java > Editor > Content Assist > Advanced preference page).
I am not entirely sure what’s going on yet. Our IntelligentCompletionProposalComputer
enables and disables a few completion categories EnableContentAssistCategoryJob
and DisableContentAssistCategoryJob
, but Groovy-Eclipse’s computers are not among them. The fact that a restart fixes the problem suggests some kind of problem with propagating this preference change, though.
Does Groovy-Eclipse query the content assist preferences in any way?
(If possible, please continue the discussion over at the Eclipse Bugzilla.)
I have mixed (java + groovy) project.
SeanceTemplate.java
public interface SeanceTemplate<S> {
interface Callback<T, S> {
T doInSeance(S seance);
}
<T> T execute(Callback<T, S> callback);
}
SeanceTemplateImpl.groovy
@CompileStatic
class SeanceTemplateImpl<S> implements SeanceTemplate<S> {
@Override
public <T> T execute(Callback<T, S> callback) {
...
}
}
produces compilation error:
ERROR in /home/mtrofimov/dev/main/src/com/mtrofimov/seance/impl/SeanceTemplateImpl.groovy (at line 0)
[ERROR] package com.mtrofimov.seance.impl
[ERROR] ^
[ERROR] Internal compiler error: java.lang.NullPointerException at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyClassScope.fixupTypeParameters(GroovyClassScope.java:559)
I'm using
I found similar/related issue https://issuetracker.springsource.com/browse/STS-3930 (if it could help)
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=470162
groovy-eclipse brings back using buggy code from eclipse (https://bugs.eclipse.org/bugs/show_bug.cgi?id=445669#c22)
In consequence javadoc is not available in the editor on Groovy-all functions.
The issue is caused to the naming of the src jar which is not matching with the binary one
working:
groovy-all-1.8.6-sources.jar
groovy-all-1.8.6.jar
not working:
groovy-2.3.3-sources.jar --> should be renamed to groovy-all-2.3.3-sources.jar
groovy-all-2.3.3.jar
reported previously on JIRA https://jira.codehaus.org/browse/GRECLIPSE-1822
pull requets awaiting Review and Merge: #110
I'm not sure if this is a bug, or just a missing feature. Auto-completion in the groovy editor doesn't seem to work for references annotations implemented in Java.
So, for example if I am working with the Spring Framework and annotate a method with a request mapping I should be able to type in @RequestMapping("
then press Ctrl+Space to see a list of all the parameters I can provide. This is not happening when I am annotating Groovy files with the Groovy editor.
HI.
I'm using the Groovy-Eclipse plugin 2.9.2 within Eclipse Luna. Compilation fails on a specific .groovy file, where a constants of another class is referenced within an annotation:
@Column(length = Definition.MAX_PROPERTY_KEY_LENGTH)
String name;
Message in Eclipse Problems console:
Groovy: Internal groovy compile error.
Exception in log:
!ENTRY org.eclipse.jdt.core 4 4 2015-08-28 14:20:00.363
!MESSAGE Internal groovy compiler error.
!STACK 0
BUG! exception in phase 'class generation' in source unit '<path-to-groovy-file>.groovy' unexpected NullpointerException
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1221)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:646)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:624)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:601)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:202)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.generateCode(GroovyCompilationUnitDeclaration.java:1711)
at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:995)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody0(CompilationUnitProblemFinder.java:207)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody1$advice(CompilationUnitProblemFinder.java:244)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:1)
at org.codehaus.jdt.groovy.model.GroovyCompilationUnit.buildStructure(GroovyCompilationUnit.java:330)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:565)
at org.eclipse.jdt.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:38)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:729)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:789)
at org.eclipse.jdt.internal.core.CompilationUnit.becomeWorkingCopy(CompilationUnit.java:101)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFileInfo(CompilationUnitDocumentProvider.java:1001)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1244)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4233)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2584)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2557)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1395)
at org.codehaus.groovy.eclipse.editor.GroovyEditor.doSetInput(GroovyEditor.java:1057)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3220)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3238)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3265)
at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:390)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:305)
at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:869)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:127)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1246)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:69)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4734)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:218)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:488)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:454)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:705)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:392)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1145)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3210)
at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3125)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3107)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3102)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3056)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:373)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:179)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:268)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:233)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:853)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:850)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1142)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1249)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:278)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:272)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:313)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.NullPointerException
at org.codehaus.groovy.classgen.AnnotationVisitor.getConstantExpression(AnnotationVisitor.java:260)
at org.codehaus.groovy.classgen.AnnotationVisitor.visitExpression(AnnotationVisitor.java:214)
at org.codehaus.groovy.classgen.AnnotationVisitor.visit(AnnotationVisitor.java:79)
at org.codehaus.groovy.classgen.ExtendedVerifier.visitAnnotation(ExtendedVerifier.java:248)
at org.codehaus.groovy.classgen.ExtendedVerifier.visitAnnotations(ExtendedVerifier.java:139)
at org.codehaus.groovy.classgen.ExtendedVerifier.visitField(ExtendedVerifier.java:78)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1192)
at org.codehaus.groovy.classgen.ExtendedVerifier.visitClass(ExtendedVerifier.java:74)
at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:855)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1216)
... 134 more
This error leads to a ton of other MOP failures on other classes.
Simply replacing the constant with a literal fixes the problem and the MOP errors disappear as well.
Building everything from maven cmdline works without a problem.
It would be great if groovy-eclipse supported the groovy 2.1+ custom compiler configuration feature.
With Gradle we can specify a configuration file which makes all groovy classes use the CompileStatic AST by default, but there seems to be no way to get Eclipse to do the same. Having the ability to instruct Eclipse in the same way, IMO, would be huge win.
I have Eclipse Luna (Service Release 1a (4.4.1)) with following plugins installed:
Groovy-Eclipse Feature
Groovy Compiler 2.0 Feature 2.9.1.xx-201412191752-e44
Grails IDE 3.6.3.201411271013-RELEASE
I have a simple class:
class Utilities
{
public static boolean hasValue(List list){
return !(list == null || list.isEmpty());
}
}
Another simple class:
class Test2 {
static main(def args)
{
def var1 = [2]
if(Utilities.hasValue((List)var1) //here one bracket is less but still compiler does not give any error
{
println "hello"
}
}
}
It is only when I run Test2, it gives me following exception:
No signature of method: static Utilities.hasValue() is applicable for argument types: (java.util.ArrayList, Test2$_main_closure1)
Also when I add another if()
to Test2
, then it gives not much sensing error description:
class Test2 {
static main(def args)
{
def var1 = [2]
if(Utilities.hasValue((List)var1)
{
println "hello"
}
if(true) { } //Groovy:Expecting '}', found 'if'
}
}
I tried same in Groovy/Grails Tool Suite (which is also eclipse based) by GoPivotal v 3.3.0.RELEASE. It also gives same error.
We include groov-eclipse in our IDE for scripting and deploy our own product using PDE build. When adding Groovy to the target, the build won't deploy the product, as P2 is not able to serve groovy-eclipse dependencies on JDT. Eclipse 4.4 ships with JDT version 3.10.0 to 3.10.1, while groovy-eclipse JDT feature patch is specified for versino 2.9.2.
JDT 2.9.2 was part of with Eclipse 4.3.
When using GroovyEclipse 2.9.1 an Error occurs in the Eclipse log when changing Java compiler settings:
!ENTRY org.eclipse.jdt.ui 4 10001 2015-05-05 17:32:17.087
!MESSAGE preference option missing: org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter (org.eclipse.jdt.internal.ui.preferences.ProblemSeveritiesConfigurationBlock)
Eclipse 4.5 contains newer JDT/Core version that i messed up by GroovyEclipse patch
See alse:
466380: StandInException in OptionsConfigurationBlock.testIfOptionsComplete (853)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=466380
Received this error while starting Eclipse, with Groovy Eclipse plugin 2.9.2 installed:
pluginId org.eclipse.ui
pluginVersion 3.107.0.v20150507-1945
code 4
severity 4
message Plug-in 'org.codehaus.groovy.eclipse.ui' contributed an invalid Menu Extension (Path: 'org.eclipse.ui.projectConfigure' is invalid): org.codehaus.groovy.eclipse.addnature.action
fingerprint ec1f3b83
Exception:org.eclipse.epp.internal.logging.aeri.ui.log.StandInStacktraceProvider$StandInException: Stand-In Stacktrace supplied by the Eclipse Error Reporting
at org.eclipse.ui.internal.WorkbenchPlugin.log(WorkbenchPlugin.java:660)
at org.eclipse.ui.internal.PluginActionBuilder.ideLog(PluginActionBuilder.java:549)
at org.eclipse.ui.internal.PluginActionBuilder.access$0(PluginActionBuilder.java:547)
at org.eclipse.ui.internal.PluginActionBuilder$BasicContribution.contributeMenuAction(PluginActionBuilder.java:361)
at org.eclipse.ui.internal.ObjectActionContributor.contributeObjectActions(ObjectActionContributor.java:141)
at org.eclipse.ui.internal.ObjectActionContributorManager.contributeObjectActions(ObjectActionContributorManager.java:104)
at org.eclipse.ui.internal.PopupMenuExtender.addObjectActions(PopupMenuExtender.java:316)
at org.eclipse.ui.internal.PopupMenuExtender.menuAboutToShow(PopupMenuExtender.java:393)
at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:333)
at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:466)
at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:461)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:493)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:255)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1334)
at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:198)
at org.eclipse.swt.widgets.Display.runPopups(Display.java:3861)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
anonymousId 7b821dca-121f-4f1d-a72d-06ac70fbcfa7
name
email
comment
eclipseBuildId 4.5.1.M20150904-0015
eclipseProduct org.eclipse.epp.package.jee.product
javaRuntimeVersion 1.8.0_45-internal-b14
osgiWs gtk
osgiOs Linux
osgiOsVersion 3.19.0
osgiArch x86_64
logMessage false
ignoreSimilar false
name org.eclipse.core.databinding.observable
version 1.5.0.v20150422-0725
name org.eclipse.core.databinding
version 1.5.0.v20150422-0725
name org.eclipse.core.runtime
version 3.11.1.v20150903-1804
name org.eclipse.e4.ui.workbench
version 1.3.0.v20150531-1948
name org.eclipse.e4.ui.workbench.swt
version 0.13.0.v20150504-0621
name org.eclipse.equinox.app
version 1.3.300.v20150423-1356
name org.eclipse.equinox.launcher
version 1.3.100.v20150511-1540
name org.eclipse.jface
version 3.11.0.v20150602-1400
name org.eclipse.swt
version 3.104.1.v20150825-0743
name org.eclipse.ui
version 3.107.0.v20150507-1945
name org.eclipse.ui.ide.application
version 1.1.0.v20150422-0725
name org.eclipse.ui.ide
version 3.11.0.v20150825-2158
Environment:
Description:
Working on groovy source files within a maven project with the groovy compiler level set to 2.0.7, every time I save the 'Save problems' dialog appears with the following details:
A save participant caused problems.
The save participant 'Code Clean Up' caused an exception: java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.eclipse.refactoring.actions.TypeSearch. See the error log for details.
and the normal save actions (tidy imports, remove semi-colons etc) are not executed. When the groovy compiler level is set to 2.3.10 the problem does not occur.
The log has the following stack trace info whenever this problem occurs:
!ENTRY org.eclipse.jdt.ui 4 10006 2015-07-15 13:31:02.111
!MESSAGE The save participant 'org.eclipse.jdt.ui.postsavelistener.cleanup' caused an exception: java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.eclipse.refactoring.actions.TypeSearch
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.eclipse.refactoring.actions.TypeSearch
at org.codehaus.groovy.eclipse.refactoring.actions.OrganizeGroovyImports.resolveMissingTypes(OrganizeGroovyImports.java:648)
at org.codehaus.groovy.eclipse.refactoring.actions.OrganizeGroovyImports.calculateMissingImports(OrganizeGroovyImports.java:462)
at org.codehaus.groovy.eclipse.refactoring.actions.GroovyImportsCleanUp.createFix(GroovyImportsCleanUp.java:58)
at org.eclipse.jdt.internal.corext.fix.CleanUpRefactoring.calculateChange(CleanUpRefactoring.java:809)
at org.codehaus.groovy.eclipse.refactoring.actions.CleanUpPostSaveListener.saved(CleanUpPostSaveListener.java:354)
at org.codehaus.groovy.eclipse.refactoring.actions.DelegatingCleanUpPostSaveListener.saved(DelegatingCleanUpPostSaveListener.java:120)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$5.run(CompilationUnitDocumentProvider.java:1598)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.notifyPostSaveListeners(CompilationUnitDocumentProvider.java:1593)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1380)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$4.execute(CompilationUnitDocumentProvider.java:1458)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:132)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5076)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1247)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1301)
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7209)
at org.eclipse.ui.Saveable.doSave(Saveable.java:216)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:355)
at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:199)
at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:283)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:291)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:269)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:211)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:146)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3915)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3929)
at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:54)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
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:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1529)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4722)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4610)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
I installed the snapshot of the groovy-eclipse plugin (https://github.com/groovy/groovy-eclipse/wiki) using the update-site http://dist.springsource.org/snapshot/GRECLIPSE/e4.4/ . Switching between the groovy-compiler-versions 2.2.2.xx
and 2.3.10.xx
works fine:
I also tried to switch to version 2.4.1.xx
. But after restarting, the compiler-version was the same as before.
Switching the compiler to 2.4.1
on a project-level does not work, since there is no option for that version:
My Eclipse (running on Ubuntu Linux 14.10
):
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600
Hello,
Accessing this http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/ got errors:
"can not find : http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/"
Per this SA: http://stackoverflow.com/questions/16074219/static-compile-groovy-by-default-using-maven
I would like a way to tell the compiler to always compile static in a maven project.
It looks like this was tracked on the old codehaus issue tracking as GRECLIPSE-1615 - if this is already tracked somewhere else please let me know.
My symptoms are identical to https://bugs.eclipse.org/bugs/show_bug.cgi?id=443456, but the problem goes away if I uninstall the Groovy-Eclipse M2E integration.
I just noticed that Eclipse is not able to find method call references from Groovy classes.
Here's a very simple example:
Service.groovy:
public interface Service {
public void findThisMethod(Long producerOid, Long agreementOid);
}
ServiceImpl1.groovy:
class ServiceImpl1 implements Service {
public void findThisMethod(Long producerOid, Long agreementOid) {
println "Here"
}
}
BackingBean.java:
public class BackingBean {
Service service;
public void method1() {
service.findThisMethod(0L, 0L);
}
}
Now, if I right click on ServiceImpl1.findThisMethod -> Open Call Hierarchy, I get the correct info:
Now, let's rename BackingBean**.java** to BackingBean**.groovy** and run Open Call Hierarchy again. Now we are no longer able to find the method reference:
I am using Groovy-Eclipse 2.9.2.xx-201502281941-e44.
I was told this was noticed in the past and someone found a local fix for it, but I couldn't find it in the JIRA issues, so I'm going to refile this.
I have a Kepler instance which is working fine. I installed STS 3.6.4, which is Luna. I have them configured just about the same, as much as possible, with the same plugins.
At some point I discovered that some key bindings in my Groovy views were missing, like "quick outline", "go to line", and "next word". I first noticed this with "quick outline", and I think it's likely that others besides those other two are missing.
It isn't just that the bindings went missing. I tried to readd the binding for "quick outline", and it just doesn't work. I even brought up both Eclipse instances side by side (connected to different workspaces), and the "Quick Outline" function in "Keys" is bound exactly the same in both.
I also have the Emacs+ plugin in both instances. Using this, I can directly execute these unbound functions. Running "go-to-line" and "next-word" works fine, but when I execute "quick-outline", I see the dialog appear and disappear in a fraction of a second.
Although I can't get to "quick-outline", the normal outline view appears to render fine, and when I double-click on an entry in that, the editor view goes to that symbol.
When I view a Java file in the Luna instance, the behavior is similar, but slightly different. When I press Ctrl+o, I see a little box show up in the bottom right-hand corner of the Eclipse window that just shows "Quick Outline Ctrl+O". This is the box that shows up when I press the beginning of a key sequence where there are multiple possible sequences that start with that sequence.
When I do this in the Java view, I also saw log entries appear that are definitely relevant, but I can't fully interpret them. I'll include the entire log, but this is the relevant excerpt:
!MESSAGE A conflict occurred for CTRL+O:
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.mylyn.task.ui.editor.QuickOutline,Quick Outline,
Show the quick outline for the editor input,
Category(org.eclipse.mylyn.tasks.ui.commands,Task Repositories,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@7b3d759f,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.jdt.ui.javaEditorScope,,,user)
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.pde.ui.quickOutline,Quick Outline,
Open a quick outline popup dialog for a given editor input,
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@a4479f1,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.jdt.ui.javaEditorScope,,,user)
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.wst.jsdt.ui.edit.text.java.show.outline,Quick Outline,
Show the quick outline for the editor input,
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@73b1c6d9,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.jdt.ui.javaEditorScope,,,user)
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.show.outline,Quick Outline,
Show the quick outline for the editor input,
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@1e1634fa,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.jdt.ui.javaEditorScope,,,user)
Binding(CTRL+O,
ParameterizedCommand(Command(org.eclipse.wst.sse.ui.quick_outline,Quick Outline,
Show the quick outline for the editor input,
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@7c94a0dc,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
I decided to try to reset my keys to default bindings. This actually fixed Ctrl+o in my Java view. The Groovy view still doesn't respond to either of the three commands I was focusing on, and executing "quick-outline" directly in EITHER view makes the dialog appear and disappear in a fraction of a second. I suppose the fact that this last behavior also happens in the Java view, where the regular Ctrl+o press works fine, tells me that the quick appearance and disappearance has something to do with executing the function manually, as opposed to with a keypress.
!ENTRY org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Warnings while parsing the key bindings from the 'org.eclipse.ui.commands' extension point
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.springframework.ide.eclipse.beans.ui', id='org.springframework.ide.eclipse.beans.ui.inplace.show'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.springframework.ide.eclipse.boot.launch', id='org.springsource.ide.eclipse.boot.BootLaunchShortcut.run'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.springframework.ide.eclipse.boot.launch', id='org.springsource.ide.eclipse.boot.BootLaunchShortcut.debug'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.springsource.ide.eclipse.gradle.ui', id='org.springsource.ide.eclipse.gradle.ui.refresh.all'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.refactoring', id='org.codehaus.groovy.eclipse.refactoring.command.inlineMethod'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.refactoring', id='org.codehaus.groovy.eclipse.refactoring.command.inlineMethod'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.791
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.refactoring', id='org.codehaus.groovy.eclipse.refactoring.command.rename'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.792
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.refactoring', id='org.codehaus.groovy.eclipse.refactoring.command.rename'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.792
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.ui', id='org.codehaus.groovy.eclipse.groovyScriptLaunchShortcut.run'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.792
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.ui', id='org.codehaus.groovy.eclipse.groovyScriptLaunchShortcut.debug'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.792
!MESSAGE Cannot bind to an undefined command: plug-in='org.codehaus.groovy.eclipse.ui', id='org.codehaus.groovy.eclipse.ui.convertToMethod'
!SUBENTRY 1 org.eclipse.ui 2 0 2015-04-05 14:31:24.792
Please provide support to latest Groovy version released.
Hi, I just installed the Groovy Eclipse plugin from this link http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/
onto Eclipse Mars SR1, and I get a StackOverFlowError: null as soon as I start Eclipse and it tries to build the workspace.
pluginId org.eclipse.core.jobs
pluginVersion 3.7.0.v20150330-2103
code 2
severity 4
message An internal error occurred during: "Building workspace".
fingerprint d38a9ecb
Exception:java.lang.StackOverflowError: null
at org.eclipse.jdt.internal.compiler.lookup.TypeSystem.getDerivedTypes(TypeSystem.java:422)
at org.eclipse.jdt.internal.compiler.lookup.AnnotatableTypeSystem.getRawType(AnnotatableTypeSystem.java:142)
at org.eclipse.jdt.internal.compiler.lookup.AnnotatableTypeSystem.getRawType(AnnotatableTypeSystem.java:167)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createRawType(LookupEnvironment.java:1018)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.convertToRawType(LookupEnvironment.java:553)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.toRawType(JDTClassNodeBuilder.java:133)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.configureParameterizedType(JDTClassNodeBuilder.java:344)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.configureType(JDTClassNodeBuilder.java:68)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.configureTypeVariableReference(JDTClassNodeBuilder.java:243)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.configureTypeVariableDefinition(JDTClassNodeBuilder.java:254)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNodeBuilder.configureTypeVariables(JDTClassNodeBuilder.java:95)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.setupGenerics(JDTClassNode.java:179)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.ensureGenericsInitialized(JDTClassNode.java:434)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.getGenericsTypes(JDTClassNode.java:422)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:135)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:140)
at org.codehaus.groovy.control.GenericsVisitor.getPrintName(GenericsVisitor.java:123)
anonymousId 7b821dca-121f-4f1d-a72d-06ac70fbcfa7
name
email
comment
eclipseBuildId 4.5.1.M20150904-0015
eclipseProduct org.eclipse.epp.package.jee.product
javaRuntimeVersion 1.8.0_45-internal-b14
osgiWs gtk
osgiOs Linux
osgiOsVersion 3.19.0
osgiArch x86_64
logMessage false
ignoreSimilar false
name org.codehaus.groovy
version 2.3.10.xx-201508121448-e45
name org.eclipse.jdt
version 3.11.1.v20150904-0015
I ran across this trying to debug why some unit tests weren't working from within eclipse Mars, but they pass via the maven command line. I'm using eclipse Mars with groovy-eclipse 2.9.2.xx-2015081211448-e45 using the groovy compiler 2.4.3.
In a class hierarchy, one of the classes in the hierarchy has it's method skipped in favor of it's parent when invoked with super.. Via the command line with groovy 2.4.3 (not the eclipse compiler), execution is correct, or via eclipase with the 2.3.x compiler, it's correct.
What's I've built is this hierarchy:
package com.foo
class A {
boolean aCalled = false
protected Map itemAsMap( def item ) {
println "A itemAsMap"
aCalled = true
return [:]
}
}
package com.foo
class B extends A {
boolean bCalled = false
protected Map itemAsMap( def item ) {
println "B itemAsMap"
super.itemAsMap( item )
bCalled = true
return [:]
}
}
package com.foo
class C extends B {
boolean cCalled = false
protected List flattenAsMap( def item ) {
println "C flattenAsMap"
super.itemAsMap( item )
cCalled = true
return []
}
}
package com.foo
import org.junit.Test
class CTest {
@Test
public void test() {
def c = new C()
def ret = c.flattenAsMap( "stuff" )
assert c.aCalled
assert c.bCalled // 2.4 within eclipse fails here.
assert c.cCalled
}
}
When run from within Eclipse with the 2.4.3 groovy-eclipse compiler, I get the incorrect result:
C flattenAsMap
A itemAsMap
and the test fails on the line indicated.
When run with the earlier 2.3.10 compiler, or via 2.4 on the commandline (avoiding groovy-eclipse), I get the correct output:
C flattenAsMap
B itemAsMap
A itemAsMap
As you can see, with the 2.4.3 compiler within eclipse, the call to class B is skipped.
Interestingly enough, if the super.itemAsMap(...) call in class C is replaced with just itemAsMap(...) (eliminating the super keyword), than all is fine and the hierarchy of calls is as expected. It's as if the super call is resulting in an incorrect advancement up the hierarchy by one level, skipping the immediate parent. This is similar to the groovy issue report at https://issues.apache.org/jira/browse/GROOVY-6663
For now, no 2.4.x compiler for me within Mars.
1/20/2016 - made an edit as I missed the "super" calls in the sample code (don't know how I missed that on the initial report ... likely I was manually transcribing code from my VM to this post).
4/13/2016 - simplified the test case, and provided a real unit test. Also added link to similar groovy issue.
I have Groovy 2.4 working happily in Eclipse, but the latest version of the groovy-eclipse-batch
plugin available is 2.3.7, and the Spock compiler is extremely picky about the Groovy version (I can't use 1.0-groovy-2.3
with groovy-all:2.4
). Is there a timeline for getting the Eclipse compiler artifact pushed out into batch? This is essentially a blocker for using 2.4 with CLI/CI builds.
Running a parallel maven build with "mvn --builder smart -T1C clean install -DskipTests
" occasionally causes the following error:
[ERROR] /*
[ERROR] ^
[ERROR] General error during class generation: java.lang.UnsupportedOperationException
[ERROR]
[ERROR] java.lang.UnsupportedOperationException
[ERROR] at java.util.Collections$UnmodifiableMap.put(Collections.java:1457)
[ERROR] at org.codehaus.groovy.ast.ImmutableClassNode.enableWriteProtection(ImmutableClassNode.java:128)
[ERROR] at org.codehaus.groovy.ast.ImmutableClassNode.getDeclaredMethods(ImmutableClassNode.java:120)
[ERROR] at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:1004)
[ERROR] at org.codehaus.groovy.classgen.ClassCompletionVerifier.checkMethodForWeakerAccessPrivileges(ClassCompletionVerifier.java:369)
[ERROR] at org.codehaus.groovy.classgen.ClassCompletionVerifier.checkMethodsForWeakerAccess(ClassCompletionVerifier.java:266)
[ERROR] at org.codehaus.groovy.classgen.ClassCompletionVerifier.visitClass(ClassCompletionVerifier.java:66)
[ERROR] at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:857)
[ERROR] at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:909)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1221)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:629)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:606)
[ERROR] at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:202)
[ERROR] at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.generateCode(GroovyCompilationUnitDeclaration.java:1711)
[ERROR] at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:838)
[ERROR] at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
[ERROR] at java.lang.Thread.run(Thread.java:745)
It appears that at least two threads think that writeProtected == false
and both try to enter the synchronized enableWriteProtection()
method. One will block
while the other is creating the unmodifiableMap
. But when the blocked thread then executes the enableWriteProtection()
method it will generate the above error.
One solution is to make writeProtected
volatile and check it again inside the enableWriteProtection()
method.
We appear to have one class that causes the groovy code completion plugin to NPE, details from the eclipse error log below:
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.NullPointerException
at org.codehaus.groovy.eclipse.codeassist.processors.LocalVariableCompletionProcessor.createClosureProposals(LocalVariableCompletionProcessor.java:82)
at org.codehaus.groovy.eclipse.codeassist.processors.LocalVariableCompletionProcessor.generateProposals(LocalVariableCompletionProcessor.java:73)
at org.codehaus.groovy.eclipse.codeassist.requestor.GroovyCompletionProposalComputer.computeCompletionProposals(GroovyCompletionProposalComputer.java:162)
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:325)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:282)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:566)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:563)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:498)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:492)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1665)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:183)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:285)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:504)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:555)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:376)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:322)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:84)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1525)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4723)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:344)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4611)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)eclipse.buildId=3.4.0.201310051614-RELEASE-e43
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments: -product org.springsource.sts.ide
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.sts.ide
If this has been raised in the wrong place feel free to close/move etc.
The Maven Compiler plugin supports declaration of annotation processors like this:
<annotationProcessors>
<annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
</annotationProcessors>
When I use this with the Groovy Eclipse plugin, an error occurs:
Compilation failure
[ERROR] Failure executing groovy-eclipse compiler:
[ERROR] Unrecognized option : -processor
The opening browser window shows the https://www.codehaus.org/termination/.
I'm using GGTS 3.6.4 (groovy-eclipse 2.9.2 along with Groovy compiler 2.4.4). Whenever I'm opening any Groovy (in a Grails project) file, the GGTS getting freeze and responding very slow. I searched and investigated on this and found nothing other then these logs from workspace:
!ENTRY org.eclipse.jdt.core 4 4 2015-07-03 05:10:34.071
!MESSAGE Internal groovy compiler error.
!STACK 0
BUG! exception in phase 'canonicalization' in source unit '/media/others/test-project/grails-app/services/com/UserService.groovy' JDTClassNode.getTypeClass() cannot locate class for com.BaseService using transform loader groovy.lang.GroovyClassLoader@7d4bca9
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.getTypeClass(JDTClassNode.java:710)
at org.codehaus.groovy.ast.ClassNode.getTypeClass(ClassNode.java:1499)
at org.codehaus.groovy.transform.trait.Traits.findHelpers(Traits.java:112)
at org.codehaus.groovy.transform.trait.TraitComposer.doExtendTraits(TraitComposer.java:108)
at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:213)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1216)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:646)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:624)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:601)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:201)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.analyseCode(GroovyCompilationUnitDeclaration.java:2289)
at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:992)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody0(CompilationUnitProblemFinder.java:207)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody1$advice(CompilationUnitProblemFinder.java:244)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:1)
at org.codehaus.jdt.groovy.model.GroovyCompilationUnit.buildStructure(GroovyCompilationUnit.java:330)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)
at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:565)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:294)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:280)
at org.eclipse.jdt.internal.core.JavaElement.exists(JavaElement.java:198)
at org.grails.ide.eclipse.editor.groovy.elements.GrailsProject.getPrimaryType(GrailsProject.java:178)
at org.grails.ide.eclipse.editor.groovy.elements.GrailsProject.internalFindGrailsElementsForProject(GrailsProject.java:553)
at org.grails.ide.eclipse.editor.groovy.elements.GrailsProject.findAllServices(GrailsProject.java:512)
at org.grails.ide.eclipse.editor.groovy.types.PerProjectServiceCache.ensureInitialized(PerProjectServiceCache.java:108)
at org.grails.ide.eclipse.editor.groovy.types.PerProjectServiceCache.findServicesFor(PerProjectServiceCache.java:93)
at org.grails.ide.eclipse.editor.groovy.elements.AbstractGrailsElement.populateInjectedServices(AbstractGrailsElement.java:148)
at org.grails.ide.eclipse.editor.groovy.elements.ServiceClass.initializeTypeLookup(ServiceClass.java:46)
at org.grails.ide.eclipse.editor.groovy.types.GrailsTypeLookup.initialize(GrailsTypeLookup.java:100)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:343)
at org.codehaus.groovy.eclipse.editor.highlighting.GatherSemanticReferences.findSemanticHighlightingReferences(GatherSemanticReferences.java:52)
at org.codehaus.groovy.eclipse.editor.highlighting.GroovySemanticReconciler.reconciled(GroovySemanticReconciler.java:153)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1664)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconciled(JavaReconcilingStrategy.java:212)
at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconciled(JavaCompositeReconcilingStrategy.java:164)
at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:144)
at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105)
at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:406)
at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173)
Where the BaseService
is Groovy trait and it present in the same package. Looks like Groovy compiler is not able to compile this class or something else. But if I don't open any Groovy file, the GGTS works like a charm and as I start working on my Grails project, it starts freezing and sucking the whole RAM and CPU.
Initial state:
Extract Variable:
Just after extract:
notice that the editor is nto set as dirty
start to just click elsewhere:
If I close the editor and reopen it, the refatcor was done correctly
The patched JDT version shipped with Groovy Eclipse contains formatter bugs that have been fixed with Mars SR1. Specifically https://bugs.eclipse.org/bugs/show_bug.cgi?id=472962 is causing problems for me.
see https://issues.apache.org/jira/browse/GROOVY-7570 for details
Hi
I've just installed groovy-eclipse from the snapshot update site in a fresh Mars SR1 installation.
However, upon restarting, I get a lot of errors in Eclipse, preventing compilation:
------
STATUS
------
pluginId org.eclipse.jdt.ui
pluginVersion 3.11.1.v20150827-1306
code 2
severity 4
message Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ui".
fingerprint dd336c12
Exception:java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.MethodBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.buildMethods(ClassScope.java:405)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.buildFieldsAndMethods(ClassScope.java:185)
at HIDDEN.HIDDEN(HIDDEN:-1)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.buildFieldsAndMethods(CompilationUnitScope.java:84)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:253)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:278)
at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:348)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:183)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:179)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:186)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:201)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3239)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2946)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:51)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:496)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:595)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:591)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:199)
at org.eclipse.jdt.internal.compiler.ast.ForeachStatement.resolve(ForeachStatement.java:419)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:309)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1188)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1301)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:591)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1242)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:719)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1190)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:812)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:535)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:528)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:471)
at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128)
at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:170)
at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
------
REPORT
------
anonymousId 5bf4a57d-7abb-44ee-aa26-7a0cd9658d32
name
email
comment
eclipseBuildId 4.5.1.M20150904-0015
eclipseProduct org.eclipse.epp.package.jee.product
javaRuntimeVersion 1.8.0_60-b27
osgiWs win32
osgiOs Windows7
osgiOsVersion 6.1.0
osgiArch x86_64
logMessage false
ignoreSimilar false
-------
BUNDLES
-------
name org.eclipse.core.jobs
version 3.7.0.v20150330-2103
name org.eclipse.core.runtime
version 3.11.1.v20150903-1804
name org.eclipse.jdt
version 3.11.1.v20150904-0015
name org.eclipse.jdt.core
version 3.11.0.xx-201508121448-e45
name org.eclipse.jdt.ui
version 3.11.1.v20150827-1306
Since this updates a tool that can alter programs on a fundamental level, it is dangerous to serve the update site via http, even if the served code can be inspected.
additionally, while dist.springsource.org does appear to serve via https, the certificate is misconfigured, which is not great for a distribution site. A quick search didn't turn up a way to open an issue, but it will need to be fixed to clear this issue, so I'm adding it here.
I tried installing the latest snapshot in Eclipse 4.3.2 with the Java 8 patch, but apparently I cannot have both at the same time. I have to remove the JDT patch to install even the latest groovy-eclipse snapshot.
I installed Groovy-Eclipse Feature 2.9.1.xx-201411241807-e44 which seems to contain groovy 2.3.7 but the Eclipse IDE does not show any Javadoc.
I assume that the Javadoc should be part of the Eclipse Groovy installation based on this old blog post from Andy http://andrewclement.blogspot.de/2009/12/groovy-eclipse-and-javadoc-hovers.html
I have a trait Auditable
with a method void publish()
that is "implemented" by an abstract class. The concrete subclass has an error marker saying
Can't have an abstract method in a non-abstract class: [...] or the method 'void publish()' must be implemented.
This looks to be a bug with the Eclipse index where it confuses the fact that traits look like Java interfaces (no implementation) with their having the code added at compile-time. The classes actually compile fine, and I don't get an adornment in Package Explorer.
When I run Java unit tests, I can double-click an entry from the "Junit" results view to go to the test method represented in the results view.
However, when the test is based on Spock, which I assume would be handled by this plugin, it appears the algorithm used to determine the method name is not "Groovy-able". It appears that it only takes the first word of the method name, and stops at the first space. Groovy method names can be quoted strings with spaces, which is what is typically done with Spock spec methods. The result is an error dialog which says "Method 'xxx' not found. Opening the test class.".
The Code Hause repository urls no longer exist. These need to either removed or changed to point to the SonaType repository or removed all together so that redirects and 404s are not being returned causing long build times when resolving artifacts.
https://github.com/groovy/groovy-eclipse/blob/master/extras/groovy-eclipse-compiler/pom.xml#L89
The other option is to make sure there is a redirect setup for any codehaus repository that is being accessed.
http://www.codehaus.org/mechanics/redirects/
We are getting this error in the Eclipse Maven plugin (using 2.1.1). We were using 2.1.1 and getting the same error using the IDEA compiler, but on swapping to 2.1.2 this problem has gone away and all our tests using Mockito now work with @CompileStatic tagged. When attempting to build under Eclipse Maven with the additional 2.1.1 dependency, this problem still occurs.
Any chance of a 2.1.2?
java.lang.NullPointerException
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.inferReturnTypeGenerics(StaticTypeCheckingVisitor.java:3094)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2088)
at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:220)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:64)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:70)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:209)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
When searching for references for a certain member variable in my workspace, the groovy eclipse plugin (version 2.9.1.xx-2014110613, with Eclipse 4.4.2) spews the following stacktrace:
java.lang.NullPointerException
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBinaryExpression(TypeInferencingVisitorWithRequestor.java:1052)
at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitListOfExpressions(CodeVisitorSupport.java:278)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitTupleExpression(CodeVisitorSupport.java:180)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitTupleExpression(TypeInferencingVisitorWithRequestor.java:1913)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitArgumentlistExpression(TypeInferencingVisitorWithRequestor.java:970)
at org.codehaus.groovy.ast.expr.ArgumentListExpression.visit(ArgumentListExpression.java:74)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitMethodCallExpression(TypeInferencingVisitorWithRequestor.java:1668)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:64)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:71)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:236)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:206)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBlockStatement(TypeInferencingVisitorWithRequestor.java:1408)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitIfElse(CodeVisitorSupport.java:58)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitIfElse(ClassCodeVisitorSupport.java:246)
at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:41)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:206)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBlockStatement(TypeInferencingVisitorWithRequestor.java:1408)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitClosureExpression(CodeVisitorSupport.java:176)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitClosureExpression(TypeInferencingVisitorWithRequestor.java:1319)
at org.codehaus.groovy.ast.expr.ClosureExpression.visit(ClosureExpression.java:43)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitListOfExpressions(CodeVisitorSupport.java:278)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitTupleExpression(CodeVisitorSupport.java:180)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitTupleExpression(TypeInferencingVisitorWithRequestor.java:1913)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitArgumentlistExpression(TypeInferencingVisitorWithRequestor.java:970)
at org.codehaus.groovy.ast.expr.ArgumentListExpression.visit(ArgumentListExpression.java:74)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitMethodCallExpression(TypeInferencingVisitorWithRequestor.java:1668)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:64)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeVisitorSupport.java:75)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitReturnStatement(ClassCodeVisitorSupport.java:251)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitReturnStatement(TypeInferencingVisitorWithRequestor.java:1423)
at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:206)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBlockStatement(TypeInferencingVisitorWithRequestor.java:1408)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:103)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:114)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstructorOrMethod(TypeInferencingVisitorWithRequestor.java:842)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:571)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:404)
at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:352)
at org.codehaus.jdt.groovy.integration.internal.GroovyLanguageSupport.maybePerformDelegatedSearch(GroovyLanguageSupport.java:199)
at org.codehaus.jdt.groovy.integration.LanguageSupportFactory.maybePerformDelegatedSearch(LanguageSupportFactory.java:107)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1106)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1238)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1370)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:122)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:232)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:516)
at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:592)
at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:144)
at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Without zipped updates sites, Installation in a corporate environment is just impossible.
Software
Steps
create-domain-class Sample
SampleSpec
which looks likepackage test.Sample
import grails.test.mixin.TestFor
import spock.lang.Specification
/**
* See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage instructions
*/
@TestFor(Sample)
class Sample extends Specification
Groovy:Could not find class for Transformation Processor org.grails.compiler.injection.test.TestForTransformation declared by grails.test.mixin.TestFor
I'm writing an AST transformation that's similar to JPA's @OneToOne
in that the annotation should be applied to matching fields on separate classes. In my transformation class, I look up the field on the "other" class that corresponds to the back reference and verify that it carries the annotation. This is failing in the incremental compiler only; in the incremental compiler, annotations corresponding to AST transformations are removed from fields, regardless of the retention policy of those annotations.
This bug does not appear to affect transformation annotations applied to types or methods, only fields.
I just installed Eclipse Mars Release (4.5.0) and Groovy Eclipse 2.9.2 snapshot builds for Eclipse 4.5.
Using @grap Annotations in eclipse shows errors in the editor: Groovy:No suitable ClassLoader found for grab.
Also errors for imported classes are shown: Groovy:unable to resolve class...
Similar as described here.
http://groovy-eclipse-plugin.42567.n3.nabble.com/Grab-annotation-not-working-in-editor-td2990348.html
I couldn't find the old GRECLIPSE-1052 bug because codehaus terminated all services and there are no redirects set up.
Can/will this be fixed anytime?
Its quite frustrating that when I'm writing groovy code I have a great editor, but when I am in a template file writing a scriptlet (i.e. <% print('foo') %>) I don't have any of the same awesomeness. It we be great if the same things that work in a .groovy file also work between scriptlet tags in a template
Using plugin version
Groovy-Eclipse Feature 2.9.2.xx-201508121448-e45 org.codehaus.groovy.eclipse.feature.feature.group Codehaus.org
If you don't install any extra compiler features, Preferences > Groovy > Compiler generates a link explaining how to add extra compiler features, pointing at
http://docs.codehaus.org/display/GROOVY/Compiler+Switching+within+Groovy-Eclipse which doesn't exist anymore. Ergo, there is no way to learn to add extra compiler features without archive.org-fu.
I have an @AnnotationCollector
annotation (TimeBasedUuidId
) that adds a bunch of JPA annotations to a field. I wanted to write an AST transformation that would add the field along with the annotation to my class, so I just added a FieldNode
with an annotation for TimeBasedUuidId
. This works using in Eclipse itself, the compilation fails withgroovy-eclipse-compiler
from Maven, but
class com.artsquare.studio.domain.annotation.TimeBasedUuidId is not an annotation in @com.artsquare.studio.domain.annotation.TimeBasedUuidId
I have no problems adding fields whose annotations aren't collectors. I'm using 2.9.2.
Update: Looks like I had some stale Maven setup. Same problem from the command line, which indicates it might be an upstream issue.
When I import a multi-module maven project from svn, I should be able to convert it to the groovy nature. This option is not available.
When I do this with a project that was created in the same eclipse workspace (create it, delete it, reimport it), it does work. So there must be some info missing if the project wasn't initiated on the same workspace?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.