Class BslUiPlugin

java.lang.Object
org.eclipse.core.runtime.Plugin
org.eclipse.ui.plugin.AbstractUIPlugin
com._1c.g5.v8.dt.bsl.ui.internal.BslActivator
com._1c.g5.v8.dt.internal.bsl.ui.BslUiPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class BslUiPlugin extends com._1c.g5.v8.dt.bsl.ui.internal.BslActivator
Plugin for Bsl
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class com._1c.g5.v8.dt.bsl.ui.internal.BslActivator

    COM__1C_G5_V8_DT_BSL_BSL

    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
     
    protected com.google.inject.Injector
    Creates injector for the bundle.
    static org.eclipse.core.runtime.IStatus
     
    org.eclipse.swt.graphics.Color
    getColor(org.eclipse.swt.graphics.RGB rgb)
    Returns color for given rgb.
    Returns the shared instance
    static org.eclipse.swt.graphics.Image
    getImage(String symbolicName)
     
    static org.eclipse.jface.resource.ImageDescriptor
    getImageDescriptor(String symbolicName)
     
    List<com.google.inject.Module>
    Returns list of plugin guice modules for given language.
    protected void
    initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry reg)
     
    static void
    log(org.eclipse.core.runtime.IStatus status)
     
    static void
    logError(Throwable throwable)
    Writes a throwable to the plugin log as error status.
    void
    start(org.osgi.framework.BundleContext context)
     
    void
    stop(org.osgi.framework.BundleContext context)
     

    Methods inherited from class com._1c.g5.v8.dt.bsl.ui.internal.BslActivator

    getInjector, getInstance, getRuntimeModule, getSharedStateModule, getUiModule

    Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin

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

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

    find, find, getBundle, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, 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

    • BslUiPlugin

      public BslUiPlugin()
  • Method Details

    • getDefault

      public static BslUiPlugin getDefault()
      Returns the shared instance
      Returns:
      the shared instance, never null
    • log

      public static void log(org.eclipse.core.runtime.IStatus status)
    • logError

      public static void logError(Throwable throwable)
      Writes a throwable to the plugin log as error status.
      Parameters:
      throwable - throwable, cannot be null
    • createErrorStatus

      public static org.eclipse.core.runtime.IStatus createErrorStatus(String msg, Throwable e)
    • createWarningStatus

      public static org.eclipse.core.runtime.IStatus createWarningStatus(String msg)
    • getImage

      public static org.eclipse.swt.graphics.Image getImage(String symbolicName)
    • getImageDescriptor

      public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(String symbolicName)
    • start

      public void start(org.osgi.framework.BundleContext context) throws Exception
      Specified by:
      start in interface org.osgi.framework.BundleActivator
      Overrides:
      start in class com._1c.g5.v8.dt.bsl.ui.internal.BslActivator
      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 com._1c.g5.v8.dt.bsl.ui.internal.BslActivator
      Throws:
      Exception
    • getModules

      public List<com.google.inject.Module> getModules()
      Returns list of plugin guice modules for given language.
      Returns:
      list of plugin guice modules for given language, never null
    • getColor

      public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)
      Returns color for given rgb. User should not dispose returned color.
      Parameters:
      rgb - - rgb to get color, cannot be null.
      Returns:
      color for given rgb, never null.
    • initializeImageRegistry

      protected void initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry reg)
      Overrides:
      initializeImageRegistry in class org.eclipse.ui.plugin.AbstractUIPlugin
    • createInjector

      protected com.google.inject.Injector createInjector(String language)
      Creates injector for the bundle.
      Note!
      Here should not create new injector via {@link Injector.createChildInjector()} - because we need to use common injector with BSL-core. All UI dependencies contributes with BslUiContributorModule into BSL-core extension point.
      After declared all BSL-core's services in Guice-modules this restriction may be removed and this UI bundle may create its own child injector.
      Overrides:
      createInjector in class com._1c.g5.v8.dt.bsl.ui.internal.BslActivator