(翻译说明:http://my.oschina.net/ywlaker/blog/468911)
Navigate to a Java element's declaration
导航至Java元素声明
In this section, you will learn how to open a type in the Java Editor and how to navigate to related types and members.
本小节,你将学会如何在编辑器中打开Java来以及跳转至与之有关的类和其他成员。
- Open the Open Type dialog by pressingCtrl+Shift+T, choosing Navigate > Open Type..., or clicking the toolbar icon (
). TypeMoney, press theArrow Downkey a few times to select MoneyTest, and then pressEnterto open the type in the Java editor.
使用Ctrl+Shift+T快捷键(或Navigate > Open Type...菜单,或快捷工具栏中的图标)打开Open Type对话框,输入Money,通过方向键选择MoneyTest类,然后按下Enter键。
- On the first line of the MoneyTest class declaration, select the superclass TestCase and either
- from the menu bar select Navigate > Open Declaration or
- pressF3.
选择MoneyTest 类声明的父类TestCase 2,按下F3快捷键,或者选择Navigate > Open Declaration 菜单。
The TestCase class opens in the editor area and is also represented in the Outline view.
Note: This command also works on methods and fields.
类TestCase 就会在编辑器中打开。注意:该操作同样适用于方法和属性。 - With the TestCase.java editor open and the class declaration selected:
- from the menu bar select Navigate > Open Type Hierarchy or
- pressF4.
- The Type Hierarchy view opens with the TestCase class displayed.
TestCase 类继承关系视图就打开了。
Note: You can also open editors on types and methods in the Type Hierarchy view.
注意:在类继承关系视图中也可以打开类和方法。