public class ConfigPlugin
extends org.eclipse.ui.plugin.AbstractUIPlugin
Constructors and life cycle methods
If the plugin.xml of a plug-in indicates <?eclipse version="3.0"?> and its prerequisite list includes org.eclipse.core.runtime, the default constructor of the plug-in will be used and start(BundleContext) and stop(BundleContext) are called as life cycle methods.
If the plugin.xml of a plug-in indicates <?eclipse version="3.0"?> and its prerequisite list includes org.eclipse.core.runtime.compatibility, the #Plugin(IPluginDescriptor) constructor is used and AbstractUIPlugin.startup() and AbstractUIPlugin.shutdown() are called as life cycle methods. Note that in this situation, start() is called before startup() and stop() is called after shutdown.
If the plugin.xml of your plug-in does not indicate <?eclipse version="3.0"?> it is therefore not a 3.0 plug-in. Consequently the #Plugin(IPluginDescriptor) is used and AbstractUIPlugin.startup() and AbstractUIPlugin.shutdown() are called as life cycle methods.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static boolean | DEBUG
Signifies whether DEBUG mode is enabled
|
static boolean | DEBUG_LOGGING
Signifies whether DEBUG logging is enabled
|
static java.lang.String | PLUGIN_ID
Unique identifier constant (value "com.ibm.commerce.telesales.config") for the Sales Center configuration plug-in.
|
Constructor and Description |
---|
ConfigPlugin()
Constructs an instance of this plug-in run-time class.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String | format(java.lang.String key, java.lang.String arg)
Should be used to get a text string from a resource bundle.
|
static java.lang.String | format(java.lang.String key, java.lang.String[] args)
Should be used to get a text string from a resource bundle.
|
static long | getDefaultImageStoreDiskSpace()
Returns the default image store disk space (5% of the available space).
|
static org.eclipse.core.runtime.IPath | getDefaultImageStoreLocation()
Returns the read/write location for storing images.
|
static long | getDirectorySize(java.io.File directory)
Returns the number of bytes in size for a given directory.
|
static long | getFreeSpace(java.io.File file)
Returns the number of bytes free on the volume where the given file is located.
|
static ConfigPlugin | getPlugin()
Returns this plug-in instance.
|
java.util.ResourceBundle | getResourceBundle()
Returns the plugin's resource bundle,
|
static java.lang.String | getString(java.lang.String key)
Returns the string from the plugin's resource bundle, or 'key' if not found.
|
static java.lang.String | getUniqueIdentifier()
Convenience method which returns the unique identifier of this plugin.
|
protected void | initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore prefs)
Deprecated.
use PluginPreferenceInitializer#initializeDefaultPreferences to initialize preferences.
|
static void | log(org.eclipse.core.runtime.IStatus status)
Log a status message.
|
static void | log(java.lang.Throwable exception)
Log an exception.
|
static void | logErrorMessage(java.lang.String message)
Log an error message.
|
static void | logException(java.lang.Throwable exception)
Log an exception.
|
static void | logException(java.lang.Throwable exception, java.lang.String title, java.lang.String message)
Log an exception.
|
void | start(org.osgi.framework.BundleContext context)
The start method starts up this plug-ins.
|
void | stop(org.osgi.framework.BundleContext context)
Stops this plug-in.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String PLUGIN_ID
public static boolean DEBUG
public static boolean DEBUG_LOGGING
public ConfigPlugin()
An instance of this plug-in run-time class is automatically created when the facilities provided by the Multichannel Sales Center Configuration plug-in are required. Clients must never explicitly instantiate a plug-in run-time class.
public static java.lang.String format(java.lang.String key, java.lang.String[] args)
public static java.lang.String format(java.lang.String key, java.lang.String arg)
public static ConfigPlugin getPlugin()
public java.util.ResourceBundle getResourceBundle()
public static java.lang.String getString(java.lang.String key)
public static java.lang.String getUniqueIdentifier()
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception
protected void initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore prefs)
public static void log(org.eclipse.core.runtime.IStatus status)
public static void logErrorMessage(java.lang.String message)
public static void logException(java.lang.Throwable exception, java.lang.String title, java.lang.String message)
public static void logException(java.lang.Throwable exception)
public static void log(java.lang.Throwable exception)
public static org.eclipse.core.runtime.IPath getDefaultImageStoreLocation()
public static long getDefaultImageStoreDiskSpace()
public static long getDirectorySize(java.io.File directory) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.io.IOException
public static long getFreeSpace(java.io.File file) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.io.IOException
Creates a temp file (in the standard location) that will execute an OS-dependent script to obtain this information. This temp file is erased upon JVM exit.
Warning: there will be a very slight error if the volume containing file is the same one where the temp file is created. This is because the free space returned will be reduced slightly by the temp file's presence. This brings up another obvious point: the value returned by this method will always be inaccurate if other processes are also writing or deleting files on the volume.