use of com.intellij.compiler.ant.taskdefs.Path in project intellij-community by JetBrains.
the class LibraryDefinitionsGeneratorFactory method create.
/**
* Create a generator for the specified libary type. It generates a list of library definitions.
*
* @param libraryTable a library table to examine
* @param baseDir base directory for ant build script
* @param comment a comment to use for the library
* @return the created generator or null if there is a nothing to generate
*/
@Nullable
public Generator create(LibraryTable libraryTable, File baseDir, final String comment) {
final Library[] libraries = libraryTable.getLibraries();
if (libraries.length == 0) {
return null;
}
final CompositeGenerator gen = new CompositeGenerator();
gen.add(new Comment(comment), 1);
// sort libraries to ensure stable order of them.
TreeMap<String, Library> sortedLibs = new TreeMap<>();
for (final Library library : libraries) {
final String libraryName = library.getName();
if (!myUsedLibraries.contains(libraryName)) {
continue;
}
sortedLibs.put(BuildProperties.getLibraryPathId(libraryName), library);
}
for (final Library library : sortedLibs.values()) {
final String libraryName = library.getName();
final Path libraryPath = new Path(BuildProperties.getLibraryPathId(libraryName));
genLibraryContent(myProject, myGenOptions, library, baseDir, libraryPath);
gen.add(libraryPath, 1);
}
return gen.getGeneratorCount() > 0 ? gen : null;
}
use of com.intellij.compiler.ant.taskdefs.Path in project intellij-community by JetBrains.
the class ChunkBuild method createBootclasspath.
private static Generator createBootclasspath(ModuleChunk chunk) {
final Path bootclasspath = new Path(BuildProperties.getBootClasspathProperty(chunk.getName()));
bootclasspath.add(new Comment(CompilerBundle.message("generated.ant.build.bootclasspath.comment")));
return bootclasspath;
}