Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Evgeny Gryaznov
authored and
Evgeny Gryaznov
committed
Jan 17, 2011
1 parent
94af0c3
commit d1189ed
Showing
6 changed files
with
105 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
platform/buildlanguage/ant/sources/jetbrains/mps/build/ant/ExcludeNested.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,43 @@ | |||
package jetbrains.mps.build.ant; | |||
|
|||
import jetbrains.mps.vfs.MPSExtentions; | |||
import org.apache.tools.ant.types.DataType; | |||
import org.apache.tools.ant.types.FileSet; | |||
import org.apache.tools.ant.types.resources.FileResource; | |||
|
|||
import java.io.File; | |||
import java.util.ArrayList; | |||
import java.util.Collections; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
|
|||
/** | |||
* Evgeny Gryaznov, 1/17/11 | |||
*/ | |||
public class ExcludeNested extends DataType { | |||
|
|||
private List<FileSet> excluded = new ArrayList<FileSet>(); | |||
|
|||
public List<File> getExcludedFromDiffFiles() { | |||
List<File> result = new ArrayList<File>(); | |||
for(FileSet inner : excluded) { | |||
Iterator it = inner.iterator(); | |||
while (it.hasNext()) { | |||
FileResource next = (FileResource) it.next(); | |||
File file = next.getFile(); | |||
if(file.exists()) { | |||
result.add(file); | |||
} | |||
} | |||
} | |||
return Collections.unmodifiableList(result); | |||
} | |||
|
|||
public void addFile(FileSet inner) { | |||
excluded.add(inner); | |||
} | |||
|
|||
public void addFiles(FileSet inner) { | |||
excluded.add(inner); | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters