program-ProgramEditor

 The ProgramEditor Plugin provides the ability to view and edit Program Components. To view, Right-click a Program and select ProgramEditor. It shows  ProgramEditor Edit,  ProgramEditor Slots,  ProgramEditor Imports and  ProgramEditor Source tabs.

ProgramEditor Edit

 Edit allows you to edit the onExecute, onStart, onStop and freeForm methods. An example from the demo Database follows:

BStatusNumeric inA = getInA();
BStatusNumeric inB = getInB();
BStatusNumeric out = getOut();

out.setValue( inA.getValue() + inB.getValue() );

ProgramEditor Slots

 Slots allows you to view and change the slots of the program component. It includes Slot, #, Name, Display Name, Definition, Flags and Type for each slot. See SlotSheet for more information on slots.

ProgramEditor Imports

 Imports allows you to view the Modules that have been imported.

It also allows the following:

ProgramEditor ImportType

 ImportType allows you to import a new type.

ProgramEditor ImportPackage

 ImportPackage allows you to import a new type.

ProgramEditor Remove

 Remove allows you to import a new type.

ProgramEditor Source

 Source allows you to view and edit the source of the program component. The editor supports special Color coding for Java Files. An example from the demo Database follows:

/* Auto-generated
ProgramImpl Code */

import java.util.*;              /* java Predefined*/
import javax.baja.sys.*;         /* baja Predefined*/
import javax.baja.status.*;      /* baja Predefined*/
import javax.baja.util.*;        /* baja Predefined*/
import com.tridium.program.*;    /* program Predefined*/

public class ProgramImpl
   extends com.tridium.program.ProgramBase
{

////////////////////////////////////////////////////////////////
// Getters
////////////////////////////////////////////////////////////////

public BStatusNumeric getOut() { return (BStatusNumeric)get("out"); }
public BStatusNumeric getInA() { return (BStatusNumeric)get("inA"); }
public BStatusNumeric getInB() { return (BStatusNumeric)get("inB"); }

////////////////////////////////////////////////////////////////
// Setters
////////////////////////////////////////////////////////////////

public void setOut(javax.baja.status.BStatusNumeric v) { set("out",
v); }
public void setInA(javax.baja.status.BStatusNumeric v) { set("inA",
v); }
public void setInB(javax.baja.status.BStatusNumeric v) { set("inB",
v); }

////////////////////////////////////////////////////////////////
// onExecute
////////////////////////////////////////////////////////////////

public void onExecute()
   throws Throwable
  {
    BStatusNumeric inA = getInA();
    BStatusNumeric inB = getInB();
    BStatusNumeric out = getOut();

    out.setValue( inA.getValue() + inB.getValue()
);
  }
}

ProgramEditor Menus

The Workbench main menu functions are available. When the ProgramEditor is visible, the following ProgramEditor menu function is also available:

ProgramEditor Toolbar

The Workbench toolbar contains navigation and editing buttons as described in About the toolbar. When the ProgramEditor is visible, additional toolbar buttons include:

ProgramEditor Compile & Save

 CompileSave allows you to compile and save the source of the program component. The shortcut is F9.

ProgramEditor Compile

 Compile allows you to compile the source of the program component. The shortcut is Ctrl-F9.