PTP
Release 5.0

org.eclipse.ptp.remote.ui
Class PTPRemoteUIPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.ui.plugin.AbstractUIPlugin
          extended by org.eclipse.ptp.remote.ui.PTPRemoteUIPlugin
All Implemented Interfaces:
BundleActivator

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

The activator class controls the plug-in life cycle


Field Summary
static java.lang.String EXTENSION_POINT_ID
           
static java.lang.String PLUGIN_ID
           
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
PTPRemoteUIPlugin()
          The constructor
 
Method Summary
static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()
           
static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()
           
static PTPRemoteUIPlugin getDefault()
          Returns the shared instance
 IRemoteServices[] getRemoteServices(org.eclipse.jface.operation.IRunnableContext context)
          Get all the remote service providers and ensure that they are initialized.
 IRemoteServices getRemoteServices(java.lang.String id, org.eclipse.jface.operation.IRunnableContext context)
          Look up a remote service provider and ensure it is initialized.
 IRemoteServices getRemoteServices(java.net.URI uri, org.eclipse.jface.operation.IRunnableContext context)
          Look up a remote service provider from the supplied URI and ensure it is initialized.
 IRemoteUIServices getRemoteUIServices(IRemoteServices services)
          Helper method to find UI services that correspond to a particular remote services implementation
static org.eclipse.swt.widgets.Shell getShell()
          Returns the active workbench shell or null if none
static void log(org.eclipse.core.runtime.IStatus status)
          Generate a log message given an IStatus object
static void log(java.lang.String msg)
          Generate a log message
static void log(java.lang.Throwable e)
          Generate a log message for an exception
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
 
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
 

Field Detail

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
See Also:
Constant Field Values

EXTENSION_POINT_ID

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

PTPRemoteUIPlugin

public PTPRemoteUIPlugin()
The constructor

Method Detail

getActiveWorkbenchShell

public static org.eclipse.swt.widgets.Shell getActiveWorkbenchShell()
Returns:

getActiveWorkbenchWindow

public static org.eclipse.ui.IWorkbenchWindow getActiveWorkbenchWindow()
Returns:

getDefault

public static PTPRemoteUIPlugin getDefault()
Returns the shared instance

Returns:
the shared instance

getShell

public static org.eclipse.swt.widgets.Shell getShell()
Returns the active workbench shell or null if none

Returns:
the active workbench shell or null if none

log

public static void log(org.eclipse.core.runtime.IStatus status)
Generate a log message given an IStatus object

Parameters:
status - IStatus object
Since:
5.0

log

public static void log(java.lang.String msg)
Generate a log message

Parameters:
msg - message to log
Since:
5.0

log

public static void log(java.lang.Throwable e)
Generate a log message for an exception

Parameters:
e - exception used to generate message
Since:
5.0

getRemoteServices

public IRemoteServices[] getRemoteServices(org.eclipse.jface.operation.IRunnableContext context)
Get all the remote service providers and ensure that they are initialized. The method will use the supplied container's progress service, or, if null, the platform progress service, in order to allow the initialization to be canceled.

Parameters:
context - context with progress service, or null to use the platform progress service
Returns:
array containing initialized services
Since:
5.0

getRemoteServices

public IRemoteServices getRemoteServices(java.lang.String id,
                                         org.eclipse.jface.operation.IRunnableContext context)
Look up a remote service provider and ensure it is initialized. The method will use the supplied container's progress service, or, if null, the platform progress service, in order to allow the initialization to be canceled.

Parameters:
id - id of service to locate
context - context with progress service, or null to use the platform progress service
Returns:
initialized remote services or null if the service can't be located or the progress monitor was canceled
Since:
5.0

getRemoteServices

public IRemoteServices getRemoteServices(java.net.URI uri,
                                         org.eclipse.jface.operation.IRunnableContext context)
Look up a remote service provider from the supplied URI and ensure it is initialized. The method will use the supplied container's progress service, or, if null, the platform progress service, in order to allow the initialization to be canceled.

Parameters:
uri - uri specifying service to locate
context - context with progress service, or null to use the platform progress service
Returns:
initialized remote services or null if the service can't be located or the progress monitor was canceled
Since:
5.0

getRemoteUIServices

public IRemoteUIServices getRemoteUIServices(IRemoteServices services)
Helper method to find UI services that correspond to a particular remote services implementation

Parameters:
services -
Returns:
remote UI services

start

public void start(BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface BundleActivator
Overrides:
start in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

stop

public void stop(BundleContext context)
          throws java.lang.Exception
Specified by:
stop in interface BundleActivator
Overrides:
stop in class org.eclipse.ui.plugin.AbstractUIPlugin
Throws:
java.lang.Exception

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.