public abstract class ScriptedCommand extends Object implements IOperationListener
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Modifier and Type | Field and Description |
---|---|
protected boolean |
verifyOnly |
Constructor and Description |
---|
ScriptedCommand()
Constructor
|
ScriptedCommand(String verifyOnly)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
afterExecute(IOperation operation,
Object data)
May be called after an operation finishes executing.
|
void |
applyChangesNow()
Applies the changes made to the current configuration.
|
boolean |
beforeExecute(IOperation operation,
Object data)
May be called before an operation starts executing.
|
IInstallConfiguration |
getConfiguration() |
protected boolean |
isVerifyOnly() |
boolean |
run()
Convenience method that executes the command with a null progress monitor.
|
abstract boolean |
run(IProgressMonitor monitor)
Executes the command.
|
public ScriptedCommand()
public ScriptedCommand(String verifyOnly)
verifyOnly
- if true, the command is not executed, but will only attempt to run the command.
This is mostly used when wanted to know if the command would fail.protected final boolean isVerifyOnly()
public final boolean run()
public abstract boolean run(IProgressMonitor monitor)
monitor
- progress monitor during command execution.public void applyChangesNow()
public boolean afterExecute(IOperation operation, Object data)
IOperationListener
afterExecute
in interface IOperationListener
operation
- operation to listen todata
- info specific to the operationpublic boolean beforeExecute(IOperation operation, Object data)
IOperationListener
beforeExecute
in interface IOperationListener
operation
- operation to listen todata
- info specific to the operationpublic final IInstallConfiguration getConfiguration()
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.