Search in sources :

Example 1 with NullErrorManager

use of net.vtst.ow.closure.compiler.util.NullErrorManager in project ow by vtst.

the class ClosureBuilder method compileJavaScriptFile.

/**
   * Compile a JavaScript file.
   */
private void compileJavaScriptFile(IFile file, CompilerOptions options, boolean fileIsOpen, boolean stripIncludedFiles, boolean doNotKeepCompilationResultsOfClosedFilesInMemory, boolean force) throws CoreException {
    OwJsDev.log("Compiling %s", file.getFullPath().toOSString());
    CompilableJSUnit unit = ResourceProperties.getJSUnit(file);
    if (unit == null)
        return;
    ErrorManager errorManager = new ErrorManagerForFileBuild(unit, file);
    boolean keepCompilationResultsInMemory = !doNotKeepCompilationResultsOfClosedFilesInMemory || fileIsOpen;
    boolean force2 = force || editorRegistry.isNewlyOpenedFile(file);
    CompilerRun run = unit.fullCompile(options, errorManager, keepCompilationResultsInMemory, stripIncludedFiles, force2);
    run.setErrorManager(new NullErrorManager());
}
Also used : ErrorManager(com.google.javascript.jscomp.ErrorManager) NullErrorManager(net.vtst.ow.closure.compiler.util.NullErrorManager) CompilerRun(net.vtst.ow.closure.compiler.compile.CompilerRun) CompilableJSUnit(net.vtst.ow.closure.compiler.compile.CompilableJSUnit) NullErrorManager(net.vtst.ow.closure.compiler.util.NullErrorManager)

Aggregations

ErrorManager (com.google.javascript.jscomp.ErrorManager)1 CompilableJSUnit (net.vtst.ow.closure.compiler.compile.CompilableJSUnit)1 CompilerRun (net.vtst.ow.closure.compiler.compile.CompilerRun)1 NullErrorManager (net.vtst.ow.closure.compiler.util.NullErrorManager)1