Compiler task in background, compiler events listener


I have two problems and couldn't find answers in api documentation.

1. I run a CompileTask with the command:

When I run it I see the modal dialog with the "Background" button.
Is there any way to run it in background without showing this dialog first?

2. This compile task is executed each time the document is saved i.e.:
new FileDocumentManagerAdapter() {
            public void beforeDocumentSaving(Document document) {
                // running compile task

It is ok when saving is performed without following compilation. But if user
tries to perform compilation this event is triggered too (as at that moment the
document is saved) and my compilation task is performed just before native compilation.
I'm trying to find the way to change the order of these actions. I.e. I want to run my
task just after navite compilation was finished.

Does anybody know any way to adress these issues?

NOTE: my plugin should work under IDEA 6.0

Thank you

Please sign in to leave a comment.