org.apache.directory.studio.apacheds
Class ApacheDsPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.apache.directory.studio.apacheds.ApacheDsPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class ApacheDsPlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin

The activator class controls the plug-in life cycle


Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
ApacheDsPlugin()
          The constructor
 
Method Summary
static ApacheDsPlugin getDefault()
          Returns the shared instance
 org.eclipse.swt.graphics.Image getImage(java.lang.String key)
          Use this method to get SWT images.
 org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String key)
          Use this method to get SWT images.
 java.util.PropertyResourceBundle getPluginProperties()
          Gets the plugin properties.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
          (non-Javadoc)
 
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, getDescriptor, 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
 

Constructor Detail

ApacheDsPlugin

public ApacheDsPlugin()
The constructor

Method Detail

getDefault

public static ApacheDsPlugin getDefault()
Returns the shared instance

Returns:
the shared instance

start

public void start(org.osgi.framework.BundleContext context)
           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 context)
          throws java.lang.Exception
(non-Javadoc)

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)

getImageDescriptor

public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String key)
Use this method to get SWT images. Use the IMG_ constants from PluginConstants for the key.

Parameters:
key - The key (relative path to the image in filesystem)
Returns:
The image descriptor or null

getImage

public org.eclipse.swt.graphics.Image getImage(java.lang.String key)
Use this method to get SWT images. Use the IMG_ constants from PluginConstants for the key. A ImageRegistry is used to manage the the key->Image mapping.

Note: Don't dispose the returned SWT Image. It is disposed automatically when the plugin is stopped.

Parameters:
key - The key (relative path to the image in filesystem)
Returns:
The SWT Image or null

getPluginProperties

public java.util.PropertyResourceBundle getPluginProperties()
Gets the plugin properties.

Returns:
the plugin properties


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.