use of jetbrains.antlayout.util.LayoutFileSet in project intellij-community by JetBrains.
the class RenamedFileContainer method build.
@Override
public List<LayoutFileSet> build(TempFileFactory temp) {
final LayoutFileSet fileSet = new LayoutFileSet();
final File destFile = temp.allocateTempFile(newName);
copyTask.setProject(getProject());
copyTask.setFile(new File(filePath.replace('/', File.separatorChar)));
copyTask.setTofile(destFile);
copyTask.perform();
fileSet.setFile(destFile);
return Collections.singletonList(fileSet);
}
use of jetbrains.antlayout.util.LayoutFileSet in project intellij-community by JetBrains.
the class RootContainer method copySet.
private void copySet(LayoutFileSet set) {
Copy task = new Copy();
task.setTaskName("copy");
task.setProject(getProject());
String prefix = set.getPrefix(getProject());
File target = prefix.length() > 0 ? new File(destDirectory, prefix + "/") : destDirectory;
target.mkdirs();
task.setTodir(target);
LayoutFileSet unprefixed = (LayoutFileSet) set.clone();
unprefixed.setPrefix("");
task.addFileset(unprefixed);
task.perform();
}
use of jetbrains.antlayout.util.LayoutFileSet in project intellij-community by JetBrains.
the class ZipContainer method build.
public List<LayoutFileSet> build(TempFileFactory temp) {
List<LayoutFileSet> built = super.build(temp);
File dest = temp.allocateTempFile(name);
task.setProject(getProject());
task.setDestFile(dest);
for (LayoutFileSet set : built) {
task.addZipfileset(set);
}
LayoutFileSet result = new LayoutFileSet();
result.setFile(dest);
task.perform();
return Arrays.asList(result);
}
use of jetbrains.antlayout.util.LayoutFileSet in project intellij-community by JetBrains.
the class Container method build.
public List<LayoutFileSet> build(TempFileFactory temp) {
Set<LayoutFileSet> result = new LinkedHashSet<LayoutFileSet>();
for (Content child : children) {
for (LayoutFileSet set : child.build(temp)) {
result.add(createCopy(set));
}
}
ArrayList<LayoutFileSet> list = new ArrayList<LayoutFileSet>(result);
for (LayoutFileSet set : list) {
if (includes != null) {
set.setIncludes(includes);
}
if (excludes != null) {
set.setExcludes(excludes);
}
}
return list;
}
use of jetbrains.antlayout.util.LayoutFileSet in project intellij-community by JetBrains.
the class DirContainer method build.
public List<LayoutFileSet> build(TempFileFactory temp) {
List<LayoutFileSet> unprefixed = super.build(temp);
List<LayoutFileSet> prefixed = new ArrayList<LayoutFileSet>();
for (LayoutFileSet set : unprefixed) {
LayoutFileSet copy = createCopy(set);
copy.setPrefix(dirName + "/" + set.getPrefix(getProject()));
prefixed.add(copy);
}
return prefixed;
}
Aggregations