Procedure

This scenario will test out the cut, copy and paste features in the Visual Editor.

 

Setup

 

Create a new project and in the new project create a Shell Visual Class.

Basic Functionality Inspection

 

MB2 the Shell on the freeform.
Verify that the copy context menu item is enabled.
Verify that the cut context menu item is enabled.
Verify that the paste context menu item is disabled.


Click on the freeform.

Click on the Shell.

Click on the Edit menu.

Verify that the copy menu item is enabled.
Verify that the cut menu item is enabled.
Verify that the paste menu item is disabled.

Click on the Shell in the JavaBeans view.

Click on the Edit menu.

Verify that the copy menu item is enabled.
Verify that the cut menu item is enabled.
Verify that the paste menu item is disabled.

Graph View Functionality Inspection
(Unless otherwise stated perform actions in the Graph View)


Drop and size a Button on the Shell.

Set the Button text to “Button.”

MB2 on the Button and select Copy.

MB2 on the Shell and select Paste.
Verify that the mouse is “loaded” and ready to drop something.

Click on the Shell.

Verify that a Button is dropped on the Shell with the text “Button.”


Drop and size a Composite on the Shell to take up its remaining area.

Change the Composite’s background color (blue, green, etc.).

Set the Composite’s layout to RowLayout.

MB2 on a Button and select Cut.

Verify that the Button is removed from the Shell.

MB2 on the Composite and select Paste.
Verify that the mouse is “loaded” and ready to drop something.

Click on the Composite.

Verify that a Button is dropped on the Composite with the text “Button.”

 

Save the file.

MB2 on the composite.

Select copy from the context menu.

Close the file.

 

Create a new visual class extending Composite.

MB2 on the Composite.

Select paste from the context menu.

Verify that the mouse is “loaded” and ready to drop something.

Click on the Composite.

Verify that the Composite copied from the other file is dropped on the new Composite.

Close the file.

 

Beans View Functionality Inspection

(Unless otherwise stated perform actions in the Beans View)

 

Open the first file worked on (containing the Shell).

Change the Shell layout to RowLayout.

Add some controls and containers to the Shell (buttons, composites, etc.).

Add some more controls to the newly created containers.

Change some properties of the controls (text, background, etc.).

 

Select one of the controls inside of the Shell.

MB2 on the control and select copy from the context menu.

MB2 on the Shell and select paste from the context menu.

Verify that a copy of the control is created at the end of the Shell’s children.

 

Select one of the controls inside of a container on the Shell.

MB2 on the control and select copy from the context menu.

MB2 on the Shell and select paste from the context menu.

Verify that a copy of the control is created at the end of the Shell’s children.

 

Select one of the containers on the Shell.

MB2 on the container and select copy from the context menu.

MB2 on the Shell and select paste from the context menu.

Verify that a copy of the container and all its children is created at the end of the Shell’s children.

 

Select one of the controls inside of the Shell in the Graph View.

MB2 on the control and select copy from the context menu.

MB2 on the Shell in the Beans View and select paste from the context menu.

Verify that a copy of the control is created at the end of the Shell’s children.

 

Advanced Functionality Inspection

 

Experiment with cutting, copying and pasting in different layouts.

Cut or copy a control from a container.

Change the layout of the container.

Paste the control.

 

Verify that a copy/cut/paste works for all layouts in both the Graph View and Beans View.

Verify that a copy/cut/paste works for Swing components in addition to SWT.