TestExecutionProcess calss and calling of postRun method [message #122973] |
Mon, 11 February 2008 14:45 |
Eclipse User |
|
|
|
Originally posted by: josef.sevcik.tietoenator.com
Hi all,
I am using extension org.eclipse.hyades.test.core.launchconfigRunHandler
in our plugin project. My implementation of interface IRunHandler2 does
work properly only for preRun() and postLaunch() methods. But method
postRun() is not called. So I tried to debug where the problem is. I have
got to the Class
org.eclipse.hyades.test.core.internal.launch.processes.TestE xecutionProcess
and its constructor. There is a part of code:
synchronized (executor) {
if (executor.getState() == IExecutionComponent.DEAD) {
onTerminate();
} else {
this.executor.addExecutionComponentStateChangeListener(new
IExecutionComponentStateChangeListener() {
public void stateChanged(ExecutionComponentStateChangeEvent
newState) {
onTerminate();
}
});
}
}
postRun method shall be called in onTerminate() method if some conditions
are satisfied.
If I place brakepoint to line :
synchronized (executor) {
and debug the method step by step everything works fine.
So I placed breakpoint to line:
this.executor.addExecutionComponentStateChangeListener(new
IExecutionComponentStateChangeListener() {
and if I do chech the state of following condition -> if
(executor.getState() == IExecutionComponent.DEAD)
it is true.
My understanding of this behavior is that in time of evaluation of
condition executor.getState() is different from IExecutionComponent.DEAD
but in time when listener is added in else branch. State of executor is
already changed and that is why listener method stateChanged is never
called.
Do any have some experiences with this issue? Is it bug or do I something
wrong?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03802 seconds