Module jEdit

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
Version:
$Id: PluginUpdate.java 25221 2020-04-12 16:00:17Z kpouer $
Author:
Slava Pestov
  • Field Details

    • LOADED

      public static final 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 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 Object DEACTIVATED
      Plugin deactivated. This is sent after the plugin core class stop() method is called.
      Since:
      jEdit 4.2pre2
    • UNLOADED

      public static final Object UNLOADED
      Plugin unloaded.
      Since:
      jEdit 4.2pre1
    • REMOVED

      public static final Object REMOVED
      Plugin removed, as in deleted from disk.
      Since:
      jEdit 5.2
  • Constructor Details

    • PluginUpdate

      public PluginUpdate(@Nonnull PluginJAR jar, @Nonnull 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(File file, @Nonnull 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 Details

    • getWhat

      public 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 File getFile()
      Returns the file representing the plugin involved.
    • getPluginVersion

      public 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 String paramString()
      Overrides:
      paramString in class EBMessage
      Returns:
      a string representation of this message's parameters.