Test Scenario: Common Navigator Resource View

### Common Navigator Resource View

Purpose: To test the Common Navigator Resource 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. The Common Navigator Resource view tests are derived from the Navigator View tests. The following test plan is a trimmed down version of the current Resource view test plan.

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. Open the Common Navigator Resource View (Window>Show View>Basic>Experimental Resource Navigator)
3. Create a project using the File > New wizard and verify that it appears in the navigator.
4. Create another project by invoking New > Project from the navigator popup menu. Verify that it appears in the navigator.
5. 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.
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.

### Common Navigator Test Viewer

1. Create a file named 'model.properties' in the root of a project. Add the following entries to the file:

       root=Parent
       Parent=Child1,Child2,Child3
       Child1=Grandchild1,Grandchild2
       Child2=Grandchild3

2. After creating the file, open the 'Test Navigator Viewer' (Show View>Other>Test Navigator View).
3. Expand the project in test viewer. Verify that in addition to the resources, a logical model matching the structure from the properties file is presented. Verify that each item has the correct label ('Parent', 'Child1', etc) and the correct icon (each element should have the shared 'element' icon from the workbench).
4. Verify that no context menu appears when a logical node is selected.
5. Deactivatethe 'Test Navigator Extension' by opening the Filters dialog, going to the 'Types of Content' tab, and unchecking the 'Test Navigator Extension' item. Verify that the logical model elements disappear from the tree.
6. Reactivatethe 'Test Navigator Extension' by opening the Filters dialog, going to the 'Types of Content' tab, and checking the 'Test Navigator Extension' item. Verify that the logical model elements reappear from the tree.
7. Deactivatethe 'Resources extension'. Verify that the tree becomes empty.