RSE
Release 1.0

org.eclipse.rse.ui
Class RSEUIPlugin

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.ui.plugin.AbstractUIPlugin
          extended byorg.eclipse.rse.core.SystemBasePlugin
              extended byorg.eclipse.rse.ui.RSEUIPlugin
All Implemented Interfaces:
BundleActivator, ISystemMessageProvider

public class RSEUIPlugin
extends SystemBasePlugin
implements ISystemMessageProvider

Plugin for the core remote systems support.


Field Summary
static String HELPPREFIX
           
static boolean INCLUDE_LOCAL_NO
           
static boolean INCLUDE_LOCAL_YES
           
static String PLUGIN_ID
           
 
Fields inherited from class org.eclipse.rse.core.SystemBasePlugin
log
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
RSEUIPlugin()
          Constructor for SystemsPlugin
 
Method Summary
 void closeViews()
          Close or reset views prior to full refresh after team synch
protected  void disconnectAll(boolean doSave)
          Disconnect all subsystems
static RSEUIPlugin getDefault()
          Return singleton.
 SystemMessageFile getDefaultMessageFile(String messageFileName)
          Load a default message file for this plugin for cases where messages haven't been translated.
 boolean getLoggingSystemMessageLine()
           
 SystemMessage getMessage(String msgId)
           
 SystemMessageFile getMessageFile(String messageFileName)
          Load a message file for this plugin.
 URL getMessageFileDTD()
           
 IRSEPersistenceManager getPersistenceManager()
           
static SystemMessage getPluginMessage(String msgId)
          Retrieve a message from this plugin's message file
static SystemMessage getPluginMessage(String msgId, Object subsVar)
          Retrieve a message from this plugin's message file and do single substitution on it.
static SystemMessage getPluginMessage(String msgId, Object[] subsVars)
          Retrieve a message from this plugin's message file and do multiple substitution on it.
static SystemMessageFile getPluginMessageFile()
          Return this plugin's message file.
 SystemPropertyPageExtension[] getPropertyPageExtensions()
          Return an array of SystemPropertyPageExtension objects.
static String getQualifiedHostName(String hostName)
          Returns a qualified hostname given a potentially unqualified hostname
 IRSEUIRegistry getRegistry()
          Returns the RSE UI registry.
 IProject getRemoteSystemsProject()
          Return the project used to hold all the Remote System Framework files
 SystemShowPreferencesPageAction[] getShowPreferencePageActions()
          Return an array of action objects registered via our org.eclipse.rse.ui.remoteSystemsViewPreferencesActions extension point.
 boolean getShowProfilePageInitially()
          Returns whether to show profile page initially, i.e. during the first new connection creation.
 ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
          Return an array of SubSystemConfigurationProxy objects.
 SystemRegistry getSystemRegistry()
          Return the SystemRegistry singleton
 SystemViewAdapterFactory getSystemViewAdapterFactory()
          For pathpath access to our adapters for non-local objects in our model.
static IRSEPersistenceManager getThePersistenceManager()
           
static ISystemProfileManager getTheSystemProfileManager()
          A static version for convenience Returns the master profile manager singleton.
static SystemRegistry getTheSystemRegistry()
          A static version for convenience Returns the master registry singleton.
 void initializeDefaultPreferences()
          Initializes default preferences.
protected  void initializeImageRegistry()
          Initialize the image registry by declaring all of the required graphics.
 boolean isSystemRegistryActive()
          Returns true if the SystemRegistry has been instantiated already.
static boolean isTheSystemRegistryActive()
          A static version for convenience
 void openViews()
          Restore views prior to full refresh after team synch
protected  void registerArchiveHandlers()
          Initializes the Archive Handler Manager, by registering archive \ file types with their handlers.
protected  void registerDynamicPopupMenuExtensions()
          Initializes the System View Adapter Menu Extension Manager, by registering menu extensions
