3

I clicked something or accidentally drug a file that was open in the editor and now it is no longer displayed. If I double click on the file in Package Explorer it doesn't show in the editor like it used to. I have looked all over and can't figure out how to get this file back in the editor. I thought clicking File - Open File would do it but that displays an open file dialog.

Another way to simulate this is to put the cursor in the editor for an open file and select File - Close. This closes the file but then if you double click on the file in the Package Explorer it doesn't open it in the editor anymore. How do I get these files to display in the editor again?

I also tried right clicking on the file and selecting "Open". This does not display in editor either.

I also tried right clicking and selecting "Open With Java Editor". This does not work either.

If I clicke "File" and then the name of the file in the MRU list . This does not work either.

Also, double clicking a file in Package Explorer fails to open any file. The file shows in the File MRU list but does not display in editor. Can not figure this out.

Also, if I select "Back to" or "Forward to" arrows on toolbar, it tracks the file in the Package Explorer by highlighting it but the file does not display in an editor like it used to.

Also, I have tried "File Open" browsing to the physical location and selecting it but that does not display in the editor either.

3 Answers 3

6

I had to open a new window (Window - New Window) and then Reset Perspective (Window - Reset Perspective) to get the editor back. Not sure why but I lost some of my perspective settings doing this.

1

In Package Explorer, instead of double-clicking on the file, try to right-click it and you should get several "Open with..." options; choose the one that matches the editor in which you want the file to open.

Your choice will also be saved as the default, so the next times you can just double-click and it will open in that same editor.

8
  • Please see my additions to question. Commented Jul 29, 2016 at 11:56
  • Seen. Then you should also elaborate on "does not work", maybe adding the info of what happens when you do that. Also it's good that now it's known that we are talking about a Java file and the Java editor. Commented Jul 29, 2016 at 11:58
  • Added "Java" to title. I don't know how to elaborate more than "does not display in editor" when double clicked. This is basic functionality. Commented Jul 29, 2016 at 12:01
  • @user2568374 It doesn't matter that it is basic. If when you double-click nothing happens, it's better to state so. "Does not display in editor" leaves the doubt that it displays somewhere else, or that something happens but it is not what you expect. Commented Jul 29, 2016 at 12:07
  • This is stated in the 6th line of OP. I'm sorry you missed that. Commented Jul 29, 2016 at 12:12
1

If you are customizing the perspective, then saving perspective could be a safer option to avoid such glitches.

PFB the link on how to save a perspective:

http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-43e.htm

1
  • Yes I have since saved a copy of both my Java and Debug perspectives in case this happens again. Commented Aug 1, 2016 at 19:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.