# 1.3 The Editor Window

The Editor window is one of the three windows which is created when you run Boa Constructor. If you close the Editor Window, you can re-open it from the Palette Window using the Button.

When it is opened the Editor provides two pages, the Shell page and the Explore page. You can now open a source file into the Editor. There are several methods for opening a source file in Boa Constructors editor.

- Use the Open Option from the Editor Toolbar or Editor File Menu.
- Use operating system Drag and Drop functionality to drop a file on the editor.
- Use the Explorer Window (covered in section 1.5 below).
- Use an application file (covered in section 1.6 below).
- Start the Boa Constructor application with the source file as a command line parameter.
- Use one of the options from the 'New' page in the Palette.

When a source file is opened, the editor creates a new page for the module. Within that page, the editor creates another notebook to provide alternative views of the file source. The initial two Views are 'Source' and 'Explore'. The Source View shows the source code and allows you to change the source code. The Explore View provides a tree view of the module, with methods and components nested under classes
and functions.

The 'Explore' Pane shows a Class based view of your source. The methods and attributes of each class in the source are displayed. You can double-click the mouse left button on an attribute or method, and the 'Source' view will display the definition of that item.

The 'Views' menu in the editor provides other views on the source. These are Hieriarchy, Documentation, ToDo, Imports and UML.

- The Hierarchy View shows the classes in your source as a heirarchy. The inheritance relationships between classes are clearly visible in this view.
- The Documentation View shows documentation, which is automatically produced from your source code. If you use standard python documentation strings for classes and methods (i.e. a string immediately following the declaration), then this information is included in the generated text.
- The ToDo View is used for tracking your to-do lists. You add ToDo items to your code as comment followed by three 'X' characters, e.g. `# XXX My todo item`. These are useful for track items that you want to comeback to later.
- The UML View shows the relationships between classes.
- The Imports View shows the relationships between modules.

The Editor provides a 'diff' tool on the 'File' menu. This tool can be used to compare the version of a source file in the editor with another version of the file.