Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Using the Add Class wizard

The Add Class wizard adds new files to the selected project (source/header/bid files), and updates the project CIF (if found) with the new class declaration.

To access the wizard, do the following:

  1. Within Eclipse, select a project within Project Explorer.
  2. Do one of the following:
    • Select File > Add Brew MP Class
    • Right-click the project in Project Explorer and select Add Brew MP Class
  3. From Brew MP Class you can select from three class options as shown in the following image:

    • Applet Class: This is the only class that can be executed (similar to an EXE). It is the class used in Brew MP application modules.
    • In-Process Class: The in-process and service classes (similar to a Windows DLL) are used in Brew MP extension modules.
    • Service Class: Service classes can only be added to MOD1/DLL1 projects.
  4. Once you select your class, the corresponding dialog for that class displays. The following image shows the Applet class dialog.

    Within the class dialog enter the class name and click OK.

    The project is updated with the new class.

Using the new class

For MOD1/DLL1 projects, the added class declaration in the CIF handles the glue code to create and instantiate your class calling the provided new function.

Applet classes can be selected in the Project > Properties > Brew MP > Run dialog, by selecting Run Applet, then the class AppletID.

Running or debugging the project launches the new applet class without any code modifications.

For MOD/DLL projects, a readme file is generated (AddClassReadMe.txt) with instructions on how to modify your code to instantiate the new class.