protected  void registerKeystoreProviders()
           
 void registerViewSupplier(ISystemViewSupplier vs)
          Register a view supplier so we can ask them to participate in team synchs
 void restart()
          Restart the whole thing after a team synchronization
 void setLoggingSystemMessageLine(boolean flag)
          Set whether or not to log the messages shown on the system message line for dialogs and wizards.
 void start(BundleContext context)
           
 void stop(BundleContext context)
           
 void unRegisterViewSupplier(ISystemViewSupplier vs)
          UnRegister a previously registered view supplier
 
Methods inherited from class org.eclipse.rse.core.SystemBasePlugin
getActiveWorkbenchShell, getActiveWorkbenchWindow, getBaseDefault, getIconPath, getImage, getImageDescriptor, getImageDescriptorFromIDE, getLogger, getMessage, getPluginImage, getPluginImage, getSymbolicName, getWorkbench, getWorkspace, getWorkspaceRoot, isHeadless, loadDefaultMessageFile, loadMessageFile, logDebugMessage, logError, logError, logInfo, logMessage, logMessage, logWarning, printMessages, putImageInRegistry, resolveBundleNameNL, scanForDuplicateMessages
 
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, 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 String PLUGIN_ID
See Also:
Constant Field Values

HELPPREFIX

public static final String HELPPREFIX
See Also:
Constant Field Values

INCLUDE_LOCAL_YES

public static final boolean INCLUDE_LOCAL_YES
See Also:
Constant Field Values

INCLUDE_LOCAL_NO

public static final boolean INCLUDE_LOCAL_NO
See Also:
Constant Field Values
Constructor Detail

RSEUIPlugin

public RSEUIPlugin()
Constructor for SystemsPlugin

Method Detail

getDefault

public static RSEUIPlugin getDefault()
Return singleton. Same as inherited getBaseDefault but returned object is typed as RSEUIPlugin versus SystemBasePlugin.


initializeDefaultPreferences

public void initializeDefaultPreferences()
Initializes default preferences.


getShowProfilePageInitially

public boolean getShowProfilePageInitially()
Returns whether to show profile page initially, i.e. during the first new connection creation.

Returns:
true to show profile page initially, false otherwise.

setLoggingSystemMessageLine

public void setLoggingSystemMessageLine(boolean flag)
Set whether or not to log the messages shown on the system message line for dialogs and wizards. These message are typically validation messages for fields. These are logged using the RSE logging settings. The default is to not log these messages.

Parameters:
flag - true if logging of these messages is desired, false otherwise.

getLoggingSystemMessageLine

public boolean getLoggingSystemMessageLine()
Returns:
true if we are logging messages displayed on the system message line.

initializeImageRegistry

protected void initializeImageRegistry()
Description copied from class: SystemBasePlugin
Initialize the image registry by declaring all of the required graphics. Typically this is a series of calls to putImageInRegistry. Use getIconPath() to qualify the file name of the icons with their relative path.

Specified by:
initializeImageRegistry in class SystemBasePlugin

start

public void start(BundleContext context)
           throws Exception
Specified by:
start in interface BundleActivator
Overrides:
start in class SystemBasePlugin
Throws:
Exception
See Also:
BundleActivator.start(org.osgi.framework.BundleContext)

getSystemViewAdapterFactory

public SystemViewAdapterFactory getSystemViewAdapterFactory()
For pathpath access to our adapters for non-local objects in our model. Exploits the knowledge we use singleton adapters.


restart

public void restart()
Restart the whole thing after a team synchronization


closeViews

public void closeViews()
Close or reset views prior to full refresh after team synch


openViews

public void openViews()
Restore views prior to full refresh after team synch


getRemoteSystemsProject

public IProject getRemoteSystemsProject()
Return the project used to hold all the Remote System Framework files


stop

public void stop(BundleContext context)
          throws Exception
Specified by:
stop in interface BundleActivator
Overrides:
stop in class SystemBasePlugin
Throws:
Exception
See Also:
BundleActivator.stop(org.osgi.framework.BundleContext)

disconnectAll

protected void disconnectAll(boolean doSave)
Disconnect all subsystems


getQualifiedHostName

public static String getQualifiedHostName(String hostName)
Returns a qualified hostname given a potentially unqualified hostname


getSubSystemConfigurationProxies

