diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
index c62d9ec69a1..af65137d8b3 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
@@ -580,7 +580,7 @@ public class SystemSelectRemoteObjectAPIProviderImpl
children = subsystem.resolveFilterString(filterString, new NullProgressMonitor());
} catch (InterruptedException exc)
{
- if (canceledObject == null)
+ if (cancelledObject == null)
children = getCancelledMessageObject();
} catch (Exception exc)
{
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java
index 2dbacb77722..1b9b4467093 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java
@@ -7,20 +7,20 @@
*
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
+ *
* Contributors:
* Uwe Stieber (Wind River) - Allow to extend action filter by dynamic system type providers.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
+ * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
+ * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
* Martin Oberhuber (Wind River) - [189163] Update IActionFilter constants from subsystemFactory to subsystemConfiguration
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
+ * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
* David McKnight (IBM) - [208803] add exists() method
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
@@ -92,12 +92,12 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
/**
* Base class for adapters needed for the SystemView viewer.
- * It implements the ISystemViewElementAdapter interface.
+ * It implements the ISystemViewElementAdapter interface.
* @see AbstractSystemRemoteAdapterFactory
*/
public abstract class AbstractSystemViewAdapter implements ISystemViewElementAdapter, IWorkbenchAdapter,
IDeferredWorkbenchAdapter
-{
+{
// Static action filter per system type cache. Filled from testAttribute.
private final static Map ACTION_FILTER_CACHE = new HashMap();
@@ -108,11 +108,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
return false;
}
}
-
+
//protected boolean isEditable = false;
-
- protected String filterString = null;
-
+
+ private String filterString = null;
+
/**
* Current viewer. Set by content provider
*/
@@ -138,24 +138,33 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
*/
protected Object[] emptyList = new Object[0];
/**
- * For returning a msg object from getChildren. Will be an array with one item,
- * one of nullObject, canceledObject or errorObject
+ * For returning a message object from getChildren. Will be an array with
+ * one item, one of nullObject, cancelledObject or errorObject
*/
- protected Object[] msgList = new Object[1];
+ protected Object[] msgList = new Object[1];
/**
- * Frequently returned msg object from getChildren: "empty list"
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
+ * Frequently returned message object from getChildren: "empty list"
+ *
+ * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)}
+ * instead.
*/
protected SystemMessageObject nullObject = null;
/**
- * Frequently returned msg object from getChildren: "operation cancelled"
+ * Frequently returned message object from getChildren: "operation
+ * cancelled"
+ *
+ * @since org.eclipse.rse.ui 3.0 renamed from canceledObject
+ * @deprecated don't use this field.
*/
- protected SystemMessageObject canceledObject = null;
+ protected SystemMessageObject cancelledObject = null;
/**
- * Frequently returned msg object from getChildren: "operation ended in error"
+ * Frequently returned message object from getChildren: "operation ended in
+ * error"
+ *
+ * @deprecated don't use this field.
*/
- protected SystemMessageObject errorObject = null;
-
+ protected SystemMessageObject errorObject = null;
+
/**
* Message substitution prefix: "&"
*/
@@ -173,17 +182,17 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* Delimiter for each object's key in a memento, used to persist tree view expansion state: "///"
*/
public static final String MEMENTO_DELIM = SystemViewPart.MEMENTO_DELIM;
-
+
/**
* A handy constant of "new String[0]"
*/
protected static final String[] EMPTY_STRING_LIST = new String[0];
-
+
// -------------------
// default descriptors
// -------------------
private static PropertyDescriptor[] propertyDescriptorArray = null;
-
+
// DKM: temporary memory caching stuff - we should replace this with something
// more comprehensive later
/**
@@ -196,59 +205,64 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
protected Object _lastSelected = null;
private Preferences fPrefStore = null;
-
+
/**
* Static constructor.
*/
static {
ACTION_FILTER_CACHE.clear();
}
-
- // ------------------------------------------------------------------
+
+ // ------------------------------------------------------------------
// Configuration methods, called by the label and content provider...
- // ------------------------------------------------------------------
+ // ------------------------------------------------------------------
/**
- * Configuration method. Typically called by content provider, viewer or action. Do not override.
- * Set the viewer that is driving this adapter
- * Called by label and content provider.
- */
+ * Configuration method. Typically called by content provider, viewer or
+ * action. Do not override.
+ * Set the viewer that is driving this adapter Called by label and content
+ * provider.
+ */
public final void setViewer(Viewer viewer)
{
this.viewer = viewer;
- }
+ }
/**
- * Configuration method. Typically called by content provider, viewer or action. Do not override.
- * Set the shell to be used by any method that requires it.
- */
+ * Configuration method. Typically called by content provider, viewer or
+ * action. Do not override.
+ * Set the shell to be used by any method that requires it.
+ */
public final void setShell(Shell shell)
{
this.shell = shell;
- }
+ }
/**
- * Configuration method. Typically called by content provider, viewer or action. Do not override.
- * Set the input object used to populate the viewer with the roots.
- * May be used by an adapter to retrieve context-sensitive information.
- * This is set by the Label and Content providers that retrieve this adapter.
- */
+ * Configuration method. Typically called by content provider, viewer or
+ * action. Do not override.
+ * Set the input object used to populate the viewer with the roots. May be
+ * used by an adapter to retrieve context-sensitive information. This is set
+ * by the Label and Content providers that retrieve this adapter.
+ */
public final void setInput(ISystemViewInputProvider input)
- {
+ {
this.input = input;
}
- // ------------------------------------------------------------------
+ // ------------------------------------------------------------------
// Getter methods, for use by subclasses and actions...
- // ------------------------------------------------------------------
-
+ // ------------------------------------------------------------------
+
/**
- * Getter method. Callable by subclasses. Do not override.
- * Get the shell currently hosting the objects in this adapter
- */
+ * Getter method. Callable by subclasses. Do not override.
+ * Get the shell currently hosting the objects in this adapter
+ *
+ * @noextend This method is not intended to be extended by clients.
+ */
public Shell getShell()
{
if (shell == null || shell.isDisposed() || !shell.isVisible() || !shell.isEnabled())
{
- // get a new shell
+ // get a new shell
Shell[] shells = Display.getCurrent().getShells();
Shell lshell = null;
for (int i = 0; i < shells.length && lshell == null; i++)
@@ -265,12 +279,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
return shell;
}
/**
- * Getter method. Callable by subclasses. Do not override.
- * Return the current viewer, as set via setViewer or its deduced from the
+ * Getter method. Callable by subclasses. Do not override.
+ * Return the current viewer, as set via setViewer or its deduced from the
* setInput input object if set. May be null so test it.
+ *
+ * @noextend This method is not intended to be extended by clients.
*/
public Viewer getViewer()
- {
+ {
if (viewer == null)
{
ISystemViewInputProvider ip = getInput();
@@ -283,16 +299,19 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
IWorkbenchPart currentPart = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage().getActivePart();
if (currentPart instanceof IRSEViewPart)
{
- return ((IRSEViewPart)currentPart).getRSEViewer();
+ return ((IRSEViewPart)currentPart).getRSEViewer();
}
}
-
+
}
return viewer;
}
/**
- * Getter method. Callable by subclasses. Do not override.
- * Return the current viewer as an ISystemTree if it is one, or null otherwise
+ * Getter method. Callable by subclasses. Do not override.
+ * Return the current viewer as an ISystemTree if it is one, or null
+ * otherwise
+ *
+ * @noextend This method is not intended to be extended by clients.
*/
protected ISystemTree getCurrentTreeView()
{
@@ -304,21 +323,23 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
}
/**
- * Getter method. Callable by subclasses. Do not override.
- * Get the input object used to populate the viewer with the roots.
- * May be used by an adapter to retrieve context-sensitive information.
- */
+ * Getter method. Callable by subclasses. Do not override.
+ * Get the input object used to populate the viewer with the roots. May be
+ * used by an adapter to retrieve context-sensitive information.
+ *
+ * @noextend This method is not intended to be extended by clients.
+ */
public ISystemViewInputProvider getInput()
{
return input;
}
-
+
/**
* Overridable by subclasses. You should override if not using AbstractResource.
* Returns the subsystem that contains this object. By default, if the
* given element is instanceof {@link org.eclipse.rse.core.subsystems.AbstractResource AbstractResource},
* it calls getSubSystem on it, else returns null.
- */
+ */
public ISubSystem getSubSystem(Object element)
{
if (element instanceof AbstractResource)
@@ -326,17 +347,17 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
else if (element instanceof IContextObject)
return ((IContextObject)element).getSubSystem();
else
- return null;
+ return null;
}
-
-
+
+
/**
* Called by SystemView viewer. No need to override or call.
* Returns any framework-supplied remote object actions that should be contributed to the popup menu
* for the given selection list. This does nothing if this adapter does not implement ISystemViewRemoteElementAdapter,
* else it potentially adds menu items for "User Actions" and Compile", for example. It queries the subsystem
* factory of the selected objects to determine if these actions are appropriate to add.
- *
+ *
* @param menu The menu to contribute actions to
* @param selection The window's current selection.
* @param shell of viewer calling this. Most dialogs require a shell.
@@ -354,22 +375,22 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
ISubSystemConfiguration ssf = ss.getSubSystemConfiguration();
ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
adapter.addCommonRemoteActions(ssf, menu, selection, shell, menuGroup, ss);
- }
+ }
}
}
-
+
/**
* Add or remove custom actions dynamically to a context menu.
- *
- * This method is called by the system viewers. Extenders may
- * override this method in order to modify the context menu
+ *
+ * This method is called by the system viewers. Extenders may
+ * override this method in order to modify the context menu
* shown for elements of the type they adapt to.
* Unlike addCommonRemoteActions(), these contributions are for
* any artifact in the RSE views and are contributed independently
* of subsystem factories.
- *
+ *
* @param menu The menu to contribute actions to
* @param selection The window's current selection.
* @param shell of viewer calling this. Most dialogs require a shell.
@@ -382,7 +403,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
}
/**
- * This is your opportunity to add actions to the popup menu for the given selection.
+ * This is your opportunity to add actions to the popup menu for the given selection.
*
* To put your action into the given menu, use the menu's {@link org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface.action.IAction) add} method. * If you don't care where it goes within the popup, just pass the given menuGroup location id, @@ -397,19 +418,19 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda *
* getType(): getName() *@@ -473,14 +494,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda { return getType(element) + ": " + getName(element); //$NON-NLS-1$ } - + /** * Returns whether the specified element is represented as existing. Note that * it's possible that the represented element will been seen to exist when on * a remote host it may not - that is because this call does not query the host. * By default, this method returns true - override this method to customize the * behavior - * + * * @param element the element to check * @return true if the element exists * @@ -489,8 +510,8 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda { return true; } - - + + /** * Abstract. Must be overridden by subclasses.
* If internalGetPropertyDescriptors() returns non-null, then returns that, - * else computes the difference. + * else computes the difference. *
- * This is called by the table views like {@link org.eclipse.rse.ui.view.SystemTableView}. + * This is called by the table views like + * {@link org.eclipse.rse.ui.view.SystemTableView}. + *
+ * + * @noextend This method is not intended to be extended by clients. */ public IPropertyDescriptor[] getUniquePropertyDescriptors() { @@ -683,21 +708,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda IPropertyDescriptor[] internalDescriptors = internalGetPropertyDescriptors(); if (internalDescriptors != null) return internalDescriptors; - + IPropertyDescriptor[] allDescriptors = getPropertyDescriptors(); IPropertyDescriptor[] commonDescriptors = getDefaultDescriptors(); - + int totalSize = allDescriptors.length; int commonSize = commonDescriptors.length; int uniqueSize = totalSize - commonSize; - + int uniqueIndex = 0; - + IPropertyDescriptor[] uniqueDescriptors = new IPropertyDescriptor[uniqueSize]; for (int i = 0; i < totalSize; i++) { IPropertyDescriptor descriptor = allDescriptors[i]; - + boolean isUnique = true; for (int j = 0; j < commonSize; j++) { @@ -705,19 +730,19 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda if (descriptor == commonDescriptor) { isUnique = false; - } - } - + } + } + if (isUnique && uniqueSize > uniqueIndex) { uniqueDescriptors[uniqueIndex] = descriptor; - uniqueIndex++; + uniqueIndex++; } } - + return uniqueDescriptors; } - + /** * Overridable by subclasses, but usually is not.propertySourceInput
, which is the currently selected object. Just case it to what you expect the selected object's type to be.
- *
+ *
* @param key the name of the property as named by its property descriptor
* @return the current value of the property
*/
- public Object getPropertyValue(Object key)
+ public Object getPropertyValue(Object key)
{
String name = (String)key;
if (name.equals(IBasicPropertyConstants.P_TEXT))
@@ -760,7 +785,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
{
ISystemTree tree = getSystemTree();
if (tree != null)
- return Integer.toString(tree.getChildCount(propertySourceInput));
+ return Integer.toString(tree.getChildCount(propertySourceInput));
else
{
if ((viewer != null) && (viewer instanceof TreeViewer))
@@ -770,31 +795,31 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
}
}
else
- return internalGetPropertyValue(key);
+ return internalGetPropertyValue(key);
}
/**
* Abstract.true
if the value of the specified property has changed
* from its original default value; false
otherwise.
*/
- public boolean isPropertySet(Object key)
+ public boolean isPropertySet(Object key)
{
return false;
}
@@ -871,50 +896,52 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* Resets the specified property's value to its default value.
* Called on editable property when user presses reset button in property sheet viewer.
* DOES NOTHING BY DEFAULT.
- *
+ *
* @param key the key identifying property to reset
*/
- public void resetPropertyValue(Object key)
+ public void resetPropertyValue(Object key)
{
}
/**
* Overridable by subclasses. Must be iff editable properties are supported.* Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}. *
@@ -1033,7 +1065,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
public ISystemValidator getNameValidator(Object element)
{
return null;
- }
+ }
/**
* Overridable by subclasses, and usually is iff canRename is.
@@ -1042,12 +1074,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
*
* For example, two connections or filter pools can have the same name if they are - * in different profiles. Two iSeries QSYS objects can have the same name if their object types - * are different. + * in different profiles. Two iSeries QSYS objects can have the same name if their object types + * are different. *
* Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}. *
- * This method returns a name that can be used for uniqueness checking because it is qualified + * This method returns a name that can be used for uniqueness checking because it is qualified * sufficiently to make it unique. *
* By default, this simply returns the given name. It is overridden by child classes when appropriate.
@@ -1086,7 +1118,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
public boolean showRefresh(Object element)
{
return true;
- }
+ }
// ----------------------------------------------
// METHODS TO SUPPORT COMMON PROPERTIES ACTION...
@@ -1101,7 +1133,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
public boolean showProperties(Object element)
{
return true;
- }
+ }
// ------------------------------------------------------------
@@ -1109,7 +1141,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
// ------------------------------------------------------------
/**
* Overridable by subclasses, and usually is NOT.
- * Return true if we should show the Go Into; and Open In New Window
+ * Return true if we should show the Go Into; and Open In New Window
* and Go To actions in the popup for the given element.
*
* Only applicable for non-remote resources. Remote always show Go To only.
@@ -1119,21 +1151,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
if (element instanceof IAdaptable)
return hasChildren((IAdaptable)element);
return false;
- }
-
+ }
+
/**
* Overridable by subclasses, and usually is NOT.
* Return true if we should show the generic show in table action in the popup for the given element.
*/
public boolean showGenericShowInTableAction(Object element)
{
- return true;
+ return true;
}
-
+
// ------------------------------------------
// METHODS TO SUPPORT COMMON DRAG AND DROP FUNCTION...
- // ------------------------------------------
+ // ------------------------------------------
/**
* Overridable by subclasses, and is iff drag and drop supported.
* Return true if this object can be copied to another location. By default,
@@ -1148,7 +1180,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
{
return false;
}
-
+
/**
* Overridable by subclasses, and is iff drag and drop supported.
* Return true if this object can be copied to another location. By default,
@@ -1160,12 +1192,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
{
return false;
}
-
+
/**
* Overridable by subclasses, and is iff drag and drop supported.
* Perform the drag on the given object. By default this does nothing
* and returns nothing. Extenders supporting DnD are expected to implement
- * this method to perform a copy to a temporary object, the return value.
+ * this method to perform a copy to a temporary object, the return value.
* @see #canDrag(Object)
* @see #canDrop(Object)
* @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor)
@@ -1173,13 +1205,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
*/
public Object doDrag(Object element, boolean sameSystemType, IProgressMonitor monitor)
{
- return null;
+ return null;
}
-
+
/**
* Overridable by subclasses, and is iff drag and drop supported.
* Return true if another object can be copied into this object. By default
- * we return false. Extenders may decide whether or not certain objects can
+ * we return false. Extenders may decide whether or not certain objects can
* accept other objects with this method.
* @see #canDrag(Object)
* @see #doDrag(Object,boolean,IProgressMonitor)
@@ -1188,19 +1220,19 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
*/
public boolean canDrop(Object element)
{
- return false;
-
+ return false;
+
}
-
+
/**
* Overridable by subclasses, and is iff drag and drop supported.
* Perform the drag on the given objects. This default implementation simply iterates through the
* set. For optimal performance, this should be overridden.
- *
+ *
* @param set the set of objects to copy
* @param monitor the progress monitor
* @return the set of objects as a result of the drag
- *
+ *
*/
public ISystemResourceSet doDrag(SystemRemoteResourceSet set, IProgressMonitor monitor)
{
@@ -1222,80 +1254,80 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* @param sameSystem indication of whether the source and target are on the same system
* @param srcType the type of objects to be dropped
* @param monitor the progress monitor
- *
+ *
* @return the set of new objects created from the drop
- *
- */
+ *
+ */
public ISystemResourceSet doDrop(ISystemResourceSet fromSet, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
{
SystemRemoteResourceSet results = new SystemRemoteResourceSet(getSubSystem(to), this);
-
+
List resources = fromSet.getResourceSet();
for (int i = 0; i < resources.size(); i++)
{
results.addResource(doDrop(resources.get(i), to, sameSystemType, sameSystem, srcType, monitor));
}
-
+
return results;
}
-
+
/**
- * Sets filter context for querying. Override to provide specialized
+ * Sets filter context for querying. Override to provide specialized
* behaviour.
*/
public void setFilterString(String filterString)
{
this.filterString = filterString;
}
-
+
/**
- * Gets filter context for querying. Override to provide specialized
+ * Gets filter context for querying. Override to provide specialized
* behaviour.
*/
public String getFilterString()
{
return filterString;
}
-
+
/**
* Overridable by subclasses, and is iff drag and drop supported.
- * Perform drop from the "from" object to the "to" object. By default this does
+ * Perform drop from the "from" object to the "to" object. By default this does
* nothing and we return false. Extenders supporting DnD are expected to implement
- * this method to perform a "paste" into an object.
- *
+ * this method to perform a "paste" into an object.
+ *
* @return the new object that was copied
- *
+ *
* @see #canDrag(Object)
* @see #doDrag(Object,boolean,IProgressMonitor)
* @see #canDrop(Object)
* @see #validateDrop(Object,Object,boolean)
- */
+ */
public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor)
{
// for backward compatability
return doDrop(from, to, sameSystemType, sameSystem, monitor);
}
-
+
/**
* Overridable by subclasses, and is iff drag and drop supported.
- * Perform drop from the "from" object to the "to" object. By default this does
+ * Perform drop from the "from" object to the "to" object. By default this does
* nothing and we return false. Extenders supporting DnD are expected to implement
- * this method to perform a "paste" into an object.
- *
+ * this method to perform a "paste" into an object.
+ *
* @return the new object that was copied
- *
+ *
* @see #canDrag(Object)
* @see #doDrag(Object,boolean,IProgressMonitor)
* @see #canDrop(Object)
* @see #validateDrop(Object,Object,boolean)
- *
+ *
* @deprecated use doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor) instead
- */
+ */
public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, IProgressMonitor monitor)
{
- return null;
+ return null;
}
-
+
/**
* Overridable by subclasses, and usually is iff drag and drop supported..
* Return true if it is valid for the src object to be dropped in the target. We return false by default.
@@ -1303,17 +1335,17 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* @param target the object which src is dropped in
* @param sameSystem whether this is the same system or not
* @return whether this is a valid operation
- *
+ *
* @see #canDrag(Object)
* @see #doDrag(Object,boolean,IProgressMonitor)
* @see #canDrop(Object)
* @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor)
- */
+ */
public boolean validateDrop(Object src, Object target, boolean sameSystem)
{
- return false;
+ return false;
}
-
+
public boolean validateDrop(ISystemResourceSet set, Object target, boolean sameSystem)
{
boolean valid = true;
@@ -1365,14 +1397,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
/**
* Overridable by subclasses, but usually is not.
- * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
+ * Somtimes we don't want to remember an element's expansion state, such as for temporarily inserted
* messages. In these cases return false from this method. The default is true
*/
public boolean saveExpansionState(Object element)
{
return true;
}
-
+
/**
* Overridable by subclasses, but usually is not.
* Return true if this object is a "prompting" object that prompts the user when expanded.
@@ -1384,8 +1416,8 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
public boolean isPromptable(Object element)
{
return (element instanceof ISystemPromptableObject);
- }
-
+ }
+
/**
* Overridable by subclasses, but usually is not.
* Return true if this object is remote. In this case, the default is true.
@@ -1394,7 +1426,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
{
return true;
}
-
+
/**
* Overridable by subclasses, but usually is not.
* Selection has changed in the Remote Systems view. Empty by default, but override if you need
@@ -1402,7 +1434,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* selection.
* @param element - first selected object
*/
- public void selectionChanged(Object element) // d40615
+ public void selectionChanged(Object element) // d40615
{
}
@@ -1417,11 +1449,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
* returns true if the hasChildren returns false.
*
* If desired, override, and call super(), to support additional filter criteria for <filter>, <enablement> and <visibility>.
- *
+ *
* @see org.eclipse.ui.IActionFilter#testAttribute(Object, String, String)
*/
public boolean testAttribute(Object target, String name, String value)
@@ -1443,7 +1475,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
// we have a wild card test, and * is the last character in the value
if (getName(target).startsWith(value.substring(0, value.length() - 1)))
return true;
- }
+ }
else
return value.equals(getName(target));
}
@@ -1460,14 +1492,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
return ss.isConnected() ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
else
return false;
- }
+ }
else if (name.equalsIgnoreCase("offline")) //$NON-NLS-1$
- {
+ {
ISubSystem ss = getSubSystem(target);
if (ss != null)
return ss.isOffline() ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
else
- return false;
+ return false;
}
else if (name.equalsIgnoreCase("systemType")) //$NON-NLS-1$
{
@@ -1476,16 +1508,16 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
if (ss == null)
{
if (!(target instanceof IHost))
- return false;
- String connSysType = ((IHost)target).getSystemType().getName();
- for (int idx=0; idx
true
if an "Empty List" message should be returned.
- * @return The list of children, a list with the "Empty List" message object or an empty list.
+ * @param returnNullMsg true
if an "Empty List" message
+ * should be returned.
+ * @return The list of children, a list with the "Empty List" message object
+ * or an empty list.
+ * @noextend This method is not intended to be extended by clients.
*/
protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) {
if ((children == null) || (children.length == 0)) {
@@ -1874,7 +1924,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
return new Object[] {
new SystemMessageObject(
RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY,
+ ISystemMessageObject.MSGTYPE_EMPTY,
parent)};
}
}
@@ -1882,13 +1932,16 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
}
/**
- * Callable by subclasses. Do not overridetrue
if an "Empty List" message should be returned.
- * @return The list of children, a list with the "Empty List" message object or an empty list.
- */
+ * Callable by subclasses. Do not override.true
if an "Empty List" message
+ * should be returned.
+ * @return The list of children, a list with the "Empty List" message object
+ * or an empty list.
+ * @noextend This method is not intended to be extended by clients.
+ */
protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) {
if ((children == null) || (children.length == 0)) {
if (fPrefStore == null) {
@@ -123,18 +143,18 @@ public abstract class SystemAbstractAPIProvider
return new Object[] {
new SystemMessageObject(
RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY,
+ ISystemMessageObject.MSGTYPE_EMPTY,
parent)};
}
}
return children;
}
-
+
/**
* 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
- *
+ *
* @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
*/
protected Object[] checkForNull(Object[] children, boolean returnNullMsg)
@@ -159,26 +179,26 @@ public abstract class SystemAbstractAPIProvider
* Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
*/
protected Object[] getCancelledMessageObject()
- {
- if (canceledObject == null)
+ {
+ if (cancelledObject == null)
initMsgObjects();
- msgList[0] = canceledObject;
+ msgList[0] = cancelledObject;
return msgList;
- }
+ }
/**
* Return the "Operation failed" msg as an object array so can be used to answer getChildren()
*/
protected Object[] getFailedMessageObject()
- {
+ {
if (errorObject == null)
initMsgObjects();
msgList[0] = errorObject;
return msgList;
- }
+ }
/**
- * Return true if we are listing connections or not, so we know whether we are interested in
+ * Return true if we are listing connections or not, so we know whether we are interested in
* connection-add events
*/
public boolean showingConnections()
@@ -188,22 +208,22 @@ public abstract class SystemAbstractAPIProvider
// ------------------
// HELPER METHODS...
- // ------------------
+ // ------------------
/**
* Returns the implementation of ISystemViewElement for the given
* object. Returns null if the adapter is not defined or the
* object is not adaptable.
*/
- protected ISystemViewElementAdapter getViewAdapter(Object o)
+ protected ISystemViewElementAdapter getViewAdapter(Object o)
{
return SystemAdapterHelpers.getViewAdapter(o);
}
-
+
/**
* Returns the implementation of ISystemRemoteElement for the given
* object. Returns null if this object does not adaptable to this.
*/
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
+ protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
{
return SystemAdapterHelpers.getRemoteAdapter(o);
}