From 40fee3198917fb3e3ee61db7e90fb2811d5548b9 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Mon, 5 May 2008 10:13:09 +0000 Subject: [PATCH] [cleanup] Fix and clean up Javadocs --- .../ui/view/AbstractSystemViewAdapter.java | 1115 ++++++++++------- .../ui/view/ISystemViewElementAdapter.java | 142 ++- 2 files changed, 749 insertions(+), 508 deletions(-) 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 1b9b4467093..724e40833c4 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 @@ -22,7 +22,7 @@ * Martin Oberhuber (Wind River) - [189163] Update IActionFilter constants from subsystemFactory to subsystemConfiguration * 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 + * David McKnight (IBM) - [208803] add exists() method * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread *******************************************************************************/ @@ -114,16 +114,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda private String filterString = null; /** - * Current viewer. Set by content provider + * Current viewer. Set by content provider. + * + * @deprecated use {@link #getViewer()} and {@link #setViewer(Viewer)} */ protected Viewer viewer = null; + /** - * Current input provider. Set by content provider + * Current input provider. Set by content provider. */ protected Object propertySourceInput = null; /** - * Current shell, set by the content provider + * Current shell, set by the content provider. + * + * @deprecated Use {@link #getShell()} and {@link #setShell(Shell)} */ protected Shell shell; private ISystemViewInputProvider input; @@ -133,49 +138,75 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda private String xlatedFalse = null; private String xlatedNotApplicable = null; private String xlatedNotAvailable = null; + /** - * For returning an empty list from getChildren: new Object[0] + * An empty object list instance, for returning an empty list from + * getChildren: new Object[0]. + * + * @deprecated Do not use directly. Use {@link #checkForEmptyList(Object[], + * Object, boolean)} when needed. */ protected Object[] emptyList = new Object[0]; + /** * For returning a message object from getChildren. Will be an array with - * one item, one of nullObject, cancelledObject or errorObject + * one item, one of nullObject, cancelledObject or errorObject. + * + * @deprecated Do not use directly. Use {@link #getCancelledMessageObject()} + * or {@link #getFailedMessageObject()} or {@link + * #checkForEmptyList(Object[], Object, boolean)} when needed. */ protected Object[] msgList = new Object[1]; + /** * Frequently returned message object from getChildren: "empty list" - * + * * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} * instead. */ protected SystemMessageObject nullObject = null; + /** * Frequently returned message object from getChildren: "operation - * cancelled" + * cancelled". * - * @since org.eclipse.rse.ui 3.0 renamed from canceledObject - * @deprecated don't use this field. + * This field was renamed from "canceledObject" in RSE 3.0. + * + * @since org.eclipse.rse.ui 3.0 + * @deprecated Use {@link #getCancelledMessageObject()} instead. */ protected SystemMessageObject cancelledObject = null; + /** * Frequently returned message object from getChildren: "operation ended in * error" * - * @deprecated don't use this field. + * @deprecated Use {@link #getFailedMessageObject()} instead. */ protected SystemMessageObject errorObject = null; /** - * Message substitution prefix: "&" - */ + * Message substitution prefix: "&" + * + * @deprecated use Eclipse NLS or Java Messageformat for String + * substitution. + */ protected static final String MSG_SUB_PREFIX = "&"; //$NON-NLS-1$ - /** - * Message substitution variable 1: "&1" - */ + + /** + * Message substitution variable 1: "&1" + * + * @deprecated use Eclipse NLS or Java Messageformat for String + * substitution. + */ protected static final String MSG_SUB1 = MSG_SUB_PREFIX+"1"; //$NON-NLS-1$ - /** - * Message substitution variable 2: "&2" - */ + + /** + * Message substitution variable 2: "&2" + * + * @deprecated use Eclipse NLS or Java Messageformat for String + * substitution. + */ protected static final String MSG_SUB2 = MSG_SUB_PREFIX+"2"; //$NON-NLS-1$ /** @@ -195,10 +226,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // DKM: temporary memory caching stuff - we should replace this with something // more comprehensive later + /** * A variable that can be used in getChildren to cache last returned results, if desired */ protected Object[] _lastResults = null; + /** * A variable that can be used to cache last selection, if desired */ @@ -217,31 +250,36 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // 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. */ 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. */ 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. */ public final void setInput(ISystemViewInputProvider input) { @@ -252,11 +290,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // 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 + /** + * Get the shell currently hosting the objects in this adapter. + *

