prosseek
prosseek

Reputation: 190809

Launching standalone editor with "F3" key in eclipse

I use "F3" key of eclipse for invoking the definition of class, method, or anything.

enter image description here

When I click "F3" key on some class, instead of opening the class in eclipse, it opens the java file that contains the class.

enter image description here

What's wrong with my setup in eclipse?

Upvotes: 2

Views: 963

Answers (1)

Clint Eastwood
Clint Eastwood

Reputation: 5698

The problem could be caused by two reasons:

1) the file associations or content-type associations are wrongly configured. This can be fixed navigating to:

Window > Preferences > General > Editors and making sure that:

a) the default (i.e. the first) associated editor for "*.java" is "Java Editor" b) (if a) didn't solve the problem) in the "Content Types" option, the content type "Java Source File" is associated to *.java.

or maybe,

2) if the issue only occurs only to some files (not all of them):

possibly you probably used the option "Open With..." on some of those files and so, Eclipse remembers that choice, so next time you attempt to open any of those files, an external editor is opened instead of the default built-in one.

AFAIK, there are two possible ways of solving this, none of them very elegant but effective:

a) When a certain file is open with the external editor, right click on it and choose "Open With... -> Default Editor". After doing this, that file will not be open with the external editor anymore. Do the same for any other file on the same situation.

b) Use a brand new workspace and import the project from scratch.

Upvotes: 5

Related Questions