JaroslavTulach commented on pull request #2471:
URL: https://github.com/apache/netbeans/pull/2471#issuecomment-712555405
The problem with the current approach is that the
```
task.addTaskListener((Task t) -> {
try {
OutputWriter out1 = task.getInputOutput().getOut();
boolean canReload =
project.getLookup().lookup(BeforeReloadActionHook.class).beforeReload(action,
outerCtx, task.result(), out1);
if (needReload && canReload) {
String[] reloadArgs =
RunUtils.evaluateActionArgs(project, mapping.getName(),
mapping.getReloadArgs(), outerCtx);
prj.reloadProject(true, maxQualily, reloadArgs);
}
project.getLookup().lookup(AfterBuildActionHook.class).afterAction(action,
outerCtx, task.result(), out1);
for (AfterBuildActionHook l :
context.lookupAll(AfterBuildActionHook.class)) {
l.afterAction(action, outerCtx, task.result(), out1);
}
} finally {
task.getInputOutput().getOut().close();
task.getInputOutput().getErr().close();
}
});
```
code is invoke too late!
I'd like the reload of the project to happen immediately after the build is
over. However the task listener is notified tens of seconds later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists