使用快捷视图
本小节将介绍快捷 Outline 视图。快捷 Outline 视图是一种在原位上方弹出显示的视图,它显示在编辑器上方并很容易通过键盘来控制。另一种快捷视图将在 Type Hierarchy(类层次结构) 小节介绍 。
快捷 Outline 视图
如何在 Java 编辑器中使用快捷 Outline 视图:
在编辑器中打开 junit.samples.VectorTest.java 文件(如果还没有打开)。
按下快捷键 Ctrl + O 或者选择 Navigate > Quick Outline 菜单,你会在弹出层中看到当前源文件的轮廓结构。
再次按下快捷键 Ctrl + O ,继承而来的属性、类和方法将会显示出来,并且方法会以蓝色显示。
在快捷视图中输入字符过滤显示结果,使用方向键来切换显示结果中的元素,按下 ENTER 键可以让编辑器刷新并定位到选择的元素。
点击右上角的三角形图标查看快捷视图菜单;
菜单可以分为三类:位置 - 改变视图大小、移动视图位置,并记住这些偏好设置。
过滤器 - 定义过滤器,过滤视图中不需要显示的元素。
分类 - 按类型或者字母顺序排序。
注意:Ctrl + O 只会显示当前编辑器内容的 Outline 结构,按下 Ctrl + F3 可以显示选中类的 Outline 结构
(完)
(原文)
Using quick views
In this section, you will be introduced to the quick outline view. Quick views are in-place views which are shown on top of the editor area and can easily be controlled using the keyboard. A second quick view will be introduced in the Type Hierarchy section.
Quick Outline
To use the quick outline view in the Java editor:
Open junit.samples.VectorTest.java file in the Java editor if you do not already have it open.
PressCtrl+Oor select Navigate > Quick Outline and you will see an in-place outline of the current source file.
PressCtrl+Oa second time and all inherited fields, types and methods are shown as well (for the types marked with on the left). Inherited members are shown in blue.
Start typing while the quick outline view is shown to filter the list of displayed elements. Further, use the arrow keys to navigate in the outline view and pressEnterto reveal the selected element in the Java editor.
Click the triangle in the upper right corner to see the quick view menu:
The menu items can be divided into 3 categories:Position - Allows you to resize and move the quick view and to remember these settings
Filter - Define filters so that not all members are shown in the quick outline.
Sort - Sort the members by their defining type or alphabetically.
Note: Ctrl+O always opens the outline for the current Java editor. Press Ctrl+F3 to open the quick outline for the currently selected type.
(END)