|
|
|
|
org.eclipse.rse.ui
Class RSESystemTypeAdapter
java.lang.Object
org.eclipse.ui.model.WorkbenchAdapter
org.eclipse.rse.ui.RSEAdapter
org.eclipse.rse.ui.RSESystemTypeAdapter
-
All Implemented Interfaces:
-
IRSEAdapter,
IWorkbenchAdapter,
IWorkbenchAdapter2
-
public class RSESystemTypeAdapter
- extends
RSEAdapter
Adapter for RSE system types.
Method Summary
|
boolean
|
acceptWizardDescriptor
(
String wizardConfigurationElementName,
org.eclipse.rse.ui.wizards.registries.IRSEWizardDescriptor descriptor)
Checks if the given wizard descriptor is accepted for the system types the
adapter is covering. |
void
|
addCustomMenuGroups
(
IMenuManager menu)
Called from SystemView.createStandardGroups(IMenuManager) to allow dynamic system
type providers to customize the RSE standard menu structure regarding their needs. |
void
|
addCustomToolbarGroups
(
IViewPart view)
Called from SystemViewPart#fillLocalToolBar(boolean) to allow dynamic system
type providers to customize the RSE standard toolbar structure regarding their needs. |
String
|
getDefaultUserId
(
Object object)
Return the default user id for a particular system type. |
String
|
getDescription
(
Object object)
Returns the description of the system type if the object passed in is of type IRSESystemType . |
static
ImageDescriptor
|
getImage
(
String value,
Bundle definingBundle)
Create a descriptor from the argument absolute or relative path to an
image file. bundle parameter is used as the base for relative paths and
is allowed to be null. |
ImageDescriptor
|
getImageDescriptor
(
Object object)
Returns the image descriptor for the icon of this system type. |
String
|
getLabel
(
Object object)
Returns the name of the system type if the object passed in is of type IRSESystemType . |
ImageDescriptor
|
getLiveImageDescriptor
(
Object object)
Returns the "live" image descriptor for this system type. |
static
URL
|
getUrl
(
String value,
Bundle definingBundle)
Create a URL from the argument absolute or relative path. |
boolean
|
isEnabled
(
Object object)
Deprecated. Clients should use
IRSESystemType.isEnabled() , which is
available without UI dependencies, in order to guarantee consistent
availability of system types.
Providers of custom RSESystemTypeAdapter implementations, which override
this method, should move their code to their IRSESystemType implementations.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218655#c1 for details.
|
boolean
|
isEnableOffline
(
Object object)
|
void
|
setDefaultUserId
(
Object object,
String defaultUserId)
Deprecated. Use
RSEPreferencesManager.setDefaultUserId(IRSESystemType, String)
|
void
|
setIsEnabled
(
Object object,
boolean isEnabled)
Deprecated. Use
RSEPreferencesManager.setIsSystemTypeEnabled(IRSESystemType, boolean)
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
RSESystemTypeAdapter
public RSESystemTypeAdapter()
getImageDescriptor
public
ImageDescriptor getImageDescriptor(
Object object)
- Returns the image descriptor for the icon of this system type.
Returns the default live connection image descriptor if no icon has been configured.
-
-
Specified by:
-
getImageDescriptor
in interface
IWorkbenchAdapter
-
Overrides:
-
getImageDescriptor
in class
WorkbenchAdapter
-
-
See Also:
-
WorkbenchAdapter.getImageDescriptor(java.lang.Object)
getLiveImageDescriptor
public
ImageDescriptor getLiveImageDescriptor(
Object object)
- Returns the "live" image descriptor for this system type.
If no "live" icon is found, but a non-live icon was specified,
the non-live icon is returned instead. If a non-live icon also
was not specified, the default live connection image descriptor
is returned.
-
-
Parameters:
-
object - The object to get an image descriptor for.
-
Returns:
- ImageDescriptor
getImage
public static
ImageDescriptor getImage(
String value,
Bundle definingBundle)
- Create a descriptor from the argument absolute or relative path to an
image file. bundle parameter is used as the base for relative paths and
is allowed to be null.
-
-
Parameters:
-
value - the absolute or relative path -
definingBundle - bundle to be used for relative paths (may be null)
-
Returns:
- ImageDescriptor
getUrl
public static
URL getUrl(
String value,
Bundle definingBundle)
- Create a URL from the argument absolute or relative path. The bundle parameter is
used as the base for relative paths and may be null.
-
-
Parameters:
-
value - the absolute or relative path -
definingBundle - bundle to be used for relative paths (may be null)
-
Returns:
- the URL to the resource
getLabel
public
String getLabel(
Object object)
- Returns the name of the system type if the object passed in is of type
IRSESystemType . Otherwise, returns the value of the parent implementation.
-
-
Specified by:
-
getLabel
in interface
IWorkbenchAdapter
-
Overrides:
-
getLabel
in class
WorkbenchAdapter
-
-
See Also:
-
WorkbenchAdapter.getLabel(java.lang.Object)
getDescription
public
String getDescription(
Object object)
- Returns the description of the system type if the object passed in is of type
IRSESystemType .
Otherwise, returns the value of the parent implementation.
-
-
Specified by:
-
getDescription
in interface
IRSEAdapter
-
Overrides:
-
getDescription
in class
RSEAdapter
-
-
Parameters:
-
object - the object to get the description text for
-
Returns:
- the description text for the given object
-
See Also:
-
RSEAdapter.getDescription(java.lang.Object)
isEnableOffline
public boolean isEnableOffline(
Object object)
-
isEnabled
public final boolean isEnabled(
Object object)
-
Deprecated. Clients should use
IRSESystemType.isEnabled() , which is
available without UI dependencies, in order to guarantee consistent
availability of system types.
Providers of custom RSESystemTypeAdapter implementations, which override
this method, should move their code to their IRSESystemType implementations.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218655#c1 for details.
- Returns the enabled state of a particular system type.
-
-
Parameters:
-
object - the object being adapted, usually a system type.
-
Returns:
- true if that system type is enabled. false if the object is
not a system type or if it is not enabled.
setIsEnabled
public void setIsEnabled(
Object object,
boolean isEnabled)
-
Deprecated. Use
RSEPreferencesManager.setIsSystemTypeEnabled(IRSESystemType, boolean)
- Sets the enabled state of a particular system type.
Note that system types which are provided by extenders via the dynamic
sytemTypeProviders extension point may have their own logic to determine
whether they are enabled or not, so changing the enabled setting may not
work for them.
-
-
Parameters:
-
object - The system type being adapted. -
isEnabled - true if the system type is enabled. false if it is not.
getDefaultUserId
public
String getDefaultUserId(
Object object)
- Return the default user id for a particular system type. If none
is defined then the "user.name" system property is used.
-
-
Parameters:
-
object - The system type being adapted.
-
Returns:
- The default user id. Will be null if the object is not a system type
setDefaultUserId
public void setDefaultUserId(
Object object,
String defaultUserId)
-
Deprecated. Use
RSEPreferencesManager.setDefaultUserId(IRSESystemType, String)
- Set the default user id for this system type. Stored in the RSE core
preferences.
-
-
Parameters:
-
object - the system type that we are adapting -
defaultUserId - the id to set for this system type
addCustomToolbarGroups
public void addCustomToolbarGroups(
IViewPart view)
- Called from
SystemViewPart#fillLocalToolBar(boolean) to allow dynamic system
type providers to customize the RSE standard toolbar structure regarding their needs.
Note: This method is called for each system type. If a single system type adapter
is associated with multiple system types, this method is called multiple times.
Overriders must check if the required groups are added to the toolbar already
and must avoid to add them multiple times!
-
-
Parameters:
-
view - The view to customize. Must be not null .
addCustomMenuGroups
public void addCustomMenuGroups(
IMenuManager menu)
- Called from
SystemView.createStandardGroups(IMenuManager) to allow dynamic system
type providers to customize the RSE standard menu structure regarding their needs.
Note: This method is called for each system type. If a single system type adapter
is associated with multiple system types, this method is called multiple times.
Overriders must check if the required groups are added to the menu already
and must avoid to add them multiple times!
-
-
Parameters:
-
menu - The menu manager. Must be not null .
acceptWizardDescriptor
public boolean acceptWizardDescriptor(
String wizardConfigurationElementName,
org.eclipse.rse.ui.wizards.registries.IRSEWizardDescriptor descriptor)
- Checks if the given wizard descriptor is accepted for the system types the
adapter is covering.
-
-
Parameters:
-
wizardConfigurationElementName - The wizard configuration element name. Must be not null . -
descriptor - The wizard descriptor. Must be not null .
-
Returns:
-
True is accepted, false otherwise.
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|
|