public final class EnvManagerConfigWidget
extends org.eclipse.swt.widgets.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(org.eclipse.swt.widgets.Composite parent,
int style)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configurationChanged(java.net.URI uri,
IRemoteConnection remoteConnection,
java.util.List<java.lang.String> selectedItems)
Re-populates this control to reflect a change in the project's remote location or a change in the selected items.
|
java.lang.String |
getConnectionName() |
java.lang.String |
getManualConfigText() |
java.util.List<java.lang.String> |
getSelectedElements()
Get the text of the elements which are checked in the checklist.
|
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(java.lang.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.
|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabListcomputeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBaraddControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateaddDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toStringpublic EnvManagerConfigWidget(org.eclipse.swt.widgets.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 nullpublic void configurationChanged(java.net.URI uri,
IRemoteConnection remoteConnection,
java.util.List<java.lang.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 java.lang.String getManualConfigText()
null.public void setManualConfigText(java.lang.String text)
text - non-null.public java.util.List<java.lang.String> getSelectedElements()
null.
It is, in theory, a subset of the strings returned by IEnvManager.determineAvailableElements(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 java.lang.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-nullCopyright (c) 2011 IBM Corporation and others. All Rights Reserved.