当我在Project Explorer中选择文件时,如何使Eclipse自动打开/预览文件 [英] How to have Eclipse automatically open/preview files as I select them in Project Explorer

查看:146
本文介绍了当我在Project Explorer中选择文件时,如何使Eclipse自动打开/预览文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Project Explorer中选择文件时,是否可以让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.

我本质上是在寻找Mac Finder的Quick Look或Windows 7资源管理器的预览窗格。 IntelliJ IDEA也具有此功能,并将其称为自动滚动到源代码。

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具有链接到编辑器功能,但与我想要的功能相反(IntelliJ IDEA称之为从源代码自动滚动)-它从编辑。我希望编辑器从项目资源管理器进行更新。

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.

推荐答案

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

这篇关于当我在Project Explorer中选择文件时,如何使Eclipse自动打开/预览文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