1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-27 19:05:38 +02:00

[fix] system promptable object does not reveal associated system types

This commit is contained in:
Uwe Stieber 2007-02-06 14:39:08 +00:00
parent 3a0efdabdc
commit aee897c1dc
2 changed files with 35 additions and 12 deletions

View file

@ -81,6 +81,15 @@ public class SystemNewConnectionPromptObject
this.systemTypesSet = true; 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 * Set the parent object so that we can respond to getParent requests
*/ */

View file

@ -32,23 +32,36 @@ import org.eclipse.swt.widgets.Shell;
public interface ISystemPromptableObject extends IAdaptable public interface ISystemPromptableObject extends IAdaptable
{ {
/**
* 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) * Get the parent object (within tree view)
*/ */
public Object getParent(); public Object getParent();
/** /**
* Set the parent object so that we can respond to getParent requests * Set the parent object so that we can respond to getParent requests
*/ */
public void setParent(Object parent); public void setParent(Object parent);
/** /**
* 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.
* Calls getImage on the subsystem's owning factory. * Calls getImage on the subsystem's owning factory.
*/ */
public ImageDescriptor getImageDescriptor(); public ImageDescriptor getImageDescriptor();
/** /**
* Return the label for this object * Return the label for this object
*/ */
public String getText(); public String getText();
/** /**
* Return the type label for this object * Return the type label for this object
*/ */
@ -66,6 +79,7 @@ public interface ISystemPromptableObject extends IAdaptable
* call {@link #run(Shell)}. * call {@link #run(Shell)}.
*/ */
public ISystemPromptableObject[] getChildren(); public ISystemPromptableObject[] getChildren();
/** /**
* Return true if this is an expandable prompt * Return true if this is an expandable prompt
*/ */