Test Scenario: Window Layout

### Window Layout

Purpose: To test window layout in Eclipse. We will open a perspective, test the layout features, open a second perspective, switch between perspectives, and then create some windows.

Setup:

1. Install Eclipse Platform.
2. Create a project with 3 .txt files.
3. Delete the metadata for org.eclipse.ui.

Testing a Single Perspective:

1. Start the workbench.
2. Drag the navigator over the shortcut bar (the vertical toolbar at left). Verify that a stack icon appears. Drop the view on the shortcut bar. It should become a fast view.
3. Click on the navigator fast view button to show the view. Click on another view to hide it. You can also hide the view by clicking on the "hide" button or the fast view button.
4. Close the Outline view. Then invoke Perspective > Show View > Outline to show it again. Verify that it has the same position as before.
5. Select a text file in the navigator and open it. Verify that the navigator fast view is hidden and an editor appears in the editor area.
6. Modify the contents of the editor and verify that File > Save becomes enabled. Save the file and verify that File > Save is disabled.
7. Modify the contents of the editor again and close the editor. Verify that the Save dialog appears and you can answer, yes, no, and cancel.
8. Open 3 text files within 3 editors. The editors appear in a single folder.
9. Drag one editor out of the folder. Verify that the relative placement icons are shown when you are to the top, right, bottom, or left of the existing editor folder. The "no drop" icon should appear if you are over a view. Drop the editor below the existing folder.
10. Drag another editor our of the folder onto the single view. Verify that the first folder is deconstructed and that a new folder is constructed.
11. Maximize the active editor by clicking on the title area. Minimize it by clicking in the area again. Maximize it again and then close it. Verify that the perspective layout is restored.
12. Drag a bunch of views out of the window to create detached windows. Try dragging these views on top of one another to create detached folders.
13. Invoke Perspective > Reset. Answer yes to the dialog and verify that the layout of the perspective is restored to the original.
14. Invoke Perspective > Close to close the page.

Perspective Save As:

1. Open the resource perspective.
2. Drag a view onto the left tool bar. Drag another out into a detached window.
3. In Eclipse you can customize the actions visible in a perspective. Invoke Perspective > Customize and select some new views and actions. Press OK and verify that the new actions appear in the menu and toolbar.
4. Invoke Perspective > Save As and select the Resource perspective. Press OK and answer yes to the verify dialog.
5. Close the perspective.
6. Open the Resource perspective. Verify that the new page has the same layout and visible action sets as you created and saved.
7. Close the perspective.
8. Open up the Preferences dialog and view the Perspectives page. Select the Resource one and press Reset.
9. Open the Resource perspective. Verify that the new page has the default layout.
10. Drag a view onto the left tool bar. Drag another out into a detached window.
11. Invoke Perspective > Save As and type the name of a new perspective (ie Bob). Press OK and then verify that the window title changes to reflect the new perspective.
12. Close all perspectives
13. Open a new Resource perspective and a Bob perspective. Verify that the first has the default layout and that the second has your custom layout.

Testing Two or More Perspectives:

1. Close all Perspectives
2. Open a Resource perspective. Verify that a new page appears in the window with the Resource perspective.
3. In the Navigator select your project and invoke Open Perspective > Java. Verify that a new perspective appears with the Java Perspective and that the input for the navigator is the project. Cool: Perspectives support scoping !!
4. In the Java perspective open one of the text files in an editor.
5. Drag a couple of views out of the window to create detached windows.
6. Modify the action sets.
7. Switch back and forth between the two pages in the window by clicking in the left hand tool bar. The active perspective controls the visible action sets, views and editors in the window. If you switch between two pages these attributes should change.
8. Try Perspective > Next and Previous.
9. Close the second perspective by invoking Perspective > Close. Verify that the first perspective is activated.

Multiple Windows

1. Start with one open window which has one perspective.
2. Change the Workbench Preferences for "Open Perspective" to "Open in New Window". Then open a Java perspective and verify that a new window is created.
3. A list of the open windows should appear in the Window menu. Select these items to switch between the windows.
4. Close one window and verify that the other is activated.
5. Close the last window and verify that the workbench shuts down.