Author: Jaromir Uhrik
Version: 1.0.1
Last update: 25.08.2005
Introduction: This specification is intended as a test specification of the module Code Navigator. It reflects the functionality covered in the module UI-specification.
Comment:
Purpose: Test navigator window appearance and correct opening shortcut, proper position.
Setup: Run IDE with clear userdir. Create or open a j2se project with some java file(s).
#
Test case
Description
1
Close Navigator
1. Press the x-widget on the Navigators window.
RESULT:
Navigator window disappears promptly.
2
Open Navigator
1. Select main menu item Window|Navigator.
RESULT:
The Navigator window appears on the left of the IDE, down from the Explorer component.
3
Test Shortcut Ctrl+7
Setup: Open a java file and create some fields and methods in the class.
Stay on the opened java file in the source editor.
1. Close Navigator window 2. Open the navigator by keyboard shortcut Ctrl+7 (Command+7 on Mac OS).
RESULT:
The Navigator window appears on the correct position of the IDE.
4
Test Escape shortcut
1. Select any component of IDE (Explorer, Source Editor, Output, ...) and press Ctrl+7 (Command+7 on Mac OS). 2. Press Escape.
RESULT:
The focus is on the component formerly selected component (Explorer, Source Editor, Output, ...) .
5
Height Shrink
1. Decrease the navigator window height and resize it back to previous height.
RESULT:
The vertical scrollbar must appear when the items are out of the visible area.
6
Focus Navigator
1. Start IDE and select Navigator window.
RESULT:
Navigator window is positioned on the left-bottom, down from the Explorer component.
7
Width Shrink
1. Decrease the navigator window width and resize it back to previous height.
RESULT:
The horizontal scrollbar must appear when some parts of items are out of the visible area.
8
Hide Filters view
Setup: Push all buttons in the filters view to leave all buttons down.
1. Press the button for hiding the Filter View (sticked from the top to the Filter view). The filters buttons will hide. Only the button for hiding is visible instead of the view. 2. Press the button again.
RESULT:
The filter buttons will be visible again. The button for hiding of the view is visible too. All buttons are in "down" position.
1. Open file (click any java class in projest view - select the one where some fields and methods are contained).
RESULT:
The navigator displays the list of methods and fields of the java class.
2
Close file
1. Open another file. The navigator changes the content. 2. Close the edited source.
RESULT:
Navigator shows again methods and fields of the currently opened source.
3
Test filters
Setup: Open/Create the java class that contains fields and methods with various modifiers (especially public, private, protected and static fields). Derive the class from it and add some fields and methods.
1. Press all filter-buttons down/up and see that navigator shows/hides proper fields and methods.
RESULT:
The list of methods and fields in Navigator shows just the items that are allowed by selected filters.
4
Switch item
1. Move throug the navigator list by cursor keys. Press enter then on any item (the mouse double-click has the same functionality so check it too).
RESULT:
The item definition must be opened in the source editor and the cursor is on the begin of the line with definition. If the field/method is inherited from the parent then the parent source is opened and the proper line is scrolled and the cursor positioned there.
5
Browse in source editor
1. Select a .java file with many methods and fields. 2. In source editor move cursor from the method/field to any other method or field.
RESULT:
The Navigator title is changed upon the selected method/field in the source editor.
6
Open non-java file
1. Open the file of the project that is not the java class (e.g. create the .xml or .html file)
RESULT:
<No Java Class Selected > string appears instead of the list of methods and fields. The text is in the middle of the Navigator.
7
Empty java class
1. Open the empty java class looking like this: public class NewClass { }
RESULT:
The Navigator's members view shows <No Members Available> until any class or field is added into the class.
8
Non-java nodes
1. Select project, package, library node in the project view.
RESULT:
<No Java Class Selected> string appears in the middle of Navigator.
RESULT:
When the mouse is over the item in the navigator's list then the proper javadoc is opened as the bubble on the right. If the Navigator is docked on the right then the javadoc is on the left of the navigator.
2
Nodes without javadoc
1. Drag mouse over the item without javadoc e.g. over member declared as "public static final int a=3;".
RESULT:
Just the definition of the field/method is visible.
1. Check that the filters buttons have the following order and are in position (up=not pressed=not selected/down=pressed=selected):
Show inherited members - up
Show fields - down
Show static members - down
Show non public members - down
RESULT:
2
More classes in a file
1. Create the JFrame Form with name NavigatorTest (Popup menu on package and select New|File/Folder). 2. Add JLabel into the form. 3. Replace the last line with the bracked by following code:
public class class1{
public class1(){}
public void print(){
System.out.println("class1");
}
}
}
class class2{
public class2(){}
public void print(){
System.out.println("class2");
}
}
4. Press all filters up.
RESULT:
The navigator shows just these 3 items:
NavigatorTest
class1.print()
class1.class1
3
Non Public members
1. Press down Show non public members filter
RESULT:
Following items are added into the navigator:
initComponents()
class2.print()
class2.class2
4
Static members
1. Press down Show static members filter
RESULT:
main(String args) item appears in Navigator.
5
Show fields
1. Press Show fields filter.
RESULT:
In the navigator is new item jLabel1 JLabel.
6
Browse the source
1. Move the cursor in the source editor from up to down and stop on each line.
RESULT:
The title of navigator window is changing properly when new method/field is accessed in the source editor.
7
Inherited members
1. Press Show inherited members filter
RESULT:
Bunch of members that are inherited appear in the Members view of Navigator. Some of them are crossed over - these items are deprecated methods.
1. Switch Navigator to Inheritance View (through the combo above). 2. Expand the JFrame node in the navigator tree
RESULT:
There are visible fields and methods of JFrame class.
2
Opening source
1. Click on any method of expanded JFrame.
RESULT:
The source of the JFrame is opened in source editor and it is scrolled on the method's definition and the cursor is on the header of this method.