This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I'm working on fixing an issue raised on the PHP Unit Watcher plugin which runs the relevant test file OnSave. The plugin runs the test via the EventQueue.invokeLater: EventQueue.invokeLater(new Runnable() { @Override public void run() { Lookup lookup = Lookups.singleton(fileObject); if (Arrays.asList(actionProvider.getSupportedActions()).contains(ActionProvider.COMMAND_TEST_SINGLE) && actionProvider.isActionEnabled(ActionProvider.COMMAND_TEST_SINGLE, lookup)) { actionProvider.invokeAction(ActionProvider.COMMAND_TEST_SINGLE, lookup); } } }); However if upload on save is enabled the message: "Copy support is still running, do you really want to continue?" Blocks the running of the PHPUnit test. Any ideas on how we can get round this issue? Kind regards, Kev
Well, currently there is no way (for external plugins) to detect whether CopySupport is running or not. Perhaps the best way could be to delay your code a bit (500 ms?). You can have a look at the RequestProcesor.Task.schedule() method which could help in this case (BTW this would have a nice benefit that if more files are quickly edited in a row, only one test run would be run). Thanks.
Thanks Tomas, I tried this with a 1000 delay and when saving the same file in quick succession i actually got more than one copy support messages. I'll put RP back in and do some more testing.
I could help with that, let me know if needed. Just add here your Github repo, I would create a PR. Thanks.
RP.Task.schedule(1000) does help a lot. I'll update to use it for now, thanks for the help. I've spent a good few hours looking for different ways to get round this and RP seemed to be the "best" way for now.
I'll mark this as resolved for now. Cheers!