Class ImportXmlPlugin

  • All Implemented Interfaces:
    EventListener, org.eclipse.osgi.service.debug.DebugOptionsListener, org.osgi.framework.BundleActivator

    public class ImportXmlPlugin
    extends org.eclipse.core.runtime.Plugin
    implements org.eclipse.osgi.service.debug.DebugOptionsListener
    The activator class controls the plug-in life cycle
    • Constructor Summary

      Constructors 
      Constructor Description
      ImportXmlPlugin()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.core.runtime.IStatus createErrorStatus​(String msg, Throwable e)
      Create new error status with message
      static org.eclipse.core.runtime.IStatus createWarningStatus​(String msg)
      Create new warning status with message
      static ImportXmlPlugin getDefault()
      Returns the shared instance
      com.google.inject.Injector getInjector()  
      boolean isDebugging()  
      static void log​(Throwable t)
      Logs the status to eclipse log
      static void log​(org.eclipse.core.runtime.IStatus status)
      Logs the status to eclipse log
      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 message)
      Prints the given message to the OSGi tracing (if started)
      static void trace​(String message, Throwable error)
      Prints the given message to the OSGi tracing (if started)
      static void traceEntry​(Object... methodArgument)
      Add a trace message level stating that a method with the specified arguments values is being executed for the specified option.
      static void traceExit()
      Add a trace message level stating that a method has completed execution for the specified option.
      • Methods inherited from class org.eclipse.core.runtime.Plugin

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

      • ImportXmlPlugin

        public ImportXmlPlugin()
    • Method Detail

      • getDefault

        public static ImportXmlPlugin getDefault()
        Returns the shared instance
        Returns:
        the shared instance
      • log

        public static void log​(org.eclipse.core.runtime.IStatus status)
        Logs the status to eclipse log
        Parameters:
        status - - status with message
      • log

        public static void log​(Throwable t)
        Logs the status to eclipse log
        Parameters:
        status - - status with message
      • createErrorStatus

        public static org.eclipse.core.runtime.IStatus createErrorStatus​(String msg,
                                                                         Throwable e)
        Create new error status with message
        Parameters:
        message - String
        throwable -
        Returns:
        new instance of Status
      • createWarningStatus

        public static org.eclipse.core.runtime.IStatus createWarningStatus​(String msg)
        Create new warning status with message
        Parameters:
        message - String
        Returns:
        new instance of Status
      • trace

        public static void trace​(String message)
        Prints the given message to the OSGi tracing (if started)
        Parameters:
        message - the message to print or null
      • trace

        public static void trace​(String message,
                                 Throwable error)
        Prints the given message to the OSGi tracing (if started)
        Parameters:
        message - the message to print or null
        error - the exception to trace or null
      • traceEntry

        public static void traceEntry​(Object... methodArgument)
        Add a trace message level stating that a method with the specified arguments values is being executed for the specified option. The result of String.valueOf(Object) on each argument will be written to the trace file.
        Parameters:
        option - The name of the boolean option that will control whether the trace statement is printed (e.g., "/debug/myComponent"), or null
        methodArguments - A list of object arguments for the method being executed
      • traceExit

        public static void traceExit()
        Add a trace message level stating that a method has completed execution for the specified option.
        Parameters:
        option - the name of the boolean option that will control whether the trace statement is printed (e.g., "/import/myComponent"), or null
      • 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.core.runtime.Plugin
        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.core.runtime.Plugin
        Throws:
        Exception
      • getInjector

        public com.google.inject.Injector getInjector()
        Returns:
        plugin injector
      • optionsChanged

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

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