# Team and role creation wizards

## Team wizard

### Opening the team wizard

The easiest way to create a new team class is to use the team wizard. First select the container where you want the new team class to reside. Then the wizard can be opened either by selecting File > New > Team from the main workbench window or by selecting New > Team from the container's pop-up menu or by choosing Team from the drop-down menu on the New button in the workbench toolbar.

### Define settings / enter information

Most settings for a new team correspond exactly to those specified for a regular Java class.

#### Edit using the Binding Editor

If a super-team has been selected and if the team should be constructed as a connector the binding editor can be launched for adding class and method bindings.

### Resulting effects

By clicking the Finish button the team is created with the chosen properties. The tree view of the package explorer and the outline is updated and the new team is displayed.

## Role wizard

### Opening the role wizard

The easiest way to create a new role class is to use the role wizard. First select the container where you want the new role class to reside. Then the wizard can be opened either by selecting File > New > Role from the main workbench window or by selecting New > Role from the container's pop-up menu or by choosing Role from the drop-down menu on the New button in the workbench toolbar.

### Define settings / enter information

#### Source folder and enclosing team

The fields of the source folder and the enclosing team incorporate the same semantics as in the team creation wizard. Entries can be modified/changed by clicking the respective Browse... button and choosing a folder and team class in the selection dialog respectively. The fully qualified name of the enclosing team is displayed unless it stands in the default package. A role is inlined by default, i.e. a role is defined inside the specified enclosing team. If an external role should be created the checkbox "inlined" has to be deselected ( OTJLD §1.2.5).

#### Role name

A valid name for the new role class must be entered. The type name is mandatory.

#### Modifiers

Possible visibility modifiers for role types are `public` and `protected`. Roles can also be either `abstract` or `final`.

#### Implicit superclass

The implicit superclass field is set automatically if the entered type name matches a role type which already exists in a team class which is present in the supertype hierarchy of the enclosing team ( OTJLD §1.3.1). The fully qualified name of the implicit superclass is then shown.

#### Explicit superclass

Initially the explicit superclass is set to "java.lang.Object". It can be changed by clicking the Browse... button and selecting a class from the selection dialog. A role can explicitly inherit from another role class of the same team or from any other regular class other than team classes.

#### Bound base class

A bound base class can be defined by clicking the Browse... button and selecting a class from the selection dialog. A bound base class can be any class. ( OTJLD §2.1)

#### Interfaces

Interfaces which the role should implement can be added/removed with the Add.../ Remove buttons.

#### Method stubs

Method stubs for inherited abstract methods can be created by selecting the according checkbox. Note, that this option includes those abstract methods that are inherited from an implicit super role ( OTJLD §1.3.1).

The checkbox is selected by default.

### Resulting effects

By clicking the Finish button the role with the chosen properties is created inside the enclosing team, or, in the case of an external role, in a package which has the name of the enclosing team. The tree view of the package explorer and the outline is updated and the new role is displayed.