Search in sources :

Example 6 with CompileTask

use of com.intellij.openapi.compiler.CompileTask in project intellij-community by JetBrains.

the class GradleCompilingTestCase method setUpInWriteAction.

@Override
protected void setUpInWriteAction() throws Exception {
    super.setUpInWriteAction();
    final GradleResourceCompilerConfigurationGenerator buildConfigurationGenerator = new GradleResourceCompilerConfigurationGenerator(myProject);
    CompilerManager.getInstance(myProject).addBeforeTask(new CompileTask() {

        @Override
        public boolean execute(CompileContext context) {
            AccessToken token = ReadAction.start();
            try {
                buildConfigurationGenerator.generateBuildConfiguration(context);
            } finally {
                token.finish();
            }
            return true;
        }
    });
}
Also used : GradleResourceCompilerConfigurationGenerator(org.jetbrains.plugins.gradle.config.GradleResourceCompilerConfigurationGenerator) CompileTask(com.intellij.openapi.compiler.CompileTask) AccessToken(com.intellij.openapi.application.AccessToken) CompileContext(com.intellij.openapi.compiler.CompileContext)

Aggregations

CompileContext (com.intellij.openapi.compiler.CompileContext)6 CompileTask (com.intellij.openapi.compiler.CompileTask)6 AccessToken (com.intellij.openapi.application.AccessToken)3 CompilerManager (com.intellij.openapi.compiler.CompilerManager)3 GradleResourceCompilerConfigurationGenerator (org.jetbrains.plugins.gradle.config.GradleResourceCompilerConfigurationGenerator)2 StartupManagerEx (com.intellij.ide.startup.StartupManagerEx)1 RegistryValue (com.intellij.openapi.util.registry.RegistryValue)1 RegistryValueListener (com.intellij.openapi.util.registry.RegistryValueListener)1