Class SnapshotIntegrationPlugin

java.lang.Object
org.eclipse.core.runtime.Plugin
com.e1c.g5.v8.dt.internal.snapshot.integration.git.SnapshotIntegrationPlugin
All Implemented Interfaces:
EventListener, org.eclipse.osgi.service.debug.DebugOptionsListener, org.osgi.framework.BundleActivator

public class SnapshotIntegrationPlugin extends org.eclipse.core.runtime.Plugin implements org.eclipse.osgi.service.debug.DebugOptionsListener
Snapshot Git Integration plug-in activator.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
    Trace option to enable tracing.
    static final String
    Trace option to enable generic tracing category.

    Fields inherited from class org.eclipse.core.runtime.Plugin

    PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.core.runtime.IStatus
    Creates an error status from the given throwable.
     
    com.google.inject.Injector
    Gets Guice injector of the plug-in.
    boolean
     
    static void
    Logs an error.
    static void
    logStatus(org.eclipse.core.runtime.IStatus status)
    Writes status to the log.
    static void
    logWarning(String message)
    Logs a warning message.
    void
    optionsChanged(org.eclipse.osgi.service.debug.DebugOptions options)
     
    void
    start(org.osgi.framework.BundleContext bundleContext)
     
    void
    stop(org.osgi.framework.BundleContext bundleContext)
     
    static void
    trace(String option, Supplier<String> messageSupplier)
    Lazily prints a message to the OSGi tracing if started and plug-in is in debug mode.
    static void
    trace(String option, Supplier<String> messageSupplier, Throwable exception)
    Lazily prints a message to the OSGi tracing if started and plug-in is in debug mode.

    Methods inherited from class org.eclipse.core.runtime.Plugin

    find, find, getBundle, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • SnapshotIntegrationPlugin

      public SnapshotIntegrationPlugin()
  • Method Details

    • getDefault

      public static SnapshotIntegrationPlugin getDefault()
      Returns:
      the instance of the plug-in, or null if the plug-in is not active
    • logStatus

      public static void logStatus(org.eclipse.core.runtime.IStatus status)
      Writes status to the log.
      Parameters:
      status - the status, cannot be null
    • logError

      public static void logError(Throwable e)
      Logs an error.
      Parameters:
      e - the error, cannot be null
    • logWarning

      public static void logWarning(String message)
      Logs a warning message.
      Parameters:
      message - the message, cannot be null
    • createErrorStatus

      public static org.eclipse.core.runtime.IStatus createErrorStatus(Throwable e)
      Creates an error status from the given throwable.
      Parameters:
      e - the cause throwable, cannot be null
      Returns:
      the error status, never null
    • trace

      public static void trace(String option, Supplier<String> messageSupplier)
      Lazily prints a message to the OSGi tracing if started and plug-in is in debug mode.
      Parameters:
      option - the option that will control whether the trace statement is printed (e.g., "/debug/myComponent") or null if none
      messageSupplier - Supplier of lazy message that is to be printed. Must not be null.
    • trace

      public static void trace(String option, Supplier<String> messageSupplier, Throwable exception)
      Lazily prints a message to the OSGi tracing if started and plug-in is in debug mode.
      Parameters:
      option - the option that will control whether the trace statement is printed (e.g., "/debug/myComponent") or null if none
      messageSupplier - Supplier of lazy message that is to be printed. Must not be null.
      exception - Exception to be attached to the message or null if none.
    • isDebugging

      public boolean isDebugging()
      Overrides:
      isDebugging in class org.eclipse.core.runtime.Plugin
    • start

      public void start(org.osgi.framework.BundleContext bundleContext) throws Exception
      Specified by:
      start in interface org.osgi.framework.BundleActivator
      Overrides:
      start in class org.eclipse.core.runtime.Plugin
      Throws:
      Exception
    • stop

      public void stop(org.osgi.framework.BundleContext bundleContext) throws Exception
      Specified by:
      stop in interface org.osgi.framework.BundleActivator
      Overrides:
      stop in class org.eclipse.core.runtime.Plugin
      Throws:
      Exception
    • optionsChanged

      public void optionsChanged(org.eclipse.osgi.service.debug.DebugOptions options)
      Specified by:
      optionsChanged in interface org.eclipse.osgi.service.debug.DebugOptionsListener
    • getInjector

      public com.google.inject.Injector getInjector()
      Gets Guice injector of the plug-in.
      Returns:
      the injector, never null