public class DevelServerLaunchConfigurationTab extends AbstractLaunchConfigurationTab implements IValidationMessage
Launch configurations are presented in a dialog, with a tab folder. Each tab manipulates one ore more attributes of a launch configuration.
A tab has the following lifecycle methods:
setLaunchConfigurationDialog(ILaunchConfigurationDialog)
- this is the first method called on a tab after it is instantiated.
initializeFrom(ILaunchConfiguration)
- called when a launch configuration is selected to be displayed.
activated(ILaunchConfigurationWorkingCopy)
- called when a tab is entered.
deactivated(ILaunchConfigurationWorkingCopy)
- called when a tab is exited.
performApply(ILaunchConfigurationWorkingCopy)
- called when a tab is to write its values to a launch configuration.
dispose()
- the last method called on a tab, when it is to perform any required cleanup.
Note that a tab can be disposed before its control has been created.
Modifier and Type | Method and Description |
---|---|
void |
createControl(Composite parent)
Creates the top level control for this launch configuration
tab under the given parent composite.
|
void |
dispose()
Disposes of the instance.
|
static File |
getDefaultServerDirectory()
Gets the default location of the iiziServer.
|
Image |
getImage()
Returns the image for this tab, or
null if none |
String |
getName()
Returns the name of this tab.
|
void |
initializeFrom(ILaunchConfiguration configuration)
Initializes this tab's controls with values from the given launch configuration.
|
static boolean |
isConfigurationValid(ILaunchConfiguration launchConfig)
Returns whether this tab is in a valid state in the context of the specified launch configuration.
|
protected boolean |
isDirty()
Verifies for dirty.
|
boolean |
isValid(ILaunchConfiguration launchConfig)
Returns whether this tab is in a valid state in the context of the specified launch configuration.
|
void |
onValidate(boolean isValid)
Call to inform validity of all validators.
|
void |
performApply(ILaunchConfigurationWorkingCopy configuration)
Copies values from this tab into the given launch configuration.
|
void |
setDefaults(ILaunchConfigurationWorkingCopy configuration)
Initializes the given launch configuration with default values for this tab.
|
void |
setMessage(String newMessage,
int newType)
Set the message for this page with an indication of what type of message it is.
|
activated, canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, deactivated, getAttributeLabel, getAttributesLabelsForPrototype, getControl, getErrorMessage, getHelpContextId, getId, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, getWarningMessage, initializeAttributes, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setHelpContextId, setLaunchConfigurationDialog, setMessage, setWarningMessage, updateLaunchConfigurationDialog
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
OkToLeaveTab, postApply
public static File getDefaultServerDirectory() throws IOException
IOException
- For I/O errors.public void dispose()
dispose
in interface ILaunchConfigurationTab
dispose
in class AbstractLaunchConfigurationTab
public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
This method may be called before this tab's control is created.
setDefaults
in interface ILaunchConfigurationTab
configuration
- The launch configuration.public void createControl(Composite parent)
setLaunchConfigurationDialog
is called.createControl
in interface ILaunchConfigurationTab
parent
- The parent composite.public void initializeFrom(ILaunchConfiguration configuration)
initializeFrom
in interface ILaunchConfigurationTab
configuration
- Launch configuration.public void performApply(ILaunchConfigurationWorkingCopy configuration)
performApply
in interface ILaunchConfigurationTab
configuration
- Launch configuration.public boolean isValid(ILaunchConfiguration launchConfig)
This information is typically used by the launch configuration dialog to decide when it is okay to launch.
isValid
in interface ILaunchConfigurationTab
isValid
in class AbstractLaunchConfigurationTab
launchConfig
- Launch configuration which provides context for validating this tab.
This value must not be null
.public String getName()
getName
in interface ILaunchConfigurationTab
public Image getImage()
null
if nonegetImage
in interface ILaunchConfigurationTab
getImage
in class AbstractLaunchConfigurationTab
public void setMessage(String newMessage, int newType)
The valid message types are one of IMessageProvider.NONE
,
IMessageProvider.INFORMATION
, IMessageProvider.WARNING
, or
IMessageProvider.ERROR
.
Note that for backward compatibility, a message of type
ERROR
is different than an error message (set using
setErrorMessage
). An error message overrides the current
message until the error message is cleared. This method replaces the
current message and does not affect the error message.
setMessage
in interface IValidationMessage
newMessage
- The message, or null
to clear the message.newType
- The message type.public void onValidate(boolean isValid)
onValidate
in interface IValidationMessage
isValid
- true if valid, false otherwise.protected boolean isDirty()
isDirty
in class AbstractLaunchConfigurationTab
public static boolean isConfigurationValid(ILaunchConfiguration launchConfig)
This information is typically used by the launch configuration dialog to decide when it is okay to launch.
launchConfig
- Launch configuration which provides context for validating this tab.
This value must not be null
.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.