Autobuild is triggered when shutting down an Eclipse application [message #1773908] |
Fri, 06 October 2017 11:57 |
Minh Quang Tran Messages: 19 Registered: September 2017 |
Junior Member |
|
|
Hi everyone,
This question is related to Eclipse infrastructure and not particularly related to JDT. I don't know where else I can post.
in method AutoBuildJob#run
@Override
public IStatus run(IProgressMonitor monitor) {
//synchronized in case build starts during checkCancel
synchronized (this) {
if (monitor.isCanceled()) {
return canceled();
}
}
//if the system is shutting down, don't build
if (systemBundle.getState() == Bundle.STOPPING)
return Status.OK_STATUS;
try {
doBuild(monitor);
lastBuild = System.currentTimeMillis();
//if the build was successful then it should not be recorded as interrupted
setInterrupted(false);
return Status.OK_STATUS;
} catch (OperationCanceledException e) {
return canceled();
} catch (CoreException sig) {
return sig.getStatus();
}
}
It is checked if the Eclipse application is shutting down, the build is aborted. HOWEVER, I have been able to reproduce the behavior that though the system is shutting down, the OSGI's state is not set to STOPPING at the time the check is executed
if (systemBundle.getState() == Bundle.STOPPING) // Sometimes FALSE here even when application is shutting down!
Has anyone experienced something similar?
[Updated on: Fri, 06 October 2017 13:08] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03632 seconds