Procedure

The purpose of this test is to make sure that the Visual Editor functions well as a part of the Eclipse workbench environment. This includes functioning well with Eclipse toolbar and file commands and the project/package structure.

New Visual Class
In Eclipse, go to File->New->Other
Expand the Java Tree Item
Verify that Visual Class is an option
Verify that AWT and Swing trees are underneath Java

Select AWT
Verify that Frame Visual Class, Panel Visual Class and Applet Visual Class are options

Select Swing
Verify that JFrame Visual Class, JPanel Visual Class, and JApplet Visual Class are options

Press cancel
Switch to/open the Java perspective
Go to File->New menu
Verify that Visual Class is an option

Click off the popup menu
Click the Down arrow next to the New button on the toolbar
Verify that Visual Class is an option

Click the Down arrow next to the New Class button on the toolbar
Verify that Visual Class is an option

In the Package Explorer view, MB2->New
Verify that Visual Class is an option

Switch to/open Java Browsing perspective
Verify that Visual Class is an option on the New popup menu in the Projects, Packages, Types, and Members areas

Press the New button
Expand the Examples page
Verify that AWT, Swing, and SWT are listed under the Examples tree

Expand the AWT, Swing, and SWT trees
Verify the examples are shown for each type

Select SimpleTextEditor
Select Next and specify the folder and package, and hit finish
Verify the example is created successfully

Run As Java Bean
Open the SimpleTextEditor example
From the Run->Run As menu
Verify that Run As Java Bean is an option

Click the down arrow next to the Run button on the toolbar
Verify that Run As Java Bean is an option

Java Beans View / Property Sheet
Close the Java Beans View
Go to Window->Show View->Other...
In the Show View dialog, expand the Java node and

Verify that Java Beans is an option

Select Java Beans from the menu
Verify the Java Beans view is displayed properly again

Close the Properties Sheet
Go to Window->Show View menu
Verify that Properties Sheet is an option

Select Properties Sheet from the menu
Verify the Properties Sheet view is displayed properly again

Switch to the Java perspective
Verify the Beans View and Property Sheet are rearranged properly
Repeat the close/open test of the Java Beans view and Property Sheet
Verify that both views open and display properly

Verify the property sheet and beans view respond to input after they are closed and opened

New Visual Class Wizard

Verify the style categories for extending types RCP, SWT, Swing, and AWT 
Verify the superclass field is populated with the style that is selected

*Note* - Shell will say java.lang.Object
Verify that when the Object class under the Other category is selected, the superclass defaults to java.lang.Object
Verify the rest of the Wizard matches the options/functionality of the new Java class wizard

Java Source Editor

Verify the functions and context menu actions in the Java Source view contain all functions available from the standard Java editor

Select a bean on the Canvas
Verify the source is driven to the constructor line for the selected bean

Select a bean on the Java Beans View
Verify the source is driven to the constructor line for the selected bean

Select a modified property on the Property Sheet
Verify the source is driven to the line of code which sets the property

Select an unmodified property on the Property Sheet
Set the value to something
Verify the source is driven to the newly created line of code which sets the property

Select the source pane, and MB2 over it, then select Revert
Verify the source is reverted to the last saved state
Verify the canvas, property sheet and Java Beans view all update to reflect the reverted state

Drop another bean on the canvas
Go to the File menu and select Revert
Verify the source is reverted to the last saved state
Verify the canvas, property sheet and Java Beans view all update to reflect the reverted state

Go to File->Save As and save the file with a new name
Go to the class declaration error line in the source and use code assist to correct class name then save the class
Verify the canvas, property sheet and Java Beans view all continue to show and work with the class

Drop another bean onto the canvas
From the package explorer MB2 on the current file then select Delete
Confirm the deletion
Click the close button on the current editor window (on the tab)
Verify that a prompt to save the changed file is displayed

Choose to save it, and save it to a new location
Open it again in the Visual editor
Without changing the contents, select the file from the package explorer, MB2 and select Delete
Confirm the deletion
Verify that the file is deleted and the Visual Editor is closed

Switch to the Resource perspective
Create a new Visual Class extending JPanel
Set the background color of the JPanel to blue
Save the class
Open a new window (Window menu -> New Window)
Switch the new window to the Java perspective
Open the new class with the Java editor
Change the color line in the source to red
Verify the focus doesn't switch to the VE
Verify the cursor works independently in both source editors
Verify when the color is changed in the Java editor, it is reflected on the canvas on the VE window
Save the file in the Java source editor
Switch to the VE
Verify the dirty mark (*) on the file tab is gone

Other Integration
Verify the following buttons are added to the toolbar when the Visual Editor is opened: