addCommand

addCommand(barSeparatedCmdPath , funcToCall)

Insert a menu entry in the project view. The menu hierarchy is described by bar | separated submenus. The last string is shown as the command to invoke. When double clicked by the user, MPLAB X IDE will execute the function funcToCall.

Example

def onload(ide):
    ide.addCommand("Test|msg|Print example", "print_hello")
    ide.addCommand("Device actions|Set DAL 0", "set_dal_0")
    ide.addCommand("Device actions|Chip Erase", "chip_erase_l10")
def set_dal_0():
    if deb.Connected():
        r = msg.msg("Debugger is in use. Stop debugging and retry", "Busy")
        return
    deb.Connect()
    try:
       dev.Write32... # send commands to NVM controller to set DAL 0
    finally:
       deb.Disconnect()

Commands for the build process follow.