diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java index dce8cecdc69..d3fac4ff35f 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java @@ -81,7 +81,16 @@ public class SystemNewConnectionPromptObject this.systemTypesSet = true; } - /** + /* (non-Javadoc) + * @see org.eclipse.rse.model.ISystemPromptableObject#getSystemTypes() + */ + public String[] getSystemTypes() { + String[] types = systemTypes; + if (types == null || !systemTypesSet) types = new String[0]; + return types; + } + + /** * Set the parent object so that we can respond to getParent requests */ public void setParent(Object parent) diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java index 0ea5aca9096..e32b3c972a8 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemPromptableObject.java @@ -32,40 +32,54 @@ import org.eclipse.swt.widgets.Shell; public interface ISystemPromptableObject extends IAdaptable { - /** - * Get the parent object (within tree view) - */ - public Object getParent(); - /** - * Set the parent object so that we can respond to getParent requests - */ - public void setParent(Object parent); + /** + * Returns the list of system types this promptable object + * is associated with. This is important to implement label + * and icon decorators for promptable objects. + * + * @return The list of associated system types or an empty list. + */ + public String[] getSystemTypes(); + + /** + * Get the parent object (within tree view) + */ + public Object getParent(); + + /** + * Set the parent object so that we can respond to getParent requests + */ + public void setParent(Object parent); + /** * Returns an image descriptor for the image. More efficient than getting the image. * Calls getImage on the subsystem's owning factory. */ public ImageDescriptor getImageDescriptor(); + /** * Return the label for this object */ public String getText(); + /** * Return the type label for this object */ public String getType(); - + /** * Run this prompt. This should return an appropriate ISystemMessageObject to show * as the child, reflecting if it ran successfully, was cancelled or failed. */ - public Object[] run(Shell shell); - + public Object[] run(Shell shell); + /** * Return the child promptable objects. * If this returns null, then SystemViewPromptableAdapter will subsequently * call {@link #run(Shell)}. */ public ISystemPromptableObject[] getChildren(); + /** * Return true if this is an expandable prompt */