PluginUpdate (jEdit API Documentation)
Date: 2018-04-10

org.gjt.sp.jedit.msg

## Class PluginUpdate

- java.lang.Object
- - org.gjt.sp.jedit.EBMessage
  - - org.gjt.sp.jedit.msg.PluginUpdate

-     public class PluginUpdate
      extends EBMessage

  Message sent when plugins are loaded and unloaded.
  Since:
    jEdit 4.2pre1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.Object` | `ACTIVATED` Plugin activated.
    `static java.lang.Object` | `DEACTIVATED` Plugin deactivated.
    `static java.lang.Object` | `LOADED` Plugin loaded.
    `static java.lang.Object` | `REMOVED` Plugin removed, as in deleted from disk.
    `static java.lang.Object` | `UNLOADED` Plugin unloaded.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PluginUpdate(java.io.File file, java.lang.Object what, boolean exit)` Creates a new plugin update message.
    `PluginUpdate(PluginJAR jar, java.lang.Object what, boolean exit)` Creates a new plugin update message.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.File` | `getFile()` Returns the file representing the plugin involved.
    `PluginJAR` | `getPluginJAR()` Returns the plugin involved.
    `java.lang.String` | `getPluginVersion()` Returns the plugin version.
    `java.lang.Object` | `getWhat()` Returns what caused this plugin update.
    `boolean` | `isExiting()` Returns true if this plugin is being unloaded as part of the shutdown process, in which case some components like the help viewer and plugin manager ignore the event.
    `java.lang.String` | `paramString()`

    - ### Methods inherited from class org.gjt.sp.jedit.EBMessage

      `getSource, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LOADED

          public static final java.lang.Object LOADED

      Plugin loaded. This is sent after a JAR file is added to the list and scanned.
      Since:
        jEdit 4.2pre1

    - #### ACTIVATED

          public static final java.lang.Object ACTIVATED

      Plugin activated. This is sent after the plugin core class is loaded and its `start()` method is called.
      Since:
        jEdit 4.2pre1

    - #### DEACTIVATED

          public static final java.lang.Object DEACTIVATED

      Plugin deactivated. This is sent after the plugin core class `stop()` method is called.
      Since:
        jEdit 4.2pre2

    - #### UNLOADED

          public static final java.lang.Object UNLOADED

      Plugin unloaded.
      Since:
        jEdit 4.2pre1

    - #### REMOVED

          public static final java.lang.Object REMOVED

      Plugin removed, as in deleted from disk.
      Since:
        jEdit 5.2

  - ### Constructor Detail

    - #### PluginUpdate

          public PluginUpdate(PluginJAR jar,
                              java.lang.Object what,
                              boolean exit)

      Creates a new plugin update message.
      Parameters:
        `jar` - The plugin
        `what` - What happened
        `exit` - Is the editor exiting?
      Since:
        jEdit 4.2pre3

    - #### PluginUpdate

          public PluginUpdate(java.io.File file,
                              java.lang.Object what,
                              boolean exit)

      Creates a new plugin update message. This constructor should be used when the plugin is being removed and the PluginJAR is no longer available.
      Parameters:
        `file` - The file representing the plugin
        `what` - What happened
        `exit` - Is the editor exiting?
      Since:
        jEdit 4.2pre3

  - ### Method Detail

    - #### getWhat

          public java.lang.Object getWhat()

      Returns what caused this plugin update.

    - #### isExiting

          public boolean isExiting()

      Returns true if this plugin is being unloaded as part of the shutdown process, in which case some components like the help viewer and plugin manager ignore the event.
      Since:
        jEdit 4.2pre3

    - #### getPluginJAR

          @Nullable
          public PluginJAR getPluginJAR()

      Returns the plugin involved. It might be null when the plugin is removed

    - #### getFile

          public java.io.File getFile()

      Returns the file representing the plugin involved.

    - #### getPluginVersion

          public java.lang.String getPluginVersion()

      Returns the plugin version.
      Returns:
        the plugin version. It may be null in some case like for the libraries
      Since:
        4.4pre1

    - #### paramString

          public java.lang.String paramString()

      Overrides:
        `paramString` in class `EBMessage`
      Returns:
        a string representation of this message's parameters.