public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies()
Return an array of SubSystemConfigurationProxy objects. These represent all extensions to our subsystemConfigurations extension point.


isSystemRegistryActive

public boolean isSystemRegistryActive()
Returns true if the SystemRegistry has been instantiated already. Use this when you don't want to start the system registry as a side effect of retrieving it.


getPersistenceManager

public IRSEPersistenceManager getPersistenceManager()
Returns:
the persistence manager used for persisting RSE profiles

getSystemRegistry

public SystemRegistry getSystemRegistry()
Return the SystemRegistry singleton


getTheSystemRegistry

public static SystemRegistry getTheSystemRegistry()
A static version for convenience Returns the master registry singleton.


getThePersistenceManager

public static IRSEPersistenceManager getThePersistenceManager()

getTheSystemProfileManager

public static ISystemProfileManager getTheSystemProfileManager()
A static version for convenience Returns the master profile manager singleton.


isTheSystemRegistryActive

public static boolean isTheSystemRegistryActive()
A static version for convenience


getPropertyPageExtensions

public SystemPropertyPageExtension[] getPropertyPageExtensions()
Return an array of SystemPropertyPageExtension objects. These represent all extensions to our propertyPage extension point.


getShowPreferencePageActions

public SystemShowPreferencesPageAction[] getShowPreferencePageActions()
Return an array of action objects registered via our org.eclipse.rse.ui.remoteSystemsViewPreferencesActions extension point.
This may return null if there are no extenders.


getMessageFileDTD

public URL getMessageFileDTD()
Returns:
The URL to the message file DTD. Null if it is not found.

getMessageFile

public SystemMessageFile getMessageFile(String messageFileName)
Load a message file for this plugin.

Parameters:
messageFileName - - the name of the message xml file. Will look for it in this plugin's install folder.
Returns:
a message file object containing the parsed contents of the message file, or null if not found.

getDefaultMessageFile

public SystemMessageFile getDefaultMessageFile(String messageFileName)
Load a default message file for this plugin for cases where messages haven't been translated.

Parameters:
messageFileName - - the name of the message xml file. Will look for it in this plugin's install folder.
Returns:
a message file object containing the parsed contents of the message file, or null if not found.

getPluginMessageFile

public static SystemMessageFile getPluginMessageFile()
Return this plugin's message file. Assumes it has already been loaded via a call to getMessageFile.


getMessage

public SystemMessage getMessage(String msgId)
Specified by:
getMessage in interface ISystemMessageProvider

getPluginMessage

public static SystemMessage getPluginMessage(String msgId)
Retrieve a message from this plugin's message file

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.

getPluginMessage

public static SystemMessage getPluginMessage(String msgId,
                                             Object[] subsVars)
Retrieve a message from this plugin's message file and do multiple substitution on it.

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.
subsVars - - an array of objects to substitute in for %1, %2, etc

getPluginMessage

public static SystemMessage getPluginMessage(String msgId,
                                             Object subsVar)
Retrieve a message from this plugin's message file and do single substitution on it.

Parameters:
msgId - - the ID of the message to retrieve. This is the concatenation of the message's component abbreviation, subcomponent abbreviation, and message ID as declared in the message xml file.

registerViewSupplier

public void registerViewSupplier(ISystemViewSupplier vs)
Register a view supplier so we can ask them to participate in team synchs


unRegisterViewSupplier

public void unRegisterViewSupplier(ISystemViewSupplier vs)
UnRegister a previously registered view supplier


registerArchiveHandlers

protected void registerArchiveHandlers()
Initializes the Archive Handler Manager, by registering archive \ file types with their handlers.


registerDynamicPopupMenuExtensions

protected void registerDynamicPopupMenuExtensions()
Initializes the System View Adapter Menu Extension Manager, by registering menu extensions


registerKeystoreProviders

protected void registerKeystoreProviders()

getRegistry

public IRSEUIRegistry getRegistry()
Returns the RSE UI registry. Clients should use this method to get the registry which is the starting point for working with UI elements in the RSE framework.

Returns:
the RSE UI registry.

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.