Class OOEclipsePlugin

  • All Implemented Interfaces:
    org.osgi.framework.BundleActivator

    public class OOEclipsePlugin
    extends org.eclipse.ui.plugin.AbstractUIPlugin
    Plugin entry point, it is used by Eclipse as a bundle.

    This class contains the main constants of the plugin, like its ID, the UNO project nature. The internationalization method is provided in this class too.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.eclipse.swt.graphics.RGB BACKGROUND  
      static org.eclipse.swt.graphics.RGB COMMENT  
      static org.eclipse.swt.graphics.RGB DEFAULT  
      static org.eclipse.swt.graphics.RGB DOC_COMMENT  
      static org.eclipse.swt.graphics.RGB KEYWORD  
      static java.lang.String LOGLEVEL_PREFERENCE_KEY
      Log level preference key, used to store the preferences.
      static org.eclipse.swt.graphics.RGB MODIFIER  
      static java.lang.String OOECLIPSE_PLUGIN_ID
      ooeclipseintegration plugin id.
      static java.lang.String OOO_CONFIG
      Plugin home relative path for the ooo configuration file.
      static org.eclipse.swt.graphics.RGB PREPROCESSOR_COMMAND  
      static org.eclipse.swt.graphics.RGB STRING  
      static org.eclipse.swt.graphics.RGB TYPE  
      static java.lang.String UNO_EDITOR_ID
      Uno idl editor ID.
      static java.lang.String UNO_NATURE_ID
      uno nature id.
      static org.eclipse.swt.graphics.RGB XML_TAG  
      • 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
      OOEclipsePlugin()
      The constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static OOEclipsePlugin getDefault()  
      static org.eclipse.swt.graphics.Image getImage​(java.lang.String pKey)
      Returns the image corresponding to the provided key.
      static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor​(java.lang.String pKey)
      Returns the image descriptor corresponding to the provided key.
      ImageManager getImageManager()
      Returns the image manager.
      static void setDefaultPreferences()
      Method that initialize the default preferences of the plugin.
      void start​(org.osgi.framework.BundleContext pContext)
      void stop​(org.osgi.framework.BundleContext pContext)
      • 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, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
      • Methods inherited from class java.lang.Object

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

      • OOO_CONFIG

        public static final java.lang.String OOO_CONFIG
        Plugin home relative path for the ooo configuration file.
        See Also:
        Constant Field Values
      • OOECLIPSE_PLUGIN_ID

        public static final java.lang.String OOECLIPSE_PLUGIN_ID
        ooeclipseintegration plugin id.
        See Also:
        Constant Field Values
      • UNO_NATURE_ID

        public static final java.lang.String UNO_NATURE_ID
        uno nature id.
        See Also:
        Constant Field Values
      • UNO_EDITOR_ID

        public static final java.lang.String UNO_EDITOR_ID
        Uno idl editor ID.
        See Also:
        Constant Field Values
      • LOGLEVEL_PREFERENCE_KEY

        public static final java.lang.String LOGLEVEL_PREFERENCE_KEY
        Log level preference key, used to store the preferences.
        See Also:
        Constant Field Values
      • STRING

        public static final org.eclipse.swt.graphics.RGB STRING
      • BACKGROUND

        public static final org.eclipse.swt.graphics.RGB BACKGROUND
      • DEFAULT

        public static final org.eclipse.swt.graphics.RGB DEFAULT
      • KEYWORD

        public static final org.eclipse.swt.graphics.RGB KEYWORD
      • TYPE

        public static final org.eclipse.swt.graphics.RGB TYPE
      • COMMENT

        public static final org.eclipse.swt.graphics.RGB COMMENT
      • DOC_COMMENT

        public static final org.eclipse.swt.graphics.RGB DOC_COMMENT
      • XML_TAG

        public static final org.eclipse.swt.graphics.RGB XML_TAG
      • MODIFIER

        public static final org.eclipse.swt.graphics.RGB MODIFIER
      • PREPROCESSOR_COMMAND

        public static final org.eclipse.swt.graphics.RGB PREPROCESSOR_COMMAND
    • Constructor Detail

      • OOEclipsePlugin

        public OOEclipsePlugin()
        The constructor.
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext pContext)
                   throws java.lang.Exception
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        Overrides:
        start in class org.eclipse.ui.plugin.AbstractUIPlugin
        Throws:
        java.lang.Exception
      • stop

        public void stop​(org.osgi.framework.BundleContext pContext)
                  throws java.lang.Exception
        Specified by:
        stop in interface org.osgi.framework.BundleActivator
        Overrides:
        stop in class org.eclipse.ui.plugin.AbstractUIPlugin
        Throws:
        java.lang.Exception
      • getDefault

        public static OOEclipsePlugin getDefault()
        Returns:
        the instance of the OOo Eclipse bundle.
      • getImageManager

        public ImageManager getImageManager()
        Returns the image manager. If it is null, this method wil create it before using it.
        Returns:
        the image manager
      • getImage

        public static org.eclipse.swt.graphics.Image getImage​(java.lang.String pKey)
        Returns the image corresponding to the provided key. If the image file or the key doesn't exists, the method returns null.
        Parameters:
        pKey - Key designing the image
        Returns:
        the image associated to the key
        See Also:
        ImageManager.getImage(String)
      • getImageDescriptor

        public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor​(java.lang.String pKey)
        Returns the image descriptor corresponding to the provided key. If the image file or the key doesn't exists, the method returns null.
        Parameters:
        pKey - Key designing the image
        Returns:
        the image descriptor associated to the key
        See Also:
        ImageManager.getImageDescriptor(String)
      • setDefaultPreferences

        public static void setDefaultPreferences()
        Method that initialize the default preferences of the plugin.