Search in sources :

Example 1 with JSExtern

use of net.vtst.ow.closure.compiler.deps.JSExtern in project ow by vtst.

the class ClosureCompilerLaunchConfigurationDelegate method getExterns.

private List<SourceFile> getExterns(AbstractCompiler compiler, IProgressMonitor monitor, IReadOnlyStore store) throws CoreException {
    List<JSExtern> externs = includesProvider.getExterns(compiler, monitor, store);
    List<SourceFile> sourceFiles = new ArrayList<SourceFile>(externs.size());
    for (JSExtern extern : externs) sourceFiles.add(extern.getSourceFile());
    return sourceFiles;
}
Also used : JSExtern(net.vtst.ow.closure.compiler.deps.JSExtern) ArrayList(java.util.ArrayList) SourceFile(com.google.javascript.jscomp.SourceFile)

Example 2 with JSExtern

use of net.vtst.ow.closure.compiler.deps.JSExtern in project ow by vtst.

the class JSIncludesProviderForBuilder method getExtern.

/* (non-Javadoc)
   * @see net.vtst.ow.eclipse.js.closure.compiler.IJSIncludesProvider#getExtern(com.google.javascript.jscomp.AbstractCompiler, java.io.File)
   */
public JSExtern getExtern(AbstractCompiler compiler, File path) {
    JSExtern extern = externs.get(path);
    if (extern == null) {
        extern = new JSExtern(path);
        externs.put(path, extern);
    }
    return extern;
}
Also used : JSExtern(net.vtst.ow.closure.compiler.deps.JSExtern)

Example 3 with JSExtern

use of net.vtst.ow.closure.compiler.deps.JSExtern in project ow by vtst.

the class AbstractJSIncludesProvider method getExterns.

public List<JSExtern> getExterns(AbstractCompiler compiler, IProgressMonitor monitor, ArrayList<IProject> projects) throws CoreException {
    List<JSExtern> result = new ArrayList<JSExtern>();
    Set<File> keys = new HashSet<File>();
    for (int i = projects.size() - 1; i >= 0; --i) {
        addExterns(compiler, monitor, new ResourcePropertyStore(projects.get(i), OwJsClosurePlugin.PLUGIN_ID), keys, result);
    }
    return result;
}
Also used : JSExtern(net.vtst.ow.closure.compiler.deps.JSExtern) ResourcePropertyStore(net.vtst.eclipse.easy.ui.properties.stores.ResourcePropertyStore) ArrayList(java.util.ArrayList) File(java.io.File) HashSet(java.util.HashSet)

Example 4 with JSExtern

use of net.vtst.ow.closure.compiler.deps.JSExtern in project ow by vtst.

the class DefaultExternsProvider method loadExterns.

/**
   * @return The default externs, as a list of AST factories.
   * @throws IOException
   */
private static List<JSExtern> loadExterns() throws IOException {
    List<SourceFile> sourceFiles = getAsSourceFiles();
    ArrayList<JSExtern> externs = new ArrayList<JSExtern>(sourceFiles.size());
    for (SourceFile sourceFile : sourceFiles) externs.add(new JSExtern(sourceFile));
    return externs;
}
Also used : JSExtern(net.vtst.ow.closure.compiler.deps.JSExtern) ArrayList(java.util.ArrayList) SourceFile(com.google.javascript.jscomp.SourceFile)

Aggregations

JSExtern (net.vtst.ow.closure.compiler.deps.JSExtern)4 ArrayList (java.util.ArrayList)3 SourceFile (com.google.javascript.jscomp.SourceFile)2 File (java.io.File)1 HashSet (java.util.HashSet)1 ResourcePropertyStore (net.vtst.eclipse.easy.ui.properties.stores.ResourcePropertyStore)1