## org.eclipse.datatools.sqltools.sqleditor.internal
Class SQLEditorPlugin

    java.lang.Object
      org.eclipse.core.runtime.Plugin
          org.eclipse.ui.plugin.AbstractUIPlugin
              org.eclipse.datatools.sqltools.sqleditor.internal.SQLEditorPlugin

All Implemented Interfaces:
  org.osgi.framework.BundleActivator

    public class SQLEditorPlugin

extends org.eclipse.ui.plugin.AbstractUIPlugin

The main plugin class.

Field Summary
`static java.lang.String` `PLUGIN_ID`

Fields inherited from class org.eclipse.core.runtime.Plugin
`PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME`

Constructor Summary
`SQLEditorPlugin()` Constructs an instance of this class.

Method Summary
`org.eclipse.core.runtime.IStatus` `createErrorStatus(java.lang.String message)`
`org.eclipse.core.runtime.IStatus` `createErrorStatus(java.lang.String message, java.lang.Throwable e)`
`org.eclipse.core.runtime.IStatus` `createErrorStatus(java.lang.Throwable e)`
`static org.eclipse.ui.IEditorPart` `getActiveEditor()`
`static org.eclipse.ui.IWorkbenchPage` `getActiveWorkbenchPage()` Get active workbench page.
`static org.eclipse.swt.widgets.Shell` `getActiveWorkbenchShell()`
`static org.eclipse.ui.IWorkbenchWindow` `getActiveWorkbenchWindow()` Get active workbench window.
`static SQLEditorPlugin` `getDefault()` Returns the shared instance of this plug-in.
`static org.eclipse.swt.widgets.Display` `getDisplay()`
`java.util.Properties` `getProperties()` Returns the plugin's properties,
`org.eclipse.jface.text.rules.RuleBasedScanner` `getSQLCodeScanner()` Gets a SQL code scanner.
`SQLColorProvider` `getSQLColorProvider()` Gets a SQL color provider.
`static java.util.Collection` `getSQLEditorActionContributorExtension()`
`SQLPartitionScanner` `getSQLPartitionScanner()` Get a scanner for creating SQL partitions.
`static org.eclipse.swt.widgets.Display` `getStandardDisplay()` Returns the standard display to be used.
`org.eclipse.jface.text.templates.ContextTypeRegistry` `getTemplateContextTypeRegistry()` Returns this plug-in's context type registry.
`SQLContributionTemplateStore` `getTemplateStore()` Returns this plug-in's template store.
`void` `log(org.eclipse.core.runtime.IStatus status)` Logs runtime status.
`void` `log(java.lang.String message)` Logs error message.
`void` `log(java.lang.String message, java.lang.Throwable e)` Logs an error message with an exception.
`void` `log(java.lang.Throwable e)` Logs and exception.
`void` `start(org.osgi.framework.BundleContext context)` Handles plug-in activation.
`void` `stop(org.osgi.framework.BundleContext context)` Handles plug-in deactivation.

Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
`getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, shutdown, startup`

Methods inherited from class org.eclipse.core.runtime.Plugin
`find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### PLUGIN_ID

    public static final java.lang.String PLUGIN_ID

See Also:
  Constant Field Values

Constructor Detail

### SQLEditorPlugin

    public SQLEditorPlugin()

  Constructs an instance of this class. This is the default constructor.

Method Detail

### start

    public void start(org.osgi.framework.BundleContext context)
               throws java.lang.Exception

  Handles plug-in activation.

  Specified by:
    `start` in interface `org.osgi.framework.BundleActivator`
  Overrides:
    `start` in class `org.eclipse.ui.plugin.AbstractUIPlugin`
  Throws:
    `java.lang.Exception`
  See Also:
    `AbstractUIPlugin.start(org.osgi.framework.BundleContext)`, `Plugin.start(org.osgi.framework.BundleContext)`

### stop

    public void stop(org.osgi.framework.BundleContext context)
              throws java.lang.Exception

  Handles plug-in deactivation.

  Specified by:
    `stop` in interface `org.osgi.framework.BundleActivator`
  Overrides:
    `stop` in class `org.eclipse.ui.plugin.AbstractUIPlugin`
  Throws:
    `java.lang.Exception`
  See Also:
    `AbstractUIPlugin.stop(org.osgi.framework.BundleContext)`, `Plugin.stop(org.osgi.framework.BundleContext)`

### getDefault

    public static SQLEditorPlugin getDefault()

  Returns the shared instance of this plug-in.

  Returns:
    the shared instance of this plug-in

### getSQLPartitionScanner

    public SQLPartitionScanner getSQLPartitionScanner()

  Get a scanner for creating SQL partitions.

  Returns:
    the SQL partition scanner

### getSQLCodeScanner

    public org.eclipse.jface.text.rules.RuleBasedScanner getSQLCodeScanner()

  Gets a SQL code scanner.

  Returns:
    the SQL code scanner

### getSQLColorProvider

    public SQLColorProvider getSQLColorProvider()

  Gets a SQL color provider.

  Returns:
    the SQL color provider

### log

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

  Logs runtime status.

  Parameters:
    `status` - Runtime status.

### log

    public void log(java.lang.String message)

  Logs error message.

  Parameters:
    `message` - Error message.

### log

    public void log(java.lang.String message,
                    java.lang.Throwable e)

  Logs an error message with an exception.

  Parameters:
    `e` - Exception.

### log

    public void log(java.lang.Throwable e)

  Logs and exception.

  Parameters:
    `e` - Exception.

### createErrorStatus

    public org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.String message)

### createErrorStatus

    public org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.Throwable e)

### createErrorStatus

    public org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.String message,
                                                              java.lang.Throwable e)

### getTemplateStore

    public SQLContributionTemplateStore getTemplateStore()

  Returns this plug-in's template store.

  Returns:
    the template store of this plug-in instance

### getTemplateContextTypeRegistry

    public org.eclipse.jface.text.templates.ContextTypeRegistry getTemplateContextTypeRegistry()

  Returns this plug-in's context type registry.

  Returns:
    the context type registry for this plug-in instance

### getProperties

    public java.util.Properties getProperties()

  Returns the plugin's properties,

### getStandardDisplay

    public static org.eclipse.swt.widgets.Display getStandardDisplay()

  Returns the standard display to be used. The method first checks, if the thread calling this method has an associated dispaly. If so, this display is returned. Otherwise the method returns the default display.

### getActiveWorkbenchPage

    public static org.eclipse.ui.IWorkbenchPage getActiveWorkbenchPage()

  Get active workbench page.

  This method acts as a convenience for plug-in implementors.

  Returns:
    IWorkbenchPage the workbench page for this plug-in

### getActiveWorkbenchWindow

    public static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()

  Get active workbench window.

  This method exists as a convenience for plug-in implementors.

  Returns:
    IWorkbenchWindow the workbench for this plug-in

### getActiveWorkbenchShell

    public static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()

  Returns:

### getDisplay

    public static org.eclipse.swt.widgets.Display getDisplay()

### getActiveEditor

    public static org.eclipse.ui.IEditorPart getActiveEditor()

### getSQLEditorActionContributorExtension

    public static java.util.Collection getSQLEditorActionContributorExtension()