Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have Eclipse automatically open/preview files as I select them in Project Explorer

Tags:

eclipse

Is there a way to have Eclipse automatically open/preview files as I select them in Project Explorer? I know I can double-click, but I want to quickly arrow up/down as I explore a project.

I am essentially looking for something like Mac Finder's Quick Look or Windows 7 Explorer's Preview Pane. IntelliJ IDEA has this functionality also and calls it "Autoscroll to Source".

Eclipse has "Link to Editor" but that works the reverse of what I want (what IntelliJ IDEA calls "Autoscroll from Source") - it updates the Project Explorer from the editor. I want the editor to update from the Project Explorer.

like image 503
studgeek Avatar asked Sep 07 '12 15:09

studgeek


People also ask

How do I enable project explorer in eclipse?

In Eclipse, if the Project Explorer pane is not already open, click the Show View icon in the lower left corner of Eclipse, then click Project Explorer.

What is the difference between project Explorer and Package Explorer in Eclipse?

Project Explorer additional nodes for web projects, enterprise projects, spring beans and web services. Package Explorer - Provided by the Java Development Tools (JDT) UI project, this provides a view of Java classes for the workspace.

How do I open a File in project Explorer?

Double-click the file to open it in the appropriate application. You must open files that are not associated with application types in the Windows Registry using the File/Open dialog box. From the Files tab, you can view, edit, add, remove and work with files within the project.


1 Answers

Window -> Preferences -> General -> Open Mode (single click)

This option open new source file in new editor tab. To disable this, and keep only one active editor tab, use:

Window -> Preferences -> General -> Editors -> 
Select checkbox 'Close editors automatically' -> 
Set 'Number of opened editors before closing' to 1
like image 65
mishadoff Avatar answered Nov 24 '22 09:11

mishadoff