Package com._1c.g5.v8.dt.internal.bsl.ui
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
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.core.runtime.IStatus
createErrorStatus
(String msg, Throwable e) protected com.google.inject.Injector
createInjector
(String language) 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.static BslUiPlugin
Returns the shared instancestatic org.eclipse.swt.graphics.Image
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
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
-
Field Details
-
PLUGIN_ID
- See Also:
-
-
Constructor Details
-
BslUiPlugin
public BslUiPlugin()
-
-
Method Details
-
getDefault
Returns the shared instance- Returns:
- the shared instance, never
null
-
log
public static void log(org.eclipse.core.runtime.IStatus status) -
logError
Writes a throwable to the plugin log as error status.- Parameters:
throwable
- throwable, cannot benull
-
createErrorStatus
-
createWarningStatus
-
getImage
-
getImageDescriptor
-
start
- Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
- Overrides:
start
in classcom._1c.g5.v8.dt.bsl.ui.internal.BslActivator
- Throws:
Exception
-
stop
- Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
- Overrides:
stop
in classcom._1c.g5.v8.dt.bsl.ui.internal.BslActivator
- Throws:
Exception
-
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 benull
.- Returns:
- color for given rgb, never
null
.
-
initializeImageRegistry
protected void initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry reg) - Overrides:
initializeImageRegistry
in classorg.eclipse.ui.plugin.AbstractUIPlugin
-
createInjector
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 withBslUiContributorModule
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 classcom._1c.g5.v8.dt.bsl.ui.internal.BslActivator
-