diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java index f6efed61787..6e8f6b8c977 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java @@ -14,7 +14,7 @@ * Martin Oberhuber (Wind River) - 141803: Fix cpu usage 100% while connecting * ********************************************************************************/ - + package org.eclipse.rse.core.subsystems; import java.lang.reflect.InvocationTargetException; import java.util.Vector; @@ -71,31 +71,35 @@ import org.eclipse.ui.progress.WorkbenchJob; *
internalResolveFilterString
methods to
- * populate the remote resources shown when the subsystem's filters are expanded.
+ * populate the remote resources shown when the subsystem's filters are expanded. It might also involve overriding the inherited
+ * internalRunCommand
method if this subsystem supports running commands remotely... although typically such subsystems
+ * extend {@link ShellServiceSubSystem}, not this class.
*
*
- * This is the base class that subsystem suppliers subclass.
+ * This is the base class that subsystem suppliers subclass, although this is usually done
+ * by subclassing the child class {@link org.eclipse.rse.core.servicesubsystem.impl.ServiceSubSystem DefaultSubSystemImpl}.
* Each instance of this class represents a subsystem instance for a particular connection.
*
- * When a {@link IHost} is created, this subsystem's factory will be asked to create an + * When a {@link org.eclipse.rse.model.SystemConnection SystemConnection} is created, this subsystem's factory will be asked to create an * instance of its subsystem. If desired, your GUI may also allow users to create additional * instances. *
* There are only a handleful of methods to implement in child classes (and indeed most of these * are supplied as empty, so you only override those you want to support). * These are required: - *
* @param filterString filter pattern for objects to return. - * @return the results of resolving the filter string. + * @param Shell parent shell used to show error message. Null means you will handle showing the error message. */ public Object[] resolveFilterString(String filterString) throws Exception @@ -2021,22 +2030,25 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS } } else - System.out.println("in SubSystemImpl.resolveFilterString: isConnected() returning false!"); //$NON-NLS-1$ + System.out.println("in SubSystemImpl.resolveFilterString: isConnected() returning false!"); return null; } /** * Resolve multiple absolute filter strings. This is only applicable if the subsystem * factory reports true for supportsFilters(). *
- * This is the same as {@link #resolveFilterString(String)} but takes an array of + * This is the same as {@link #resolveFilterString(String,Shell)} but takes an array of * filter strings versus a single filter string. *
- * The default implementation of this simply calls {@link #internalResolveFilterStrings(IProgressMonitor, String[])}. + * The default implementation of this simply calls {@link #resolveFilterString(String,Shell)} + * once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject + * is called on the concatenated result, given subclasses an opportunity to sort the result. *
* After successful resolve, the sort method is called to sort the concatenated results before * returning them. * * @param filterStrings array of filter patterns for objects to return. + * @param Shell parent shell used to show error message. Null means you will handle showing the error message. * @return Array of objects that are the result of resolving all the filter strings */ public Object[] resolveFilterStrings(String[] filterStrings) @@ -2046,7 +2058,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS boolean ok = true; if ((filterStrings == null) || (filterStrings.length == 0)) { - SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$ + SystemBasePlugin.logInfo("Filter strings are null"); return null; } @@ -2085,7 +2097,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS } } else - System.out.println("in SubSystemImpl.resolveFilterString: isConnected() returning false!"); //$NON-NLS-1$ + System.out.println("in SubSystemImpl.resolveFilterString: isConnected() returning false!"); return null; } @@ -2340,7 +2352,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS } } else - SystemBasePlugin.logDebugMessage(this.getClass().getName(), "in SubSystemImpl.resolveFilterString: isConnected() returning false!"); //$NON-NLS-1$ + SystemBasePlugin.logDebugMessage(this.getClass().getName(), "in SubSystemImpl.resolveFilterString: isConnected() returning false!"); return null; } @@ -2393,7 +2405,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS } } else - System.out.println("in SubSystemImpl.setProperty: isConnected() returning false!"); //$NON-NLS-1$ + System.out.println("in SubSystemImpl.setProperty: isConnected() returning false!"); return null; } @@ -2432,7 +2444,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS } } else - System.out.println("in SubSystemImpl.getProperty: isConnected() returning false!"); //$NON-NLS-1$ + System.out.println("in SubSystemImpl.getProperty: isConnected() returning false!"); return null; } @@ -2440,9 +2452,9 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS * Set multiple remote properties. Subsystems interpret as they wish. Eg, this might be to set * a number of remote environment variables. This is only applicable if the subsystem factory reports * true for supportsProperties(). - * @param subject identifies which object to get the properties of. - * @param keys the array of propertie keys to set. - * @param values the array of values to set. The value at a certain index corresponds to the property key at the same index. + * @param subject Identifies which object to get the properties of + * @param key Identifies property to set + * @param value Values to set properties to. One to one mapping to keys by index number * @return Object interpretable by subsystem. Might be a Boolean, or the might be new values for confirmation. */ public Object setProperties(Object subject, String[] keys, String[] values) @@ -2471,7 +2483,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS } } else - System.out.println("in SubSystemImpl.setProperties: isConnected() returning false!"); //$NON-NLS-1$ + System.out.println("in SubSystemImpl.setProperties: isConnected() returning false!"); return null; } @@ -2672,8 +2684,8 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS * a remote environment variable. This is only applicable if the subsystem factory reports * true for supportsProperties(). * @param subject Identifies which object to get the properties of - * @param keys the array of property keys. - * @return the values for the given property keys. + * @param key Identifies property to get value of + * @return Object The values of the requested keys. */ public String[] getProperties(Object subject, String[] keys) throws Exception @@ -2880,10 +2892,10 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS * Resolve multiple absolute filter strings. This is only applicable if the subsystem * factory reports true for supportsFilters(). *
- * This is the same as {@link #internalResolveFilterString(IProgressMonitor, Object, String)} but takes an array of + * This is the same as {@link #resolveFilterString(String,Shell)} but takes an array of * filter strings versus a single filter string. *
- * The default implementation of this simply calls {@link #internalResolveFilterString(IProgressMonitor, String)} + * The default implementation of this simply calls {@link #resolveFilterString(String,Shell)} * once for each filter string, and concatenates the result. The method sortResolvedFilterStringObject * is called on the concatenated result, given subclasses an opportunity to sort the result. *
@@ -2978,7 +2990,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS */ protected String getFirstParentFilterString(Object parent) { - return "*"; //$NON-NLS-1$ + return "*"; } @@ -3073,7 +3085,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS // for wizards and dialogs use the specified context that was placed in the registry IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { - SystemBasePlugin.logInfo("Got runnable context from system registry"); //$NON-NLS-1$ + SystemBasePlugin.logInfo("Got runnable context from system registry"); return irc; } else { // for other cases, use statusbar @@ -3081,7 +3093,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS if (win != null) { Shell winShell = getActiveWorkbenchShell(); if (winShell != null && !winShell.isDisposed() && winShell.isVisible()) { - SystemBasePlugin.logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$ + SystemBasePlugin.logInfo("Using active workbench window as runnable context"); shell = winShell; return win; //dwd } else {