What is meant by an “unrelated” library or class container in Eclipse?

While a new project was recently imported into eclipse, at some point when I tried to add the GROOVY_SUPPORT library, it would be "unbound" with the -X error, for example:

GROOVY_SUPPORT library with red error-X

It also did not appear in the package explorer as I expected.

What exactly does this mean? Eclipse did not report any other errors. All I have is red-X and an unrelated message.

I was able to fix this by using futzing with things (in particular, removing and re-adding the nature of Groovy) until it disappeared, but I wonder what really happens.

+7
source share
3 answers

This usually means that classpathentry in .classpath cannot be resolved. I usually see this when opening a project that was created / updated with another plugin (or version) that defines a container of the route class that is not connected.

If you are comparing a .classpath file from the moment it was untied after fixing the problem, you should see the difference.

Fixing the problem the way you did it (deleting unrelated content and re-adding it as you did by the nature of Groovy) is an easy way to fix the problem. One caveat, if you are part of a team working on a project and you get this problem, then it would be nice to ensure that all team members are on the same IDE release.

+3
source

I ran into this exact problem. Turns out I haven't installed the Groovy Eclipse SDK features. As soon as I installed them, GROOVY_SUPPORT was no longer disconnected, and everything worked.

enter image description here

+1
source

Found on Eclipse 4.5 Mars and GRECLIPSE 2.9.2

I had several Groovy projects imported before installing GRECLIPSE (but the Groovy compiler was on the way and GROOVY_HOME was installed)

After installing GRECLIPSE, the projects will not compile. So go to

Project Properties via Pulldown> Java Build Path> Libraries> Add Library

And add “GROOVY SUPPORT” manually. The project compiles, but:

GROOVY_SUPPORT (unbound)

This entry cannot be deleted because it makes compilation impossible. So go to

Project Properties via Pulldown> Groovy> Delete Groovy Nature

"Do you also want to delete Groovy flash files from the FOO project?" YES

And circle around:

Project Properties via Pulldown> Configure> Convert to Groovy Project

Everything is done as before.

This has changed the Libraries:

Different now

The contents of ".classpath" has changed from:

<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/> <classpathentry kind="con" path="GROOVY_SUPPORT"/> 

to

 <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/> 

The contents of ".project" has not changed.

 <natures> <nature>org.eclipse.jdt.groovy.core.groovyNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> 
0
source

All Articles