org.eclipse.cdt.internal.ui.preferences
Class PathEntryVariablesGroup

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.preferences.PathEntryVariablesGroup

public class PathEntryVariablesGroup
extends java.lang.Object


Nested Class Summary
static class PathEntryVariablesGroup.PathEntryVariableElement
          Simple data structure that holds a path variable name/value pair.
 
Constructor Summary
PathEntryVariablesGroup(boolean multiSelect, int variableType)
          Creates a new PathVariablesGroup.
PathEntryVariablesGroup(boolean multiSelect, int variableType, org.eclipse.swt.widgets.Listener selectionListener)
          Creates a new PathVariablesGroup.
 
Method Summary
 org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
          Creates the widget group.
 void dispose()
          Disposes the group's resources.
 boolean getEnabled()
          Returns the enabled state of the group's widgets.
 PathEntryVariablesGroup.PathEntryVariableElement[] getSelection()
          Returns the selected variables.
 boolean performOk()
          Commits the temporary state to the path variable manager in response to user confirmation.
 void setEnabled(boolean enabled)
          Sets the enabled state of the group's widgets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEntryVariablesGroup

public PathEntryVariablesGroup(boolean multiSelect,
                               int variableType)
Creates a new PathVariablesGroup.

Parameters:
multiSelect - create a multi select tree
variableType - the type of variables that are displayed in the widget group. IResource.FILE and/or IResource.FOLDER logically ORed together.

PathEntryVariablesGroup

public PathEntryVariablesGroup(boolean multiSelect,
                               int variableType,
                               org.eclipse.swt.widgets.Listener selectionListener)
Creates a new PathVariablesGroup.

Parameters:
multiSelect - create a multi select tree
variableType - the type of variables that are displayed in the widget group. IResource.FILE and/or IResource.FOLDER logically ORed together.
selectionListener - listener notified when the selection changes in the variables list.
Method Detail

createContents

public org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
Creates the widget group. Callers must call dispose when the group is no longer needed.

Parameters:
parent - the widget parent
Returns:
container of the widgets

dispose

public void dispose()
Disposes the group's resources.


getEnabled

public boolean getEnabled()
Returns the enabled state of the group's widgets. Returns true if called prior to calling createContents.

Returns:
boolean the enabled state of the group's widgets. true if called prior to calling createContents.

getSelection

public PathEntryVariablesGroup.PathEntryVariableElement[] getSelection()
Returns the selected variables.

Returns:
the selected variables. Returns an empty array if the widget group has not been created yet by calling createContents

performOk

public boolean performOk()
Commits the temporary state to the path variable manager in response to user confirmation.

See Also:
IPathEntryVariableManager.setValue(String, IPath)

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled state of the group's widgets. Does nothing if called prior to calling createContents.

Parameters:
enabled - the new enabled state of the group's widgets