Java Code Examples for org.apache.tools.ant.types.PatternSet#setProject()

The following examples show how to use org.apache.tools.ant.types.PatternSet#setProject() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClassSection.java    From yGuard with MIT License 5 votes vote down vote up
public void addEntries( Collection entries, ZipFileSet zf ) throws IOException {
  if ( classesSet && patternSets.size() < 1 ) {
    PatternSet ps = new PatternSet();
    ps.setProject( zf.getProject() );
    ps.setIncludes( "**.*" );
    patternSets.add( ps );
  }
  super.addEntries( entries, zf );
}
 
Example 2
Source File: JarExpander.java    From PoseidonX with Apache License 2.0 5 votes vote down vote up
private PatternSet createPatternSet(Project prj)
{
    PatternSet patternSet = new PatternSet();
    patternSet.setProject(prj);
    patternSet.setIncludes("**/*");
    return patternSet;
}
 
Example 3
Source File: LocFiles.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public void execute() throws BuildException {
    List<String> includes = new ArrayList<>();
    if (locales != null && !locales.isEmpty()) {
        if (!srcDir.exists()) {
            log("No l10n files present. Do hg clone http://hg.netbeans.org/main/l10n!", Project.MSG_VERBOSE);
            return;
        }

        StringTokenizer tok = new StringTokenizer(locales, ",");
        while (tok.hasMoreElements()) {
            String locale = tok.nextToken();
            if (locale.equals("default")) { // NOI18N
                locale = Locale.getDefault().toString();
            }
            for (String l = locale; l != null; l = trailingUnderscore(l)) {
                processLocale(l, includes, l.equals(locale));
            }
        }
    }
    
    if (patternset != null) {
        PatternSet ps = new PatternSet();
        ps.setProject(getProject());
        if (includes.isEmpty()) {
            ps.createInclude().setName("I/dont/exist/at/all");
        } else {
            for (String s : includes) {
                ps.createInclude().setName(s);
            }
        }
        getProject().addReference(patternset, ps);
    }
    
}