org.apache.cactus.eclipse.runner.ui
Class CactusPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.apache.cactus.eclipse.runner.ui.CactusPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

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

The plug-in runtime class for the Cactus plug-in.

Version:
$Id: CactusPlugin.java 238816 2004-02-29 16:36:46Z vmassol $

Field Summary
static java.lang.String CACTUS_CLIENT_LIBRARY_PATH
          Name of the client libraries folder
static java.lang.String CACTUS_COMMON_LIBRARY_PATH
          Name of the common libraries folder
static java.lang.String CACTUS_LIBRARY_PATH
          Path to the plugin's library directory
static java.lang.String CACTUS_RUN_IMAGE
           
static java.lang.String CACTUS_VARIABLE_ECLIPSE_HOME
          The location where Eclipse was installed;
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
CactusPlugin(org.eclipse.core.runtime.IPluginDescriptor theDescription)
           
 
Method Summary
static org.eclipse.core.runtime.CoreException createCoreException(java.lang.String theMessageKey, java.lang.String theString, java.lang.Throwable theException)
          Helper method for other classes.
static org.eclipse.core.runtime.CoreException createCoreException(java.lang.String theMessageKey, java.lang.Throwable theException)
          Helper method for other classes.
protected  org.eclipse.jface.resource.ImageRegistry createImageRegistry()
           
static void displayErrorMessage(java.lang.String theTitle, java.lang.String theMessage, org.eclipse.core.runtime.IStatus theStatus)
          Displays an error dialog.
static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()
           
static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()
           
static java.lang.String[] getContainerIds()
           
static IContainerManager getContainerManager(boolean theInitializeFlag)
          Returns a container manager.
static CactusPlugin getDefault()
           
static org.eclipse.swt.widgets.Display getDisplay()
           
static java.lang.String getPluginId()
           
protected  void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore theStore)
          Initializes all preferences to their default values.
static void log(org.eclipse.core.runtime.IStatus theStatus)
           
static void log(java.lang.String theMessage)
           
static void log(java.lang.Throwable theThrowable)
           
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, start, startup, stop
 
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
 

Field Detail

CACTUS_VARIABLE_ECLIPSE_HOME

public static final java.lang.String CACTUS_VARIABLE_ECLIPSE_HOME
The location where Eclipse was installed;

See Also:
Constant Field Values

CACTUS_LIBRARY_PATH

public static final java.lang.String CACTUS_LIBRARY_PATH
Path to the plugin's library directory

See Also:
Constant Field Values

CACTUS_COMMON_LIBRARY_PATH

public static final java.lang.String CACTUS_COMMON_LIBRARY_PATH
Name of the common libraries folder

See Also:
Constant Field Values

CACTUS_CLIENT_LIBRARY_PATH

public static final java.lang.String CACTUS_CLIENT_LIBRARY_PATH
Name of the client libraries folder

See Also:
Constant Field Values

CACTUS_RUN_IMAGE

public static final java.lang.String CACTUS_RUN_IMAGE
See Also:
Constant Field Values
Constructor Detail

CactusPlugin

public CactusPlugin(org.eclipse.core.runtime.IPluginDescriptor theDescription)
See Also:
Plugin.Plugin(IPluginDescriptor)
Method Detail

getDefault

public static CactusPlugin getDefault()
Returns:
the single instance of this plug-in runtime class

getActiveWorkbenchShell

public static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()
Returns:
the active workbench shell

getActiveWorkbenchWindow

public static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()
Returns:
the active workbench window

getPluginId

public static java.lang.String getPluginId()
Returns:
the plugin identifier

log

public static void log(java.lang.String theMessage)
Parameters:
theMessage - the message to log

log

public static void log(java.lang.Throwable theThrowable)
Parameters:
theThrowable - throwable to log

log

public static void log(org.eclipse.core.runtime.IStatus theStatus)
Parameters:
theStatus - status to log

getDisplay

public static org.eclipse.swt.widgets.Display getDisplay()
Returns:
the current display

initializeDefaultPreferences

protected void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore theStore)
Initializes all preferences to their default values.

Overrides:
initializeDefaultPreferences in class org.eclipse.ui.plugin.AbstractUIPlugin
Parameters:
theStore - the preference store

getContainerManager

public static IContainerManager getContainerManager(boolean theInitializeFlag)
                                             throws org.eclipse.core.runtime.CoreException
Returns a container manager.

Parameters:
theInitializeFlag - true if the container manager should be initialized
Returns:
a container provider to use for Cactus tests or null if Jetty is selected as the container.
Throws:
org.eclipse.core.runtime.CoreException - if the container manager can't be contructed

displayErrorMessage

public static void displayErrorMessage(java.lang.String theTitle,
                                       java.lang.String theMessage,
                                       org.eclipse.core.runtime.IStatus theStatus)
Displays an error dialog.

Parameters:
theTitle - title of the dialog
theMessage - message to display in the dialog
theStatus - status of the error

createCoreException

public static org.eclipse.core.runtime.CoreException createCoreException(java.lang.String theMessageKey,
                                                                         java.lang.Throwable theException)
Helper method for other classes. Returns a CoreException with a message corresponding to the given message key.

Parameters:
theMessageKey - the key of the message to be thrown
theException - a low-level exception, or null if not applicable
Returns:
the constructed CoreException

createCoreException

public static org.eclipse.core.runtime.CoreException createCoreException(java.lang.String theMessageKey,
                                                                         java.lang.String theString,
                                                                         java.lang.Throwable theException)
Helper method for other classes. Returns a CoreException with a message corresponding to the given message key and the additional String.

Parameters:
theMessageKey - the key of the message to be thrown
theString - String to be concatenated with the message
theException - a low-level exception, or null if not applicable
Returns:
the constructed CoreException

getContainerIds

public static java.lang.String[] getContainerIds()
See Also:
IContainerManager#getContainerIds()

createImageRegistry

protected org.eclipse.jface.resource.ImageRegistry createImageRegistry()
Overrides:
createImageRegistry in class org.eclipse.ui.plugin.AbstractUIPlugin


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.