public final class EnvManagerConfigWidget
extends Composite
Typically, clients will use this control as follows.
IRemoteConnection
that will provide access to the remote machine.
setErrorListener(IErrorListener)
in order to display error messages to the user.
configurationChanged(URI, IRemoteConnection, List)
or #setCheckbox(boolean)} to change the
appearance of the control.
isUseEMSChecked()
, isManualConfigChecked()
, getSelectedElements()
, and
getConnectionName()
to retrieve the contents of the control, or use saveConfiguration(IEnvManagerConfig)
to
persist all of its settings in a single operation.
Constructor and Description |
---|
EnvManagerConfigWidget(Composite parent,
int style)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
configurationChanged(URI uri,
IRemoteConnection remoteConnection,
List<String> selectedItems)
Re-populates this control to reflect a change in the project's remote location or a change in the selected items.
|
String |
getConnectionName() |
String |
getManualConfigText() |
List<String> |
getSelectedElements() |
boolean |
isManualConfigChecked() |
boolean |
isUseEMSChecked() |
void |
saveConfiguration(IEnvManagerConfig config)
Stores the current state of this
EnvManagerConfigWidget in the given configuration object. |
void |
setConnection(IRemoteConnection connection)
Set the remote connection to use when querying for the remote environment
|
void |
setErrorListener(IErrorListener listener)
Sets the (unique)
IErrorListener which will be used to display error messages to the user. |
void |
setManualConfigCheckbox(boolean checked)
Sets the state of the "Manually specify environment configuration commands" checkbox.
|
void |
setManualConfigText(String text)
Sets the contents of the text box which allows the user to enter a custom sequence of environment management commands.
|
void |
setUseEMSCheckbox(boolean checked)
Sets the state of the "Use an environment management system to customize the remote build environment" checkbox.
|
public EnvManagerConfigWidget(Composite parent, int style)
parent
- parent Composite
(non-null
)style
- the style of widget to constructpublic void setConnection(IRemoteConnection connection)
connection
- IRemoteConnection
used to access files and execute shell commands on the remote machine (non-
null
)public void setErrorListener(IErrorListener listener)
IErrorListener
which will be used to display error messages to the user.listener
- IErrorListener
used to display error messages to the user, or null
public void configurationChanged(URI uri, IRemoteConnection remoteConnection, List<String> selectedItems)
If the given URI is null
, or if it differs from the URI supplied in the previous call to
configurationChanged(URI, IRemoteConnection, List)
, then the elements in the checklist are re-loaded from the remote
machine (using IEnvManager.determineAvailableElements(IProgressMonitor)
). Otherwise, the items present in the
checklist remain the same, but the checked/unchecked state of the items may be changed.
uri
- a URI representing the remote location of this project (possibly null
)remoteConnection
- IRemoteConnection
providing access to the remote machine (non-null
)selectedItems
- the items which should be selected in the checklist (non-null
)public boolean isUseEMSChecked()
setUseEMSCheckbox(boolean)
public boolean isManualConfigChecked()
public String getManualConfigText()
null
.public void setManualConfigText(String text)
text
- non-null
.public List<String> getSelectedElements()
null
.
It is, in theory, a subset of the strings returned by
IEnvManager#determineAvailableElements(org.eclipse.core.runtime.IProgressMonitor)
.public void setUseEMSCheckbox(boolean checked)
checked
- true iff the "Use an environment management system to customize the remote build environment" checkbox
should be checkedisUseEMSChecked()
public void setManualConfigCheckbox(boolean checked)
checked
- true iff the "Manually specify environment configuration commands" checkbox should be checkedisManualConfigChecked()
public String getConnectionName()
null
). The remote environment is determined by the
IRemoteConnection
provided to the constructor or configurationChanged(URI, IRemoteConnection, List)
,
whichever was
invoked most recently.public void saveConfiguration(IEnvManagerConfig config)
EnvManagerConfigWidget
in the given configuration object.config
- non-null
Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.