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:

  1. close , open editor
  2. clean project
  3. clean projects
  4. "update project..." in maven context menu
  5. restart eclipse
  6. 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:

  1. close ma. import jar.
  2. open project mb.
  3. make inner type toplevel type

[old]

if happens, try these steps in order of increasing despair:

  1. close editor , open again.
  2. clean project
  3. close project , open again.
  4. restart eclipse

if fails:

  1. export preferences
  2. exit eclipse
  3. delete (or rename) folder .metadata in workspace. it's invisible folder on oss it's there.
  4. start eclipse again
  5. import preferences
  6. 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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

asp.net - Passing parameter to telerik popup -

node.js - ldapjs - write after end error -