The most common way to add (and edit classes) in from the system browser In the Nautilus system browser have nothing selected or select a package (first column) or a class (second column). Depending on the selection, the code editor will display a slightly different class template:
| Selection | Template | 
|---|---|
| None | Empty class template | 
| Package | A class template with pre-filled package name (based on the selected package) | 
| Class | An actual definition of the selected class | 
The following image demonstrates the Nautilus window with a selected package:

By editing the class template and accepting (saving) the changes you will create a class (or modify an existing one if a class with the same name exists)