public interface EvaluationManager
Here is a typical use of the evaluation manager:
loadLaunchConfiguration(File)
,evaluate(LaunchConfiguration, ProgressMonitor)
.If a specific project has to be evaluated more than one time in different configurations, or if the templates to be evaluated can be selected dynamically, you can have a finer control on the evaluation process. Here are the steps:
loadProject(File)
,Evaluable
subclass, which describes what is to be evaluated,evaluate(Project, Evaluable, ProgressMonitor)
.An evaluation process produces an evaluation result, which contains:
This interface is not intended to be implemented by clients.
MDWorkbench.getEvaluationManager()
Modifier and Type | Method and Description |
---|---|
EvaluationResult |
evaluate(LaunchConfiguration configuration,
ProgressMonitor monitor)
Launches an evaluation based on the specified launch configuration.
|
EvaluationResult |
evaluate(LaunchConfiguration configuration,
ProgressMonitor monitor,
Map<String,?> options)
Launches an evaluation based on the specified launch configuration and options.
|
EvaluationResult |
evaluate(Project project,
Evaluable evaluable,
ProgressMonitor monitor)
Launches an evaluation based on the specified project.
|
EvaluationResult |
evaluate(Project project,
Evaluable evaluable,
ProgressMonitor monitor,
Map<String,?> options)
Launches an evaluation based on the specified project and options.
|
ContentWriter |
getContentWriter()
Returns the registered content writer, used to write on disk a text template output.
|
DebugHierarchy |
loadDebugHierarchy(File file)
Loads the specified debug hierarchy.
|
LaunchConfiguration |
loadLaunchConfiguration(File file)
Loads the specified launch configuration.
|
Project |
loadProject(File file)
Loads the specified project.
|
Report |
loadReport(File file)
Loads the specified evaluation report.
|
void |
setContentWriter(ContentWriter writer)
Registers a content writer, used to write on disk a text template output.
|
Project loadProject(File file) throws CoreException
file
- the file containing a project definition.CoreException
- if the file could not be read or if the project contains errors.Report loadReport(File file) throws CoreException
file
- the file containing a report definition.CoreException
- if the file could not be read.LaunchConfiguration loadLaunchConfiguration(File file) throws CoreException
file
- the file containing a launch configuration.CoreException
- if the file could not be read.DebugHierarchy loadDebugHierarchy(File file) throws CoreException
file
- the file containing a debug hierarchy.CoreException
- if the file could not be read.EvaluationResult evaluate(LaunchConfiguration configuration, ProgressMonitor monitor) throws CoreException
This is a long running operation that can be monitored through the monitor
parameter. A progress monitor may be used to report
progress information and to interrupt the evaluation process.
configuration
- the configuration which describes the launch parameters.monitor
- the progress monitor used to report progress information and check for cancelation, maybe null
.CoreException
- if the evaluation fails.EvaluationResult evaluate(LaunchConfiguration configuration, ProgressMonitor monitor, Map<String,?> options) throws CoreException
This is a long running operation that can be monitored through the monitor
parameter. A progress monitor may be used to report
progress information and to interrupt the evaluation process.
The options parameter enables to provide settings to the underlying evaluation:
EvaluationContext.getProperty(name)
.Logger
instance can be set using a "com.sodius.mdw.core.util.log.Logger"
key. If absent, the logger used for
evaluation will be retrieved using MDWorkbench.getConfiguration().getLogger()
configuration
- the configuration which describes the launch parameters.monitor
- the progress monitor used to report progress information and check for cancelation, may be null
.options
- properties to configure the evaluation process (can be null
).CoreException
- if the evaluation fails.EvaluationResult evaluate(Project project, Evaluable evaluable, ProgressMonitor monitor) throws CoreException
Evaluable
implementation has the full control on what is to be evaluated.
This is a long running operation that can be monitored through the monitor
parameter. A progress monitor may be used to report
progress information and to interrupt the evaluation process.
project
- the project which describes the available templates and scripts.evaluable
- the object whose evaluate
method is called.monitor
- the progress monitor used to report progress information and check for cancelation, maybe null
.CoreException
- if the evaluation fails.EvaluationResult evaluate(Project project, Evaluable evaluable, ProgressMonitor monitor, Map<String,?> options) throws CoreException
Evaluable
implementation has the full control on what is to be evaluated.
This is a long running operation that can be monitored through the monitor
parameter. A progress monitor may be used to report
progress information and to interrupt the evaluation process.
The options parameter enables to provide settings to the underlying evaluation:
EvaluationContext.getProperty(name)
.Logger
instance can be set using a "com.sodius.mdw.core.util.log.Logger"
key. If absent, the logger used for
evaluation will be retrieved using MDWorkbench.getConfiguration().getLogger()
project
- the project which describes the available templates and scripts.evaluable
- the object whose evaluate
method is called.monitor
- the progress monitor used to report progress information and check for cancelation, may be null
.options
- properties to configure the evaluation process (can be null
).CoreException
- if the evaluation fails.ContentWriter getContentWriter()
void setContentWriter(ContentWriter writer)
writer
- the new content writer to use.