How do I get rid of "Current text selection cannot be opened in an editor" in Eclipse? -
sometimes, message in status bar when press f3 on type in java editor:
current text selection cannot opened in editor
when copy selection clipboard , use ctrl+shift+t open "open type" dialog, can paste value , display type , can open it. type on class path (no compile errors).
in other java editors in same project, f3 / ctrl-click works.
in "broken" editor, works on internal fields , methods. internal fields, works in place field defined. places field used dead. "mark occurrences" works, though.
how rid of it?
so far, tried:
- close , open editor
- clean project
- clean projects
- "update project..." in maven context menu
- restart eclipse
- restart eclipse -clean
this happens on eclipse 3.7.2 m2e 1.3.1 installed.
[update] seems bug somewhere in depths of m2e , jdt. usually, appears when have several projects (maven multi module / reactor build) , modules ma
, mb
, mc
depend on each other:
mc
depends on mb
depends on inner parameterized type x.y<t>
of ma
.
and have closed module mb
. on classpath of mc
, so:
mb.jar ma
that mb
exists jar on classpath while ma
imported eclipse project workspace.
in situation, eclipse gets confused when reading .class
files in mb.jar
need inner parameterized types ma
. guess needs type mb.jar
, parses tells of dependency type in ma
tries parse find type parameter t
can't resolved since parsing of mb
isn't finished, yet.
there 3 fixes:
- close
ma
. import jar. - open project
mb
. - make inner type toplevel type
[old]
if happens, try these steps in order of increasing despair:
- close editor , open again.
- clean project
- close project , open again.
- restart eclipse
if fails:
- export preferences
- exit eclipse
- delete (or rename) folder
.metadata
in workspace. it's invisible folder on oss it's there. - start eclipse again
- import preferences
- import projects again. this, select workspace. eclipse list projects in dialog , can select of them @ once.
related:
- bug 430605 - [select] current text selection cannot opened in editor
Comments
Post a Comment