Class DtSnapshotUiPlugin

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

public class DtSnapshotUiPlugin extends org.eclipse.ui.plugin.AbstractUIPlugin implements org.eclipse.osgi.service.debug.DebugOptionsListener
DT Snapshot UI 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
     
    com.google.inject.Injector
    Gets Guice injector of the plug-in.
    boolean
     
    static void
    logError(String message)
    Logs an error message.
    static void
    Logs an error.
    static void
    logInfo(String message)
    Logs an information message.
    void
    optionsChanged(org.eclipse.osgi.service.debug.DebugOptions options)
     
    void
    start(org.osgi.framework.BundleContext context)
     
    void
    stop(org.osgi.framework.BundleContext context)
     
    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.ui.plugin.AbstractUIPlugin

    createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup

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

    find, find, getBundle, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, openStream, openStream, savePluginPreferences, setDebugging, toString

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • DtSnapshotUiPlugin

      public DtSnapshotUiPlugin()
  • Method Details

    • getDefault

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

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

      public static void logError(String message)
      Logs an error message.
      Parameters:
      message - the message, cannot be null
    • logInfo

      public static void logInfo(String message)
      Logs an information message.
      Parameters:
      message - the message, cannot be 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 context) throws Exception
      Specified by:
      start in interface org.osgi.framework.BundleActivator
      Overrides:
      start in class org.eclipse.ui.plugin.AbstractUIPlugin
      Throws:
      Exception
    • stop

      public void stop(org.osgi.framework.BundleContext context) throws Exception
      Specified by:
      stop in interface org.osgi.framework.BundleActivator
      Overrides:
      stop in class org.eclipse.ui.plugin.AbstractUIPlugin
      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