Eclipse 简明教程

Eclipse - Perspectives

What is a Perspective?

Eclipse 透视图是指视图和编辑器区域的初始集合和排列。默认透视图称为 Java。一个 Eclipse 窗口可以同时打开多个透视图,但任何时刻只有一个透视图处于活动状态。用户可以在打开的透视图之间切换或打开一个新的透视图。活动透视图控制某些菜单和工具栏中显示的内容。

An eclipse perspective is the name given to an initial collection and arrangement of views and an editor area. The default perspective is called java. An eclipse window can have multiple perspectives open in it but only one perspective is active at any point of time. A user can switch between open perspectives or open a new perspective. The active perspective controls what appears in some menus and tool bars.

Opening a Perspective

要打开一个新的透视图,请单击“窗口”菜单,然后选择“打开透视图”→“其他”。

To open a new perspective, click on the Windows menu and select Open Perspective → Other

explore perspective open

“打开透视图”对话框显示所有可用的透视图。通过单击工具栏上的“打开透视图”按钮 ( ),也可以打开相同的对话框。

The Open Perspective dialog box shows all the available perspectives. The same dialog can be brought up by clicking on the Open Perspective button ( ) on the tool bar.

Switching between Perspectives

Java 开发最常用的透视图是 Java 透视图和调试透视图。用户可以通过单击工具栏上的“透视图”名称在打开的透视图之间切换。

The most commonly used perspectives for java development are the Java perspective and Debug perspective. Users can switch between open perspectives by clicking on the Perspective name on the toolbar.

explore perspective toolbar

Closing a Perspective

要关闭某个透视图,请在工具栏中右击透视图名称,然后选择“关闭”菜单项。

To close a perspective, right click on the perspective name in toolbar and select the Close menu item.

explore perspective close

Customizing a Perspective

“自定义透视图”对话框可以用来自定义透视图。对透视图进行自定义意味着:

The customize perspective dialog can be used to customize a perspective. Customizing a perspective means −

  1. Determining the icons visible on the toolbar when a perspective is active.

  2. Determining the menu items visible when a perspective is active.

  3. Determine the menu items in New submenu, Show View submenu and Open Perspective submenu.

explore perspective customize 1

“自定义透视图”的选项卡说明如下:

The tab descriptions of customize perspective are given below −

  1. The Tool Bar Visibility tab can be used to determine which icons are visible on the toolbar when a perspective is open.

  2. The Menu Visibility tab can be used to determine which menu items are visible when a perspective is active.

  3. The Command Groups Availability tab can be used to control the visibility of toolbar icons and menu items.

  4. The Shortcuts tab can be used to determine the menu items in New submenu, Show View submenu and Open Perspective submenu.

根据下面图片中快捷方式的选择,为了打开“从现有 Ant 构建文件新建 Java 项目”向导,用户必须打开新建子菜单(文件 → 新建),单击其他,展开 Java 类别,然后选择“从现有 Ant 构建文件新建 Java 项目”。而另一方面,为了启动新建类向导,他们可以打开新建子菜单(文件 → 新建)并选择类菜单项,因为菜单项已在下面图片中选择。通过选中“从现有 Ant 构建文件新建 Java 项目”复选框,此项也将显示在新建菜单中。

Based on the Shortcuts selection in the picture given below, to bring up the "New Java Project from Existing Ant Build File" wizard users have to bring up the New submenu (File → New), click on Other, expand the Java category and then select "Java Project from Existing Ant Build File". On the other hand, to start the New Class wizard they can bring up the New submenu (File → New) and select the Class menu item because its selected in the picture given below. By selecting the "Java Project from Existing Ant Build File" check box this item will also appear under the New menu.

explore perspective customize 2