+ * Getter method. Callable by subclasses. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public Shell getShell() { @@ -278,12 +318,15 @@ 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 * setInput input object if set. May be null so test it. + *

+ * Getter method. Callable by subclasses. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public Viewer getViewer() { @@ -306,12 +349,15 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } return viewer; } + /** - * Getter method. Callable by subclasses. Do not override.
* Return the current viewer as an ISystemTree if it is one, or null - * otherwise + * otherwise. + *

+ * Getter method. Callable by subclasses. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected ISystemTree getCurrentTreeView() { @@ -323,11 +369,13 @@ 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.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public ISystemViewInputProvider getInput() { @@ -335,10 +383,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * 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. + * Returns the subsystem that contains this object. By default, if the given + * element is an instance of {@link + * org.eclipse.rse.core.subsystems.AbstractResource AbstractResource}, it + * calls getSubSystem on it, else returns null. + *

+ * Overridable by subclasses. You should override if not using + * AbstractResource.
*/ public ISubSystem getSubSystem(Object element) { @@ -350,13 +401,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda 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. + *

+ * Called by SystemView viewer. No need to override or call.
* * @param menu The menu to contribute actions to * @param selection The window's current selection. @@ -380,7 +431,6 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } - /** * Add or remove custom actions dynamically to a context menu. * @@ -403,36 +453,52 @@ 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, - * otherwise pass one of the GROUP_XXX values from {@link org.eclipse.rse.ui.ISystemContextMenuConstants}. If you pass one that - * identifies a pre-defined cascading menu, such as GROUP_OPENWITH, your action will magically appear in that - * cascading menu, even if it was otherwise empty. + * 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, otherwise pass one of the + * GROUP_XXX values from {@link + * org.eclipse.rse.ui.ISystemContextMenuConstants}. If you pass one that + * identifies a predefined cascading menu, such as GROUP_OPENWITH, your + * action will magically appear in that cascading menu, even if it was + * otherwise empty. *

- * For the actions themselves, you will probably use one of the base action classes: + * For the actions themselves, you will probably use one of the base action + * classes: *

* * @param menu the popup menu you can contribute to * @param selection the current selection in the calling tree or table view * @param parent the shell of the calling tree or table view - * @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface.action.IAction) add} method. + * @param menuGroup the default menu group to place actions into if you + * don't care where they. Pass this to the SystemMenuManager {@link + * org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface. + * action.IAction) add} method. * - * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#addActions(SystemMenuManager, IStructuredSelection, Shell, String) + * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#addActions( + * SystemMenuManager, IStructuredSelection, Shell, String) */ public abstract void addActions(SystemMenuManager menu,IStructuredSelection selection,Shell parent,String menuGroup); /** - * Abstract. Must be overridden by subclasses.
- * IWorkbenchAdapter method. Returns an image descriptor for the image. - * More efficient than getting the image. - * @param element The element for which an image is desired + * {@inheritDoc} Abstract. Must be overridden by subclasses. + *
*/ public abstract ImageDescriptor getImageDescriptor(Object element); @@ -449,11 +515,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, but rarely needs to be.
- * Return the name of this object, which may be different than the display text ({#link #getText(Object)}. - * By default, returns getText(element);, but child classes can override if display name doesn't equal real name. + * {@inheritDoc} By default, returns getText(element);, but + * child classes can override if display name doesn't equal real name. *

- * Called by common rename and delete actions, and used to populate property sheet. + * Called by common rename and delete actions, and used to populate property + * sheet. + *

+ * Overridable by subclasses, but rarely needs to be.
+ * * @see #getText(Object) * @see #getAbsoluteName(Object) */ @@ -463,9 +532,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Internal use. Can be safely ignored.
- * Return the name for this object. Unique requirement for IWorkbenchAdapter. - * We map to getText(element). + * {inheritDoc} We map to getText(element). + *

+ * Internal use. Can be safely ignored.
+ * + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public String getLabel(Object element) { @@ -477,18 +549,19 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Abstract. Must be overridden by subclasses.
- * Return the type label for this object. + * {@inheritDoc} + *

+ * Abstract. Must be overridden by subclasses.
*/ public abstract String getType(Object element); /** - * Overridable by subclasses, but rarely needs to be.
- * Return the string to display in the status line when the given object is selected. - * The default is: - *


-	 *   getType(): getName()
-	 * 
+ * {@inheritDoc} The default is: + *
+	 * getType(): getName()
+	 * 
+ *

+ * Overridable by subclasses, but rarely needs to be.
*/ public String getStatusLineText(Object element) { @@ -496,38 +569,36 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * 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 + * {inheritDoc} 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 - * + * @since 3.0 */ public boolean exists(Object element) { return true; } - /** - * Abstract. Must be overridden by subclasses.
- * Return the parent of this object. This is required by eclipse UI adapters, but - * we try desperately not to use in the RSE. So, you are probably safe returning null, - * but if can return a parent, why not, go for it. + * {@inheritDoc} Abstract. Must be overridden by subclasses. + *
*/ public abstract Object getParent(Object element); /** - * Abstract. Must be overridden by subclasses.
- * Return true if this object has children. + * {@inheritDoc} Abstract. Must be overridden by subclasses. + *
+ * + * @param element the element to check + * @return true if this element can have children. */ public abstract boolean hasChildren(IAdaptable element); /** - * Override this to provide context-specific support + * {@inheritDoc} Override this to provide context-specific support. + * * @param element the context object * @return whether the context has children */ @@ -537,49 +608,52 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Implementation of IWorkbenchAdapter.getChildren(). Rather than overriding this, adapter implementors - * should override the getChildren() methods that take a monitor. + * {@inheritDoc} Rather than overriding this, adapter implementors should + * override the getChildren() methods that take a progress monitor. */ public final Object[] getChildren(Object object) { return getChildren((IAdaptable)object, new NullProgressMonitor()); } - /** - * This should be overridden by subclasses in order to provide - * deferred query support via the Eclipse Jobs mechanism - * Return the children of this object. Return null if children not supported. + * {@inheritDoc} This should be overridden by subclasses in order to provide + * deferred query support via the Eclipse Jobs mechanism. Return the + * children of this object. Return null if children not supported. + * * @param element the model object to get children from * @param monitor the progress monitor - * * @return the children of element */ public abstract Object[] getChildren(IAdaptable element, IProgressMonitor monitor); /** - * This should be overridden by subclasses in order to provide - * deferred query support via the Eclipse Jobs mechanism. The context object is passed in - * in place of the model object. By default, we just fall back to the original mechanism - * Return the children of this object. Return null if children not supported. + * {@inheritDoc} This should be overridden by subclasses in order to provide + * deferred query support via the Eclipse Jobs mechanism, if your adapter + * supports context objects. If not, this will fall back to the model object + * version of the method. * - * This method should be overridden if your adapter supports context objects. If not, this will - * fall back to the model object version of the method. + * The context object is passed in in place of the model object. By default, + * we just fall back to the original mechanism Return the children of this + * object. Return null if children not supported. + * + * @param element the context object that wrappers a model object, it's + * subsystem and filter reference * @param monitor the progress monitor - * @param element the context object that wrappers a model object, it's subsystem and filter reference - * - * @return the children of the model object within the context object that matches the containing filter reference criteria + * @return the children of the model object within the context object that + * matches the containing filter reference criteria. */ public Object[] getChildren(IContextObject element, IProgressMonitor monitor) { return getChildren(element.getModelObject(), monitor); } - /** - * Overridable by subclasses, but rarely needs to be.
- * Return the children of this object, using the given Expand-To filter. - * By default, this calls getChildren(element). Override only if you support Expand-To menu actions. + * Return the children of this object, using the given Expand-To filter. By + * default, this calls getChildren(element). Override only if you support + * Expand-To menu actions. + *

+ * Overridable by subclasses, but rarely needs to be.
*/ public Object[] getChildrenUsingExpandToFilter(Object element, String expandToFilter) { @@ -587,9 +661,9 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses.
- * Return the default descriptors for all system elements. - */ + * Return the default descriptors for all system elements. Callable by + * subclasses.
+ */ protected static IPropertyDescriptor[] getDefaultDescriptors() { if (propertyDescriptorArray == null) @@ -610,11 +684,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses.
- * Create and return a simple string readonly property descriptor. + * Create and return a simple string read-only property descriptor. + * Callable by subclasses.
+ * * @param propertyKey Key for this property, sent back in getPropertyValue. - * @param label - * @param description + * @param label A user-readable translated label for the Property. + * @param description A description for the Property (to be displayed as a + * tooltip). */ protected static PropertyDescriptor createSimplePropertyDescriptor(String propertyKey, String label, String description) { @@ -623,25 +699,30 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return pd; } - /** - * Needed by framework for property sheet. No need to call or override.
- * Returns a value for this object that can be edited in a property sheet. - * - * @return a value that can be editted - */ + * Returns a value for this object that can be edited in a property sheet. + * Needed by framework for property sheet. No need to call or + * override.
+ * + * @return a value that can be edited. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. + */ public Object getEditableValue() { return this; } + /** - * Implemented. Do not override typically. See {@link #internalGetPropertyDescriptors()}.
- * Returns the property descriptors defining what properties are seen in the property sheet. - * By default returns descriptors for name, type and number-of-children only plus whatever - * is returned from internalGetPropertyDescriptors(). + * Returns the property descriptors defining what properties are seen in the + * property sheet. By default returns descriptors for name, type and + * number-of-children only plus whatever is returned from + * internalGetPropertyDescriptors(). + *

+ * Implemented. Do not override typically. See {@link + * #internalGetPropertyDescriptors()}.
* * @return an array containing all descriptors. - * * @see #internalGetPropertyDescriptors() */ public IPropertyDescriptor[] getPropertyDescriptors() @@ -663,44 +744,46 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Abstract.
- * Implement this to return the property descriptors for the - * properties in the property sheet. This is beyond the Name, Type and NbrOfChildren - * properties which already implemented and done for you. + * Implement this to return the property descriptors for the properties in + * the property sheet. This is beyond the Name, Type and NbrOfChildren + * properties which already implemented and done for you. *

- * Override if want to include more properties in the property sheet,

- *

If you override this for readonly properties, you must also override:

+ * Override if want to include more properties in the property sheet, + *

+ *

+ * If you override this for read-only properties, you must also override: + *

* - *

If you override this for editable properties, you must also override:

+ *

+ * If you override this for editable properties, you must also override: + *

* * - * @return an array containing all descriptors to be added to the default set of descriptors, or null - * if no additional properties desired. + * @return an array containing all descriptors to be added to the default + * set of descriptors, or null if no additional properties desired. * @see #createSimplePropertyDescriptor(String, String, String) */ protected abstract IPropertyDescriptor[] internalGetPropertyDescriptors(); - /** - * Callable by subclasses. Do not override.
* Returns the list of property descriptors that are unique for this * particular adapter - that is the difference between the default property * descriptors and the total list of property descriptors. *

* If internalGetPropertyDescriptors() returns non-null, then returns that, - * else computes the difference. - *

- * This is called by the table views like + * else computes the difference. This is called by the table views like * {@link org.eclipse.rse.ui.view.SystemTableView}. *

+ * Callable by subclasses. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public IPropertyDescriptor[] getUniquePropertyDescriptors() { @@ -744,18 +827,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, but usually is not.
- * Similar to getPropertyValue(Object key) but takes an argument - * for determining whether to return a raw value or formatted value. - * - * By default, simply calls getPropertyValue(key). + * Similar to getPropertyValue(Object key) but takes an argument for + * determining whether to return a raw value or formatted value. By + * default, simply calls getPropertyValue(key). *

- * This is called by the table views in order to get values that can be sorted when the - * user clicks on the column heading. To support this for a numeric property say, return - * a Long/Integer object if false, versus returning string. + * This is called by the table views in order to get values that can be + * sorted when the user clicks on the column heading. To support this for a + * numeric property say, return a Long/Integer object if false, versus + * returning string. + *

+ * Overridable by subclasses, but usually is not.
* - * @param key the name or key of the property as named by its property descriptor - * @param formatted indication of whether to return the value in formatted or raw form + * @param key the name or key of the property as named by its property + * descriptor + * @param formatted indication of whether to return the value in formatted + * or raw form * @return the current value of the given property */ public Object getPropertyValue(Object key, boolean formatted) @@ -764,13 +850,18 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Implemented. Do not override typically. See {@link #internalGetPropertyValue(Object)}.
* Returns the current value for the named property.
- * By default handles ISystemPropertyConstants.P_TEXT, P_TYPE and P_NBRCHILDREN only, then defers to {@link #internalGetPropertyValue(Object)} for - * subclasses. - *
Note: you will need to reference propertySourceInput, which is the currently selected object. Just case it to what you expect the selected object's type to be. + * By default handles ISystemPropertyConstants.P_TEXT, P_TYPE and + * P_NBRCHILDREN only, then defers to {@link + * #internalGetPropertyValue(Object)} for subclasses.
+ * Note: you will need to reference propertySourceInput, + * which is the currently selected object. Just case it to what you expect + * the selected object's type to be. + *

+ * Implemented. Do not override typically. See {@link + * #internalGetPropertyValue(Object)}.
* - * @param key the name of the property as named by its property descriptor + * @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) @@ -797,14 +888,15 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda else return internalGetPropertyValue(key); } + /** - * Abstract.
- * Implement this to return the property descriptors for the - * properties in the property sheet. This is beyond the Name, Type and NbrOfChildren - * properties which already implemented and done for you. + * Implement this to return the property descriptors for the properties in + * the property sheet. This is beyond the Name, Type and NbrOfChildren + * properties which already implemented and done for you. * - * @param key the name of the property as named by its property descriptor - * @return the current value of the property or null if not a known property. + * @param key the name of the property as named by its property descriptor + * @return the current value of the property or null if not a known + * property. */ protected abstract Object internalGetPropertyValue(Object key); @@ -880,59 +972,73 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses. Must be iff editable properties are supported.
- * Returns whether the property value has changed from the default. - * Only applicable for editable properties. - *
RETURNS FALSE BY DEFAULT. - * @return true if the value of the specified property has changed - * from its original default value; false otherwise. + * Returns whether the property value has changed from the default. Only + * applicable for editable properties. + *

+ * Overridable by subclasses. Must be overridden only if editable + * properties are supported.
+ *
+ * RETURNS FALSE BY DEFAULT. + * + * @return true if the value of the specified property has + * changed from its original default value; false otherwise. */ public boolean isPropertySet(Object key) { return false; } + /** - * Overridable by subclasses. Must be iff editable properties are supported.
- * Resets the specified property's value to its default value. - * Called on editable property when user presses reset button in property sheet viewer. + * Resets the specified property's value to its default value. Called on + * editable property when user presses reset button in property sheet + * viewer. + *

+ * Overridable by subclasses. Must be overridden only if editable + * properties are supported.
* DOES NOTHING BY DEFAULT. * - * @param key the key identifying property to reset + * @param key the key identifying property to reset */ public void resetPropertyValue(Object key) { } + /** - * Overridable by subclasses. Must be iff editable properties are supported.
- * Sets the named property to the given value. - * Called after an editable property is changed by the user. - * + * Sets the named property to the given value. Called after an editable + * property is changed by the user. + *

+ * Overridable by subclasses. Must be overridden only if editable + * properties are supported.
* DOES NOTHING BY DEFAULT. * - * @param key the key identifying property to reset - * @param value the new value for the property + * @param key the key identifying property to reset + * @param value the new value for the property */ public void setPropertyValue(Object key, Object value) { } /** - * Called from adapter factories. Do not override.
* Set input object for property source queries. This must be called * by your XXXAdaptorFactory before returning this adapter object. + *

+ * Called from adapter factories. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public void setPropertySourceInput(Object propertySourceInput) { this.propertySourceInput = propertySourceInput; } - /** - * Overridable by subclasses, but usually is not.
- * User has double clicked on an object. If you want to do something special, - * do it and return true. Otherwise return false to have the viewer do the default behaviour. - */ + /** + * User has double clicked on an object. If you want to do something + * special, do it and return true. Otherwise return false to have the viewer + * do the default behaviour. + *

+ * Overridable by subclasses, but usually is not.
+ */ public boolean handleDoubleClick(Object element) { return false; @@ -943,22 +1049,27 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // ------------------------------------------ /** - * Overridable by subclasses, but usually is not.
- * Return true if we should show the delete action in the popup for the given element. - * If true, then canDelete will be called to decide whether to enable delete or not. - *

By default, returns true. + * Return true if we should show the delete action in the popup for the + * given element. If true, then canDelete will be called to decide whether + * to enable delete or not. + *

+ * Overridable by subclasses, but usually is not.
+ * By default, returns true. + * * @see #canDelete(Object) */ public boolean showDelete(Object element) { return true; } + /** - * Overridable by subclasses, and usually is.
- * Return true if this object is deletable by the user. If so, when selected, - * the Edit->Delete menu item will be enabled. + * Return true if this object is deletable by the user. If so, when + * selected, the Edit->Delete menu item will be enabled. *

+ * Overridable by subclasses, and usually is.
* By default, returns false. Override if your object is deletable. + * * @see #showDelete(Object) */ public boolean canDelete(Object element) @@ -967,12 +1078,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and usually is.
* Perform the delete action. By default does nothing. Override if your * object is deletable. Return true if this was successful. Return false if * it failed and you issued a message. Throw an exception if it failed and * you want to use the generic message. - * + *

+ * Overridable by subclasses, and usually is.
+ * * @see #showDelete(Object) * @see #canDelete(Object) */ @@ -982,12 +1094,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and usually is.
* Perform the delete action. By default just calls the doDelete method for * each item in the resourceSet. Override if you wish to perform some sort * of optimization for the batch delete. Return true if this was successful. * Return false if ANY delete op failed and a message was issued. Throw an * exception if ANY failed and you want to use the generic message. + *

+ * Overridable by subclasses, and usually is.
*/ public boolean doDeleteBatch(Shell shell, List resourceSet, IProgressMonitor monitor) throws Exception { @@ -999,17 +1112,20 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return ok; } - // ------------------------------------------ // METHODS TO SUPPORT COMMON RENAME ACTION... // ------------------------------------------ /** - * Overridable by subclasses, but usually is not.
- * Return true if we should show the rename action in the popup for the given element. - * If true, then canRename will be called to decide whether to enable rename or not. - *

By default, returns true. - * @return true if we should show the rename action in the popup for the given element. + * Return true if we should show the rename action in the popup for the + * given element. If true, then canRename will be called to decide whether + * to enable rename or not. + *

+ * Overridable by subclasses, but usually is not.
+ * By default, returns true. + * + * @return true if we should show the rename action in the popup for the + * given element. * @see #canRename(Object) * @see #doRename(Shell,Object,String, IProgressMonitor) */ @@ -1017,12 +1133,15 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda { return true; } + /** - * Overridable by subclasses, and usually is.
- * Return true if this object is renamable by the user. If so, when selected, - * the Rename popup menu item will be enabled. - * By default, returns false. Override if your object is renamable. - * @return true if this object is renamable by the user + * Return true if this object is renameable by the user. If so, when + * selected, the Rename popup menu item will be enabled. + *

+ * Overridable by subclasses, and usually is.
+ * By default, returns false. Override if your object can be renamed. + * + * @return true if this object is renameable by the user * @see #showRename(Object) * @see #doRename(Shell,Object,String,IProgressMonitor) * @see #getNameValidator(Object) @@ -1035,15 +1154,17 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** + * Perform the rename action. By default does nothing. + *

* Overridable by subclasses, and usually is.
- * Perform the rename action. By default does nothing. Override if your - * object is renamable. Return true if this was successful. Return false if - * it failed and you issued a message. Throw an exception if it failed and - * you want to use the generic message. - * + * Override if your object can be renamed. Return true if this was + * successful. Return false if it failed and you issued a message. Throw an + * exception if it failed and you want to use the generic message. + * * @return true if the rename was successful * @see #showRename(Object) * @see #canRename(Object) + * @since 3.0 */ public boolean doRename(Shell shell, Object element, String name, IProgressMonitor monitor) throws Exception { @@ -1052,14 +1173,18 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and usually is iff canRename is.
- * Return a validator for verifying the new name is correct. - * If you return null, no error checking is done on the new name in the common rename dialog!! + * Return a validator for verifying the new name is correct. If you return + * null, no error checking is done on the new name in the common rename + * dialog!! *

- * Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}. + * Used in the common rename dialogs, and only if you return true to {@link + * #canRename(Object)}. *

+ * Overridable by subclasses, and usually is if canRename is. + *
* Suggest you use at least UniqueStringValidator or a subclass to ensure - * new name is at least unique. + * new name is at least unique. + * * @see #canRename(Object) */ public ISystemValidator getNameValidator(Object element) @@ -1068,38 +1193,47 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and usually is iff canRename is.
- * Form and return a new canonical (unique) name for this object, given a candidate for the new - * name. This is called by the generic multi-rename dialog to test that all new names are unique. - * 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. + * Form and return a new canonical (unique) name for this object, given a + * candidate for the new name. This is called by the generic multi-rename + * dialog to test that all new names are unique. To do this right, sometimes + * more than the raw name itself is required to do uniqueness checking. *

- * 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 - * sufficiently to make it unique. - *

- * By default, this simply returns the given name. It is overridden by child classes when appropriate. + * 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. + *

+ * 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 sufficiently to make it unique. + *

+ * Overridable by subclasses, and usually is if canRename is. + *
+ * By default, this simply returns the given name. It is overridden by child + * classes when appropriate. + * * @see #canRename(Object) - */ + */ public String getCanonicalNewName(Object element, String newName) { // this is all for defect 42145. Phil return newName; } - /** - * Overridable by subclasses, but usually is not.
- * Compare the name of the given element to the given new name to decide if they are equal. - * Allows adapters to consider case and quotes as appropriate. + + /** + * Compare the name of the given element to the given new name to decide if + * they are equal. Allows adapters to consider case and quotes as + * appropriate. *

- * Used in the common rename dialogs, and only if you return true to {@link #canRename(Object)}. - *

- * By default does an equalsIgnoreCase comparison + * Used in the common rename dialogs, and only if you return true to {@link + * #canRename(Object)}. + *

+ * Overridable by subclasses, but usually is not.
+ * By default does an equalsIgnoreCase comparison + * * @see #canRename(Object) - */ + */ public boolean namesAreEqual(Object element, String newName) { return getName(element).equalsIgnoreCase(newName); @@ -1109,10 +1243,10 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // METHODS TO SUPPORT COMMON REFRESH ACTION... // ------------------------------------------ /** - * Overridable by subclasses, and usually is.
- * Return true if we should show the refresh action in the popup for the given element. - * Note the actual work to do the refresh is handled for you. + * Return true if we should show the refresh action in the popup for the + * given element. Note the actual work to do the refresh is handled for you. *

+ * Overridable by subclasses, and usually is.
* Default is true. */ public boolean showRefresh(Object element) @@ -1124,10 +1258,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // METHODS TO SUPPORT COMMON PROPERTIES ACTION... // ---------------------------------------------- /** - * Overridable by subclasses, and usually is.
- * Return true if we should show the properties action in the popup for the given element. - * Note the actual work to show the properties dialog is handled for you. + * Return true if we should show the properties action in the popup for the + * given element. Note the actual work to show the properties dialog is + * handled for you. *

+ * Overridable by subclasses, and usually is.
* Default is true. */ public boolean showProperties(Object element) @@ -1135,16 +1270,16 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return true; } - // ------------------------------------------------------------ // METHODS TO SUPPORT COMMON OPEN-IN-NEW-PERSPECTIVE ACTIONS... // ------------------------------------------------------------ /** - * Overridable by subclasses, and usually is NOT.
- * 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. + * 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. + * Overridable by subclasses, and usually is NOT.
+ * Only applicable for non-remote resources. Remote always show Go To + * only. */ public boolean showOpenViewActions(Object element) { @@ -1154,23 +1289,27 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * 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. - */ + * Return true if we should show the generic show in table action in the + * popup for the given element. + *

+ * Overridable by subclasses, and usually is NOT.
+ */ public boolean showGenericShowInTableAction(Object element) { 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, - * we return false. Extenders may decide whether or not - * certain objects can be dragged with this method. + * Return true if this object can be copied to another location. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * By default, we return false. Extenders may decide whether or not certain + * objects can be dragged with this method. + * * @see #doDrag(Object,boolean,IProgressMonitor) * @see #canDrop(Object) * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor) @@ -1182,11 +1321,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and is iff drag and drop supported.
- * Return true if this object can be copied to another location. By default, - * we return false. Extenders may decide whether or not - * certain objects can be dragged with this method. - * Return true if these objects can be copied to another location via drag and drop, or clipboard copy. + * Return true if this object can be copied to another location. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * By default, we return false. Extenders may decide whether or not certain + * objects can be dragged with this method. Return true if these objects can + * be copied to another location via drag and drop, or clipboard copy. */ public boolean canDrag(SystemRemoteResourceSet elements) { @@ -1194,10 +1335,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * 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. + * Perform the drag on the given object. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * 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. + * * @see #canDrag(Object) * @see #canDrop(Object) * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor) @@ -1209,10 +1354,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * 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 - * accept other objects with this method. + * Return true if another object can be copied into this object. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * By default 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) * @see #doDrop(Object,Object,boolean,boolean,IProgressMonitor) @@ -1221,13 +1369,15 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda public boolean canDrop(Object element) { 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. + * Perform the drag on the given objects. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * 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 @@ -1246,17 +1396,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and is iff drag and drop supported.
- * Perform drop from the "fromSet" of objects to the "to" object + * Perform drop from the "fromSet" of objects to the "to" object. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * * @param fromSet the source objects for the drop * @param to the target object for the drop - * @param sameSystemType indication of whether the source and target reside of the same type of system - * @param sameSystem indication of whether the source and target are on the same system + * @param sameSystemType indication of whether the source and target reside + * of the same type of system + * @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) { @@ -1290,10 +1444,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and is iff drag and drop supported.
- * 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. + * Perform drop from the "from" object to the "to" object. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * 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. * * @return the new object that was copied * @@ -1304,15 +1461,18 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda */ public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor) { - // for backward compatability + // for backward compatibility 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 - * nothing and we return false. Extenders supporting DnD are expected to implement - * this method to perform a "paste" into an object. + * Perform drop from the "from" object to the "to" object. + *

+ * Overridable by subclasses, and is only if drag and drop + * supported.
+ * 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. * * @return the new object that was copied * @@ -1321,26 +1481,32 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda * @see #canDrop(Object) * @see #validateDrop(Object,Object,boolean) * - * @deprecated use doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor) instead + * @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; } - /** - * 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. - * @param src the object to drop - * @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 - * + /** + * Return true if it is valid for the src object to be dropped in the + * target. + *

+ * Overridable by subclasses, and usually is only if drag and drop + * supported.
+ * We return false by default. + * + * @param src the object to drop + * @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; @@ -1361,9 +1527,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER... // ------------------------------------------------------------ /** - * Overridable by subclasses, but usually is not.
- * Return what to save to disk to identify this element in the persisted list of expanded elements. - * This just defaults to getName, but if that is not sufficient override it here. + * Return what to save to disk to identify this element in the persisted + * list of expanded elements. + *

+ * Overridable by subclasses, but usually is not.
+ * This just defaults to getName, but if that is not sufficient override it + * here. */ public String getMementoHandle(Object element) { @@ -1372,20 +1541,26 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda else return getName(element); } + /** - * Overridable by subclasses, but usually is not.
- * Return what to save to disk to identify this element when it is the input object to a secondary - * Remote System Explorer perspective. Defaults to getMementoHandle(element). + * Return what to save to disk to identify this element when it is the input + * object to a secondary Remote System Explorer perspective. + *

+ * Overridable by subclasses, but usually is not.
+ * Defaults to getMementoHandle(element). */ public String getInputMementoHandle(Object element) { return getMementoHandle(element); } + /** - * Overridable by subclasses, but usually is not.
- * Return a short string to uniquely identify the type of resource. Eg "conn" for connection. - * This just defaults to getType, but if that is not sufficient override it here, since that is - * a translated string. + * Return a short string to uniquely identify the type of resource. Eg + * "conn" for connection. + *

+ * Overridable by subclasses, but usually is not.
+ * This just defaults to getType, but if that is not sufficient override it + * here, since that is a translated string. */ public String getMementoHandleKey(Object element) { @@ -1395,51 +1570,56 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return getType(element); } - /** - * Overridable by subclasses, but usually is not.
- * 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 - */ + /** + * Sometimes 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. + *

+ * Overridable by subclasses, but usually is not.
+ */ 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. - * For such objects, we do not try to save and restore their expansion state on F5 or between - * sessions. - *

- * Default is false unless element implements ISystemPromptable object. Override as appropriate. - */ + /** + * Return true if this object is a "prompting" object that prompts the user + * when expanded. For such objects, we do not try to save and restore their + * expansion state on F5 or between sessions. + *

+ * Overridable by subclasses, but usually is not.
+ * Default is false unless element implements ISystemPromptable object. + * Override as appropriate. + */ 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. - */ + /** + * Return true if this object is remote. In this case, the default is true. + *

+ * Overridable by subclasses, but usually is not.
+ */ public boolean isRemote(Object element) { 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 - * to track selection changed. For example, this is used to drive table views that respond to - * selection. - * @param element - first selected object - */ + /** + * Selection has changed in the Remote Systems view. Empty by default, but + * override if you need to track selection changed. For example, this is + * used to drive table views that respond to selection. + *

+ * Overridable by subclasses, but usually is not.
+ * + * @param element - first selected object + */ public void selectionChanged(Object element) // d40615 { } /** - * Overridable by subclasses, typically if additional properties are supported.
* From IActionFilter so the popupMenus extension point can use <filter>, <enablement> * or <visibility>. The support is for the following: *

    @@ -1461,6 +1641,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda * You can specify multiple values by comma-separating them, and this returns if there is a match on any them. *
*

+ * Overridable by subclasses, typically if additional properties are supported.
* 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) @@ -1654,12 +1835,14 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // These are low-usage methods. // -------------------------------------- /** - * Overridable by subclasses, but usually is not.
- * From {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubSubType(Object)}. - * Pre-supplied for convenience for subclasses that want to implement this interface for - * remote object adapters. - *

- * Returns null. Override if you want to supply a sub-sub-type for filtering in the popupMenus extension point. + * From {@link + * org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubSubType + * (Object)}. Pre-supplied for convenience for subclasses that want to + * implement this interface for remote object adapters. + *

+ * Overridable by subclasses, but usually is not.
+ * Returns null. Override if you want to supply a sub-sub-type for filtering + * in the popupMenus extension point. */ public String getRemoteSubSubType(Object element) { @@ -1667,20 +1850,25 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, but usually is not.
- * From {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubSubType(Object)}. - * Pre-supplied for convenience for subclasses that want to implement this interface for - * remote object adapters. - *

- * Returns null. Override if the remote resource is compilable. + * From {@link + * org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubSubType + * (Object)}. Pre-supplied for convenience for subclasses that want to + * implement this interface for remote object adapters. + *

+ * Overridable by subclasses, but usually is not.
+ * Returns null. Override if the remote resource is compilable. */ public String getRemoteSourceType(Object element) { return null; } + /** - * Overridable by subclasses, and must be for editable objects.
* Return the remote edit wrapper for this object. + *

+ * Overridable by subclasses, and must be for editable + * objects.
+ * * @param object the object to edit * @return the editor wrapper for this object */ @@ -1690,8 +1878,10 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Overridable by subclasses, and must be for editable objects.
* Indicates whether the specified object can be edited or not. + * Overridable by subclasses, and must be for editable + * objects.
+ * * @param object the object to edit * @return true if the object can be edited. Returns false by default. */ @@ -1703,20 +1893,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda // ------------------ // HELPER METHODS... // ------------------ - /** - * Callable by subclasses.
- * Returns the implementation of ISystemViewElement for the given - * object. Returns null if the adapter is not defined or the - * object is not adaptable. - *

- * Just a convenient shortcut to {@link org.eclipse.rse.ui.view.SystemAdapterHelpers#getViewAdapter(Object, Viewer)} - *

- * Should we allow clients to override this in order to provide an - * optimized implementation for their models? But it's being called - * by subclasses only anyways... - * - * @deprecated use SystemAdapterHelpers.getViewAdapter(o, getViewer()) instead - */ + /** + * Returns the implementation of ISystemViewElement for the given object. + * Returns null if the adapter is not defined or the object is not + * adaptable. + *

+ * Callable by subclasses.
+ * Just a convenient shortcut to {@link + * org.eclipse.rse.ui.view.SystemAdapterHelpers#getViewAdapter(Object, + * Viewer)}

Should we allow clients to override this in order to + * provide an optimized implementation for their models? But it's being + * called by subclasses only anyways... + * + * @deprecated use SystemAdapterHelpers.getViewAdapter(o, getViewer()) + * instead + */ protected ISystemViewElementAdapter getSystemViewElementAdapter(Object o) { return SystemAdapterHelpers.getViewAdapter(o, getViewer()); @@ -1737,18 +1928,19 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses.
- * Returns the implementation of ISystemRemoteElement for the given - * object. Returns null if this object does not adaptable to this. - *

- * Just a convenient shortcut to {@link org.eclipse.rse.ui.view.SystemAdapterHelpers#getRemoteAdapter(Object, Viewer)} - *

- * Should we allow clients to override this in order to provide an - * optimized implementation for their models? But it's being called - * by subclasses only anyways... - * - * @deprecated use SystemAdapterHelpers.getRemoteAdapter(o, getViewer()) instead - */ + * Returns the implementation of ISystemRemoteElement for the given object. + * Returns null if this object does not adaptable to this. + *

+ * Callable by subclasses.
+ * Just a convenient shortcut to {@link + * org.eclipse.rse.ui.view.SystemAdapterHelpers#getRemoteAdapter(Object, + * Viewer)}

Should we allow clients to override this in order to + * provide an optimized implementation for their models? But it's being + * called by subclasses only anyways... + * + * @deprecated use SystemAdapterHelpers.getRemoteAdapter(o, getViewer()) + * instead + */ protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) { // hmmm, any reason why we shouldn't do the following 2 lines of code for performance reasons? @@ -1768,13 +1960,21 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses.
- * Do message variable substitution. Using you are replacing &1 (say) with - * a string. - * @param msg message containing substitution variable. Eg "Connect failed with return code &1" + * Substitute all occurrences of a given String with another String. + * + * Callable by subclasses. This method does message variable + * substitution. Using you are replacing &1 (say) with a string. + * + * @param msg message containing substitution variable. Eg "Connect failed + * with return code &1" * @param subOld substitution variable. Eg "%1" * @param subNew substitution data. Eg "001" * @return message with all occurrences of variable substituted with data. + * + * @deprecated Clients should use Eclipse {@link org.eclipse.osgi.util.NLS} + * or Java {@link java.text.MessageFormat} or + * {@link java.lang.String#replaceAll(String, String)} to do + * substring replacement and variable substitution. */ public static String sub(String msg, String subOld, String subNew) { @@ -1795,11 +1995,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override.
* Return the current viewer as an ISystemTree if the viewer is set and it * implements this interface (SystemView does). May be null so test it. + *

+ * Callable by subclasses. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected ISystemTree getSystemTree() { @@ -1811,10 +2013,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override
- * Return "Yes" translated + * Return "Yes" translated. Callable by subclasses. Do not override + *
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ public String getTranslatedYes() { @@ -1824,10 +2027,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override.
- * Return "No" translated + * Return "No" translated. Callable by subclasses. Do not override. + *
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected String getTranslatedNo() { @@ -1837,10 +2041,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override.
- * Return "True" translated + * Return "True" translated. Callable by subclasses. Do not override. + *
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected String getTranslatedTrue() { @@ -1848,11 +2053,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda xlatedTrue = SystemResources.TERM_TRUE; return xlatedTrue; } + /** - * Callable by subclasses. Do not override.
- * Return "False" translated + * Return "False" translated. Callable by subclasses. Do not + * override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected String getTranslatedFalse() { @@ -1860,11 +2067,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda xlatedFalse = SystemResources.TERM_FALSE; return xlatedFalse; } + /** - * Callable by subclasses. Do not override.
- * Return "Not application" translated + * Return "Not applicable" translated. Callable by subclasses. Do not + * override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected String getTranslatedNotApplicable() { @@ -1872,11 +2081,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda xlatedNotApplicable = SystemPropertyResources.RESID_TERM_NOTAPPLICABLE; return xlatedNotApplicable; } + /** - * Callable by subclasses. Do not override.
- * Return "Not available" translated + * Return "Not available" translated. Callable by subclasses. Do not + * override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected String getTranslatedNotAvailable() { @@ -1886,7 +2097,11 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Internal use. Do not override. + * Initialize Message Objects. Internal use. Do not call or override. + * + * @deprecated Internal use. Do not call this method. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected final void initMsgObjects() { @@ -1896,20 +2111,22 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override
* In getChildren, return checkForEmptyList(children, parent, * true/false)<.samp> 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 + * array is null or empty. + *

+ * Callable by subclasses. Do not override.
* * @param children The list of children. * @param parent The parent for the children. - * @param returnNullMsg true if an "Empty List" message - * should be returned. + * @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. + * or an empty list. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) { if ((children == null) || (children.length == 0)) { @@ -1931,16 +2148,18 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return children; } - /** - * Callable by subclasses. Do not override.
+ /** * In getChildren, return checkForNull(children, 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 + * it returns the "Empty list" message object if the array is null or empty. + *

+ * Callable by subclasses. Do not override.
* * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} - * instead. - * @noextend This method is not intended to be extended by clients. + * instead. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected Object[] checkForNull(Object[] children, boolean returnNullMsg) { @@ -1961,9 +2180,13 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override.
* Return the "Operation cancelled by user" message as an object array so - * can be used to answer getChildren() + * can be used to answer getChildren(). + *

+ * Callable by subclasses. Do not override.
+ * + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected final Object[] getCancelledMessageObject() { @@ -1972,10 +2195,15 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda msgList[0] = cancelledObject; return msgList; } - /** - * Callable by subclasses. Do not override.
+ + /** * Return the "Operation failed" message as an object array so can be used - * to answer getChildren() + * to answer getChildren(). + *

+ * Callable by subclasses. Do not override.
+ * + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected final Object[] getFailedMessageObject() { @@ -1984,13 +2212,17 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda msgList[0] = errorObject; return msgList; } - /** - * Callable by subclasses. Do not override.
+ + /** * Return the "Empty list" message as an object array so can be used to - * answer getChildren() - * + * answer getChildren(). + *

+ * Callable by subclasses. Do not override.
+ * * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} - * instead. + * instead. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected final Object[] getEmptyMessageObject() { @@ -2001,10 +2233,12 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } /** - * Callable by subclasses. Do not override.
- * Get the first selected object of the given selection + * Get the first selected object of the given selection. + *

+ * Callable by subclasses. Do not override.
* - * @noextend This method is not intended to be extended by clients. + * @nooverride This method is not intended to be re-implemented or extended + * by clients. */ protected Object getFirstSelection(IStructuredSelection selection) { @@ -2021,22 +2255,24 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return null; } - - /** + /* --------------------------------------------------- * these methods are for deferred fetch operations + * --------------------------------------------------- */ /* - * Return whether deferred queries are supported. By default - * they are not supported. Subclasses must override this to - * return true if they are to support this. + * (non-Javadoc) + * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#supportsDeferredQueries(org.eclipse.rse.core.subsystems.ISubSystem) */ public boolean supportsDeferredQueries(ISubSystem subSys) { return false; } - + /* + * (non-Javadoc) + * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor) + */ public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) { SystemFetchOperation operation = null; @@ -2062,7 +2298,6 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda } } - /** * Returns the SystemFetchOperation to be used in performing a query. Adapters should override * this to provide customizations where appropriate. @@ -2075,8 +2310,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return new SystemFetchOperation(null, o, this, collector); } - - /* (non-Javadoc) + /* (non-Javadoc) * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer() */ public boolean isContainer() @@ -2094,5 +2328,4 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda return new SystemSchedulingRule(location); } - } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java index f74f80c725f..27198f8160f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java @@ -7,10 +7,10 @@ * * 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: * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core @@ -36,6 +36,7 @@ import org.eclipse.rse.ui.SystemMenuManager; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionFilter; +import org.eclipse.ui.model.IWorkbenchAdapter; import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.IPropertySource; @@ -46,7 +47,7 @@ import org.eclipse.ui.views.properties.IPropertySource; * Any input into the system viewer must register an adapter that implements this interface. *

* This interface supports a union of all the methods needed to support a TreeViewer - * content provider and label provider. The {@link org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider} + * content provider and label provider. The {@link org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider} * delegates to objects of this interface almost completely. It gets such an * object by calling:

*

@@ -57,7 +58,7 @@ import org.eclipse.ui.views.properties.IPropertySource;
  * This interface also supports IPropertySource via inheritance, so we can feed the
  * PropertySheet.
  * 

- *

For remote resource objects, their adapter should also implement + *

For remote resource objects, their adapter should also implement * {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} *

* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter @@ -65,7 +66,7 @@ import org.eclipse.ui.views.properties.IPropertySource; public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragDropAdapter, IActionFilter { public static final IAction[] noActions = new IAction[0]; - + /** * Set the shell to be used by any method that requires it. * This is set by the Label and Content providers that retrieve this adapter. @@ -91,7 +92,7 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD */ public Shell getShell(); /** - * Return the current viewer, as set via setViewer or its deduced from the + * Return the current viewer, as set via setViewer or its deduced from the * setInput input object if set. May be null so test it. */ public Viewer getViewer(); @@ -100,22 +101,22 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD * May be used by an adapter to retrieve context-sensitive information. */ public ISystemViewInputProvider getInput(); - - + + /** * Get the subsystem that corresponds to this object if one exists. - * + * * @param element The element to be identified. May be of type * {@link IContextObject} (including the context of the element), * {@link String} (giving the absolute path of a remote object), * or the actual remote data element itself. */ - public ISubSystem getSubSystem(Object element); - + public ISubSystem getSubSystem(Object element); + /** * Wrapper to getPropertyValue(Object key) that takes an argument * for determining whether to return a raw value or formatted value. - * + * */ public Object getPropertyValue(Object key, boolean formatted); @@ -127,7 +128,7 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD */ public IPropertyDescriptor[] getUniquePropertyDescriptors(); - + /** * This is your opportunity to add actions to the popup menu for the given selection. *

@@ -144,24 +145,27 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD *

  • {@link org.eclipse.rse.ui.actions.SystemBaseDialogAction SystemBaseWizardAction}. For an action that presents a {@link org.eclipse.rse.ui.wizards.AbstractSystemWizard wizard}. *
  • {@link org.eclipse.rse.ui.actions.SystemBaseSubMenuAction SystemBaseSubMenuAction}. For an action that cascades into a submenu with other actions. * - * + * * @param menu the popup menu you can contribute to * @param selection the current selection in the calling tree or table view * @param parent the shell of the calling tree or table view - * @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,IAction) add} method. + * @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,IAction) add} method. */ public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell parent, String menuGroup); /** - * Returns an image descriptor for the image. More efficient than getting the image. + * Returns an image descriptor for the image. More efficient than getting + * the image. Implements {@link IWorkbenchAdapter#getImageDescriptor(Object) + * }. + * * @param element The element for which an image is desired */ public ImageDescriptor getImageDescriptor(Object element); /** - * Return the label for this object + * Return the label for this object. */ public String getText(Object element); /** - * Return the alternate label for this object + * Return the alternate label for this object. */ public String getAlternateText(Object element); /** @@ -169,75 +173,79 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD */ public String getName(Object element); /** - * Return a value for the type property for this object + * Return a value for the type property for this object. */ - public String getType(Object element); + public String getType(Object element); /** - * Return the string to display in the status line when the given object is selected + * Return the string to display in the status line when the given object is + * selected. */ public String getStatusLineText(Object element); - - + + /** * 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. - * + * * @param element the element to check * @return true if the element exists * @since 3.0 */ public boolean exists(Object element); - + /** - * Return the parent of this object + * Return the parent of this object. This is required by eclipse UI + * adapters, but we try desperately not to use in the RSE. So, you are + * probably safe returning null, but if you can return a parent, why not, go + * for it. */ public Object getParent(Object element); - - + + /** * Return the children of this model object. * * When {@link #supportsDeferredQueries(ISubSystem)} returns false, * this query will be called in the dispatch thread, so the implementation * needs to make sure that SWT thread exceptions are avoided. - * + * * @param element the model object to query * @param monitor the progress monitor * @return the children of element */ public Object[] getChildren(IAdaptable element, IProgressMonitor monitor); - + /** * Return the children of this object. - * + * * When a contextObject is passed in instead of an adaptable model * object, the adapter needs handle both the model object as well * as the associated filter. - * + * * When {@link #supportsDeferredQueries(ISubSystem)} returns false, * this query will be called in the dispatch thread, so the implementation * needs to make sure that SWT thread exceptions are avoided. - * + * * @param contextObject a wrapper object that contains the model object plus context information * @param monitor the progress monitor * @return the children of the model object in contextObject that matches the filter in contextObject */ public Object[] getChildren(IContextObject contextObject, IProgressMonitor monitor); - + /** * Return the children of this object, using the given Expand-To filter */ public Object[] getChildrenUsingExpandToFilter(Object element, String expandToFilter); - + /** - * Return true if this object has children. + * Return true if this object has children. *

    * In case this adapter returns true for {@link #supportsDeferredQueries(ISubSystem)}, * it is expected that the underlying subsystem caches the hasChildren() attribute - * such that it does not necessarily perform a server round trip. In this case, it - * has more the semantics of "can have children". In that case, + * such that it does not necessarily perform a server round trip. In this case, it + * has more the semantics of "can have children". In that case, * a deferred {@link #getChildren(IAdaptable, IProgressMonitor)} * call is still allowed to return an empty array indicating no children. *

    @@ -245,7 +253,7 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD * @return true if this element can have children. */ public boolean hasChildren(IAdaptable element); - + /** * Return true if this object has children. * @see #hasChildren(IAdaptable) @@ -253,15 +261,15 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD * @return true if this element can have children. */ public boolean hasChildren(IContextObject element); - + /** * Return true if this object is a "prompting" object that prompts the user when expanded. * For such objects, we do not try to save and restore their expansion state on F5 or between * sessions */ - public boolean isPromptable(Object element); - - + public boolean isPromptable(Object element); + + /** * Return true if this object is a "remote" object. A remote object is defined as an object * that is not part of the base RSE artifacts (hosts, subsystems, filters). This method is used @@ -272,20 +280,20 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD * @return true if the object is remote */ public boolean isRemote(Object element); - + /** * Set input object for property source queries. This is called by the * SystemViewAdaptorFactory before returning this adapter object. * Handled automatically if you start with AbstractSystemViewAdaptor. - */ - public void setPropertySourceInput(Object propertySourceInput); + */ + public void setPropertySourceInput(Object propertySourceInput); /** - * User has double clicked on an object. If you want to do something special, - * do it and return true. Otherwise return false to have the viewer do the default behaviour. + * User has double clicked on an object. If you want to do something special, + * do it and return true. Otherwise return false to have the viewer do the default behaviour. */ public boolean handleDoubleClick(Object element); - + // ------------------------------------------ // METHODS TO SUPPORT GLOBAL DELETE ACTION... // ------------------------------------------ @@ -315,7 +323,7 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD */ public boolean doDeleteBatch(Shell shell, List resourceSet, IProgressMonitor monitor) throws Exception; - + // ------------------------------------------ // METHODS TO SUPPORT COMMON RENAME ACTION... // ------------------------------------------ @@ -330,31 +338,31 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD */ public boolean canRename(Object element); /** - * Perform the rename on the given item. + * Perform the rename on the given item. * @since 3.0 */ public boolean doRename(Shell shell, Object element, String name, IProgressMonitor monitor) - throws Exception; - - - + throws Exception; + + + /** * Return a validator for verifying the new name is correct. - * If you return null, no error checking is done on the new name!! + * If you return null, no error checking is done on the new name!! * Suggest you use at least UniqueStringValidator or a subclass to ensure * new name is at least unique. */ - public ISystemValidator getNameValidator(Object element); + public ISystemValidator getNameValidator(Object element); /** * Form and return a new canonical (unique) name for this object, given a candidate for the new * name. This is called by the generic multi-rename dialog to test that all new names are unique. * 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. *

    - * 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. */ public String getCanonicalNewName(Object element, String newName); @@ -386,11 +394,11 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD * Return true if we should show the refresh action in the popup for the given element. */ public boolean showOpenViewActions(Object element); - + /** * Return true if we should show the generic show in table action in the popup for the given element. */ - public boolean showGenericShowInTableAction(Object element); + public boolean showGenericShowInTableAction(Object element); // ------------------------------------------------------------ // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER... @@ -412,15 +420,15 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD */ public String getMementoHandleKey(Object element); /** - * 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); public void selectionChanged(Object element); // d40615 - - public void setFilterString(String filterString); + + public void setFilterString(String filterString); public String getFilterString(); - + /** * Return whether deferred queries are supported. By default * they are not supported. Subclasses must override this to