Test Scenario: Navigator View

### Navigator View

Purpose: To test the Navigator view in Eclipse. We will start out with an empty workspace, create some projects and files, open files, open some new perspectives, delete some files, test the filtering and sorting options, and test the persistance of view state between sessions.

Setup:

1. Install Eclipse Platform.
2. Delete the metadata for org.eclipse.ui.

Method:

1. Start the workbench. Confirm that the default perspective (Resource) and welcome editor both appear.
2. Create a project using the File > New wizard and verify that it appears in the navigator.
3. Create another project by invoking New > Project from the navigator popup menu. Verify that it appears in the navigator.
4. Create a .txt file, a .html file, and a .java file by invoking New > File from the navigator popup menu. Verify that these files appear in the navigator and that an editor is opened on each. Close all of these editors.
5. In the Navigator you can change the input. To test this create a couple of nested folders in a project using the New > Folder action in the navigator context menu. Then select the top level folder and and invoke Go Into. Verify that the input for the view changes (it is shown in the view title) and that only the resources in the input folder are visible. If you perform the same operation many times you create a history list in the navigator. Try navigating up and down the history by using the Back and Forward buttons on the view toolbar.
6. If you select a file you can open it from the context menu. Open a .txt file and verify that the default text editor opens. Open a .java file and verify that the java editor opens.
7. You can also open a file in a specific editor. Select a .java file and invoke Open With > Default Text Editor. The default text editor should open rather than the java editor. If you select Open With > System Editor something like notepad should open. The preferred editor for a file is always indicated with a check mark in the Open With menu.
8. In the navigator you can open new perspectives. Select a project or folder in the navigator and invoke Open Perspective > Java from the context menu. Verify that a new perspective appears with the Java Perspective and that the input for the navigator is the project. Close it and go back to the first perspective.
9. The contents of the Open Perspective menu are determined by the perspective properties. Note the contents of this menu. Then invoke Perspective > Customize and change the checked perspectives. Press OK and verify that the contents of Open Perspective reflect the new options.
10. The Navigator has support for drag and drop. Try dragging a file from one project to another. A cursor should appear to indicate the drop target. If you release the file it will be moved to the target.
11. In the navigator select a project, folder or file and try out Copy, Move and Rename in the context menu.
12. Select a project, folder or file and invoke Delete in the context menu to delete it. Verify that the item disappears from the navigator. The delete action is also available in the window Edit menu. Select an item, invoke Edit > Delete, and verify that it has the same behavior.
13. Select a file in the navigator and invoke Add Bookmark from the context menu. Open up the Bookmark view and verify that a bookmark now exists. If you double click on the bookmark an editor should open on the bookmark source file. Verify that Add Bookmark is not available if a project or folder is selected in the navigator.
14. Select a project and invoke Close Project from the context menu. At this point the icon should change to a closed folder and all of the contents will be hidden. Invoke Open Project to reopen it and navigate the contents.
15. If you select a resource and invoke Properties.. a properties dialog should appear. It will contain at least an Info, Project Referenes and Team page for projects, and an Info and Team page for folders or files.
16. In the navigator you can sort items by name or type. Try out these options in the pulldown menu and verify that they have the correct affect. All sorting is done in ascending order. You can also filter items out. Create a couple of .class and .* files and experiment with the filter options. You should be able to hide or show these files as desired.
17. The selection in the navigator is linked to the active editor. Open a couple of files. Then switch between the editors and verify that the editor input is selected in the navigator. Now select one of the open files in the navigator and verify that the corresponding editor is activated. You can disable this option by turning off "Link navigator selection to active editor" in the workbench preferences. Then verify that no selection occurs in the navigator as you switch between editors. Turn it back on and verify that selection works again.
18. The state of the navigator (input, expansion) should be stored between sessions. To test this open a perspective with the navigator, change the input and expansions state, and then close the workbench. Restart the workbench and verify that the input and expansion state is restored.