Interface ApplicationPlugin


public interface ApplicationPlugin
This is the root class for a TunerStudio plugin. Plugins will be identified and instantiated from here.
Author:
Phil Tobin
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    typical panel to be placed on any settings dialog as defined in the ECU Definition (ini) file.
    static final int
    Like a typical panel, but persistently listed on the menu independent of ecu configuration.
    static final double
    TunerStudio Plugin API Specification
    static final int
    panel to be added as a tab on the main display area
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    called when the visual JComponents is dismissed.
    boolean
    displayPlugin(String controllerSignature)
    This is called each time menu are being reconstructed.
    the Author of this plugin
    Description for this plugin.
    the name for this plugin to be displayed on the menu or tab
    returns a url to web help for this plugin.
    return the identifier for this plugin/panel this will be the reference used in the ui structure of the ecu configuration / ini file
    Provides access to the main plugin visual component.
    int
    The type of plugin the host application should recognize this as
    double
    the minimum Plugin specification your plugin requires to perform as expected.
    the version of the plugin implementation.
    void
    initialize(ControllerAccess controllerAccess)
    This will be called when the plugin is about to be displayed.
    boolean
    called when on display of a menu or when settings change to determine if this plugin Menu or tab should be enabled.
  • Field Details

    • DIALOG_WIDGET

      static final int DIALOG_WIDGET
      typical panel to be placed on any settings dialog as defined in the ECU Definition (ini) file. It will be treated as any other Dialog or panel defined in the ini.
      See Also:
    • PERSISTENT_DIALOG_PANEL

      static final int PERSISTENT_DIALOG_PANEL
      Like a typical panel, but persistently listed on the menu independent of ecu configuration. By default this will be listed on the Tools menu.
      See Also:
    • TAB_PANEL

      static final int TAB_PANEL
      panel to be added as a tab on the main display area
      See Also:
    • PLUGIN_API_VERSION

      static final double PLUGIN_API_VERSION
      TunerStudio Plugin API Specification
      See Also:
  • Method Details

    • getIdName

      String getIdName()
      return the identifier for this plugin/panel this will be the reference used in the ui structure of the ecu configuration / ini file
      Returns:
      the identifier for this plugin/panel
    • getPluginType

      int getPluginType()
      The type of plugin the host application should recognize this as
      Returns:
      An int value that must be equal to The values listed in this interface.
      See Also:
      • DIALOG_PANEL, PERSISTENT_PANEL, TAB_PANEL
    • getDisplayName

      String getDisplayName()
      the name for this plugin to be displayed on the menu or tab
      Returns:
      the name for this plugin to be displayed on the
    • getDescription

      String getDescription()
      Description for this plugin.
      Returns:
      the name for this plugin to be displayed to the user
    • initialize

      void initialize(ControllerAccess controllerAccess)
      This will be called when the plugin is about to be displayed. GUI building and subscriptions to OutputChannel or EcuParameters should be made here. Try to avoid heavy work in the constructor for faster interrogation of the plugin.
      Parameters:
      controllerAccess - An implementation of ControllerAccess with an OuputChannelManager and ControllerParameterManager for access to the Controller.
    • displayPlugin

      boolean displayPlugin(String controllerSignature)
      This is called each time menu are being reconstructed. This will typically be on project open or any time the working Controller Configuration changes. This will allow you to only display a plugin when the current Controller is supported.
      Parameters:
      controllerSignature - The signature of the Controller configuration about to become active as the working configuration
      Returns:
      true if the plugin should be displayed with signature.
      false if the Controller is not supported or should not be displayed at this time.
    • isMenuEnabled

      boolean isMenuEnabled()
      called when on display of a menu or when settings change to determine if this plugin Menu or tab should be enabled. Typically an ApplicationPlugin would evaluate the current settings or evaluate an expression to determine if the menu should be enabled.
      Returns:
      true if the menu to access this plugin should be enabled.
    • getAuthor

      String getAuthor()
      the Author of this plugin
      Returns:
      The Authors name.
    • getPluginPanel

      JComponent getPluginPanel()
      Provides access to the main plugin visual component. Most plugin are expected to to have a visual UI Panel. This method provides access to the UI Component and will be called when the Plugin is about to be displayed. The Jcomponent will be displayed in a dialog.
      Returns:
      The primary plugin UI swing JComponent. Typically and extension of JPanel.
    • close

      void close()
      called when the visual JComponents is dismissed. The Plugin is expected to finish any writes to the Controller. After this is called this plugin will be unsubscribed from ControllerServer and OutputChannelServer. if the plugin is displayed again, initialze will be called again.
    • getHelpUrl

      String getHelpUrl()
      returns a url to web help for this plugin.
      Returns:
      a proper http URL of the format: http://www.yourdomain.com/yourPage
    • getVersion

      String getVersion()
      the version of the plugin implementation.
      Returns:
      an identifier of the plugin version
    • getRequiredPluginSpec

      double getRequiredPluginSpec()
      the minimum Plugin specification your plugin requires to perform as expected. This will be called upon plugin installation and load. TunerStudio will validate that it supports the required specification for your plug in.
      Returns:
      the required specification versions