Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ui.internal
Class EarlyStartupRunnable  view EarlyStartupRunnable download EarlyStartupRunnable.java

java.lang.Object
  extended byorg.eclipse.jface.util.SafeRunnable
      extended byorg.eclipse.ui.internal.EarlyStartupRunnable
All Implemented Interfaces:
org.eclipse.core.runtime.ISafeRunnable

public class EarlyStartupRunnable
extends org.eclipse.jface.util.SafeRunnable

A utility class used to call #earlyStartup on the proper instance for a given configuration element. There are a few steps to the process in order to ensure compatibility with pre-3.0 plugins.

Since:
3.0

Field Summary
private  org.eclipse.core.runtime.IExtension extension
           
private static java.lang.String EXTENSION_CLASS
           
private static java.lang.String GET_DESC_METHOD
           
private static java.lang.String GET_PLUGIN_METHOD
           
private static java.lang.String PI_RUNTIME_COMPATIBILITY
           
private static java.lang.String PLUGIN_DESC_CLASS
           
 
Fields inherited from class org.eclipse.jface.util.SafeRunnable
 
Constructor Summary
EarlyStartupRunnable(org.eclipse.core.runtime.IExtension extension)
           
 
Method Summary
private  java.lang.Object getExecutableExtension(org.eclipse.core.runtime.IConfigurationElement element)
          In 3.0 the class attribute is a mandatory element of the startup element.
private  java.lang.Object getPluginForCompatibility()
          If the compatiblity bundle is loaded, then return the plugin object for the extension on this runnable.
 void handleException(java.lang.Throwable exception)
          Handles an exception thrown by this runnable's run method.
 void run()
          Runs this runnable.
private  void runEarlyStartup(java.lang.Object executableExtension)
           
 
Methods inherited from class org.eclipse.jface.util.SafeRunnable
getIgnoreErrors, getIgnoreErrors, setIgnoreErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION_CLASS

private static final java.lang.String EXTENSION_CLASS
See Also:
Constant Field Values

PLUGIN_DESC_CLASS

private static final java.lang.String PLUGIN_DESC_CLASS
See Also:
Constant Field Values

GET_PLUGIN_METHOD

private static final java.lang.String GET_PLUGIN_METHOD
See Also:
Constant Field Values

GET_DESC_METHOD

private static final java.lang.String GET_DESC_METHOD
See Also:
Constant Field Values

PI_RUNTIME_COMPATIBILITY

private static final java.lang.String PI_RUNTIME_COMPATIBILITY
See Also:
Constant Field Values

extension

private org.eclipse.core.runtime.IExtension extension
Constructor Detail

EarlyStartupRunnable

public EarlyStartupRunnable(org.eclipse.core.runtime.IExtension extension)
Method Detail

run

public void run()
         throws java.lang.Exception
Description copied from interface: org.eclipse.core.runtime.ISafeRunnable
Runs this runnable. Any exceptions thrown from this method will be passed to this runnable's handleException method.


handleException

public void handleException(java.lang.Throwable exception)
Description copied from interface: org.eclipse.core.runtime.ISafeRunnable
Handles an exception thrown by this runnable's run method. The processing done here should be specific to the particular usecase for this runnable. Generalized exception processing (e.g., logging in the platform's log) is done by the Platform's run mechanism.


runEarlyStartup

private void runEarlyStartup(java.lang.Object executableExtension)

getExecutableExtension

private java.lang.Object getExecutableExtension(org.eclipse.core.runtime.IConfigurationElement element)
                                         throws org.eclipse.core.runtime.CoreException
In 3.0 the class attribute is a mandatory element of the startup element. However, 2.1 plugins should still be able to run if the compatibility bundle is loaded.


getPluginForCompatibility

private java.lang.Object getPluginForCompatibility()
If the compatiblity bundle is loaded, then return the plugin object for the extension on this runnable. Return null if the compatibility bundle is not loaded or the plugin object cannot be created.