The ProgramEditor Plugin provides the ability to view and edit Program Components. To view, Right-click a Program and select . It shows
ProgramEditor Edit,
ProgramEditor Slots,
ProgramEditor Imports and
ProgramEditor Source tabs.
Edit allows you to edit the , , and methods. An example from the demo Database follows:
BStatusNumeric inA = getInA(); BStatusNumeric inB = getInB(); BStatusNumeric out = getOut(); out.setValue( inA.getValue() + inB.getValue() );
Slots allows you to view and change the slots of the program component. It includes , , , , , and for each slot. See SlotSheet for more information on slots.
Imports allows you to view the Modules that have been imported.
It also allows the following:
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()
);
}
}The Workbench main menu functions are available. When the ProgramEditor is visible, the following ProgramEditor menu function is also available:
Add Slot Ctrl-A
Delete
Rename Slot Ctrl-R
Reorder
ProgramEditor Compile Ctrl-F9
The Workbench toolbar contains navigation and editing buttons as described in About the toolbar. When the ProgramEditor is visible, additional toolbar buttons include:
Find F5
Replace F6
ProgramEditor Compile Ctrl-F9
Console Prev
Console Next
CompileSave allows you to compile and save the source of the program component. The shortcut is F9.
Copyright © 2000-2014 Tridium Inc. All rights reserved.