org.eclipse.rse.ui.view
Class SystemAbstractAPIProvider
java.lang.Object
org.eclipse.rse.ui.view.SystemAbstractAPIProvider
-
All Implemented Interfaces:
-
IAdaptable,
ISystemViewInputProvider
-
public abstract class SystemAbstractAPIProvider
- extends
Object
- implements
ISystemViewInputProvider
This is a base class that a provider of root nodes to the remote systems tree
viewer part can use as a parent class.
This class existed in RSE 1.0, was made "internal" for RSE 2.0 and restored
as API for RSE 3.0.
-
Since:
- 3.0
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
viewer
protected
Viewer viewer
sr
protected
ISystemRegistry sr
-
Deprecated. don't use this field
emptyList
protected
Object[] emptyList
-
Deprecated. don't use this field
msgList
protected
Object[] msgList
-
Deprecated. don't use this field
nullObject
protected
SystemMessageObject nullObject
-
Deprecated. Use
checkForEmptyList(Object[], Object, boolean)
instead.
cancelledObject
protected
SystemMessageObject cancelledObject
-
Deprecated. don't use this field
- This field was renamed from canceledObject in RSE 3.0.
-
Since:
- org.eclipse.rse.ui 3.0
errorObject
protected
SystemMessageObject errorObject
-
Deprecated. don't use this field
SystemAbstractAPIProvider
public SystemAbstractAPIProvider()
- Constructor
getAdapter
public
Object getAdapter(
Class adapterType)
- This is the method required by the IAdaptable interface.
Given an adapter class type, return an object castable to the type, or
null if this is not possible.
-
-
Specified by:
-
getAdapter
in interface
IAdaptable
-
Specified by:
-
getAdapter
in interface
ISystemViewInputProvider
-
setViewer
public void setViewer(
Object viewer)
-
Description copied from interface:
ISystemViewInputProvider
- Set the viewer in case it is needed for anything.
The label and content provider will call this.
-
-
Specified by:
-
setViewer
in interface
ISystemViewInputProvider
-
-
Parameters:
-
viewer
- the
viewer
that uses this provider
getViewer
public
Object getViewer()
-
Description copied from interface:
ISystemViewInputProvider
- Return the viewer we are currently associated with
-
-
Specified by:
-
getViewer
in interface
ISystemViewInputProvider
-
-
Returns:
- the
viewer
we are currently associated with
initMsgObjects
protected final void initMsgObjects()
-
-
checkForEmptyList
protected
Object[] checkForEmptyList(
Object[] children,
Object parent,
boolean returnNullMsg)
- In getChildren, return checkForEmptyList(children, parent,
true/false) versus your array directly. This method checks for a
null array which is not allowed and replaces it with an empty array. If
true is passed then it returns the "Empty list" message object if the
array is null or empty.
Callable by subclasses. Do not override.
-
-
-
Parameters:
-
children
- The list of children. -
parent
- The parent for the children. -
returnNullMsg
- true
if an "Empty List" message should
be returned.
-
Returns:
- The list of children, a list with the "Empty List" message object
or an empty list.
checkForNull
protected
Object[] checkForNull(
Object[] children,
boolean returnNullMsg)
-
Deprecated. Use
checkForEmptyList(Object[], Object, boolean)
instead.
- In getChildren, return checkForNull(children, true/false) vs your array directly.
This method checks for a null array which not allow and replaces it with an empty array.
If true is passed then it returns the "Empty list" message object if the array is null or empty
-
-
getCancelledMessageObject
protected
Object[] getCancelledMessageObject()
- Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
-
-
getFailedMessageObject
protected
Object[] getFailedMessageObject()
- Return the "Operation failed" msg as an object array so can be used to answer getChildren()
-
-
showingConnections
public boolean showingConnections()
- Return true if we are listing connections or not, so we know whether we are interested in
connection-add events
-
-
Specified by:
-
showingConnections
in interface
ISystemViewInputProvider
-
-
Returns:
- true if we are listing connections or not, so we know whether we are interested in
connection-add events
getViewAdapter
protected
ISystemViewElementAdapter getViewAdapter(
Object o)
- Returns the implementation of ISystemViewElement for the given
object. Returns null if the adapter is not defined or the
object is not adaptable.
-
-
getRemoteAdapter
protected
ISystemRemoteElementAdapter getRemoteAdapter(
Object o)
- Returns the implementation of ISystemRemoteElement for the given
object. Returns null if this object does not adaptable to this.
-
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.