Reputation: 14920
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.
Upvotes: 11
Views: 6671
Reputation: 14701
I think combining mishadoff's suggestion of single click open mode with "Open when using arrow keys" exactly answers OP's question:
Window(or Eclipse on Mac) -> Preferences -> General:
(I am using Juno version)
Upvotes: 7
Reputation: 10789
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
Upvotes: 21