public final class Activator extends ExtendedPlugin
Activator class controls the plug-in life cycle.
Warning: Users should not explicitly instantiate this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
Activator.Startup
Plug-in early startup.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PLUGIN_ID
The plug-in identifier.
|
console| Constructor and Description |
|---|
Activator()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
awaitServices(long timeout,
java.util.concurrent.TimeUnit unit)
Waits blocking until all supplied extensions
are processed, core services loaded and started.
|
static void |
awaitServices(TimeValue timeout) |
static ClassResolver |
classResolver()
Returns primary
ClassResolver utility to resolve unknown classes. |
static java.util.List<org.osgi.framework.Bundle> |
contributingBundles()
Returns a list of bundles contributing extensions to this plug-in.
|
static PluginConsole |
defaultConsole()
Gets the shared console.
|
static Activator |
defaultInstance()
Gets the shared instance.
|
static java.util.Set<java.lang.String> |
extensionContributors()
Returns a set of extension contributors to this plug-in.
|
static boolean |
loadedServices()
Determines whether all supplied extensions
are processed, core services loaded and started.
|
static void |
loadServices(java.lang.Runnable hook,
long timeout,
java.util.concurrent.TimeUnit unit)
Processes supplied extensions, loads and starts core services.
|
static void |
loadServices(java.lang.Runnable hook,
TimeValue timeout) |
void |
start(org.osgi.framework.BundleContext context)
Starts this plug-in.
|
void |
stop(org.osgi.framework.BundleContext context)
Stops this plug-in.
|
static void |
unloadServices(java.lang.Runnable hook,
long timeout,
java.util.concurrent.TimeUnit unit)
Processes supplied extensions, stops and unloads core services.
|
static void |
unloadServices(java.lang.Runnable hook,
TimeValue timeout) |
getConsolefind, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toStringpublic static final java.lang.String PLUGIN_ID
public static Activator defaultInstance()
nullpublic static PluginConsole defaultConsole()
nullpublic static java.util.Set<java.lang.String> extensionContributors()
public static java.util.List<org.osgi.framework.Bundle> contributingBundles()
public static ClassResolver classResolver()
ClassResolver utility to resolve unknown classes.public static void loadServices(java.lang.Runnable hook,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.util.concurrent.TimeoutException
action - executed after services load prior to start, not nulltimeout - the maximum time to loadunit - the time unit of the timeout argumentjava.lang.RuntimeException - if an error occurredjava.util.concurrent.TimeoutException - if the load timed outpublic static void loadServices(java.lang.Runnable hook,
TimeValue timeout)
throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutExceptionpublic static void unloadServices(java.lang.Runnable hook,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.util.concurrent.TimeoutException
action - executed after services stop prior to unload, not nulltimeout - the maximum time to unloadunit - the time unit of the timeout argumentjava.lang.RuntimeException - if an error occurredjava.util.concurrent.TimeoutException - if the unload timed outpublic static void unloadServices(java.lang.Runnable hook,
TimeValue timeout)
throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutExceptionpublic static boolean loadedServices()
public static void awaitServices(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.util.concurrent.TimeoutException
timeout - the maximum time to waitunit - the time unit of the timeout argumentjava.util.concurrent.TimeoutException - if the wait timed outpublic static void awaitServices(TimeValue timeout) throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutExceptionpublic void start(org.osgi.framework.BundleContext context)
throws java.lang.Exception
Warning: Users must never explicitly call this method.
start in interface org.osgi.framework.BundleActivatorstart in class org.eclipse.core.runtime.Pluginjava.lang.Exceptionpublic void stop(org.osgi.framework.BundleContext context)
throws java.lang.Exception
Warning: Users must never explicitly call this method.
stop in interface org.osgi.framework.BundleActivatorstop in class org.eclipse.core.runtime.Pluginjava.lang.Exception