7

I am using Eclipse (Luna); when I open a code file, the file opens in the Project Explorer view. How do I fix the file behavior, so that it opens in the Java editor, such as the example below?

enter image description here

4 Answers 4

7

Belated, but I found only this result for my google search, so maybe it will speed up other's queries.

See a Stack Overflow answer for the same problem with another version

You should Reset Perspective.

In some versions you can access this option through the Window option in the menu bar.

For the Luna specific command, try the Luna help page.:

Open the command link General Perspectives preference page.

From the Available perspectives list, select the perspective you want to restore.

Click Reset.

Click OK.

1
  • Note that if you've rearranged the perspective to your liking, you will lose those changes, so after resetting and then getting everything back how you want it, save the perspective so you own't have to do that again!
    – ajb
    Mar 26, 2020 at 15:23
4

I just had this problem in Mars 2. Double-clicking on a file in Project Explorer would open the file in the Project Explorer view. This happened after I closed Project Explorer view and re-opened it. The solution I found was to move Project Explorer down to the bottom area, (I had Console, Breakpoints, etc down there. When I did that, it moved down but also snapped to the left side of the window, and went back to working normally, opening .c files in their own editor views.

The only thing I found to fix this is to move Project Explorer view around, close it, and reopen it. That fixed it for me.

Edit: I found that if I drag the Project Explorer tab down to the bottom area below the code, it goes blank down there and makes its own skinny column on the side, and stops opening windows in its tab.

2

I solved this issue by going to Window -> Perspective -> Reset Perspective. Then you can add items you like to view by going Window -> Show View -> Console.

0

Just drag the heading tab ('example.java') back to the editor area.

1
  • 2
    If i drag it works, but i want to automatically open into java editor and not in the same area with project explorer, any help pleas?
    – user474617
    Jul 29, 2015 at 10:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .