Package org.apache.tools.ant.types

Examples of org.apache.tools.ant.types.Path$PathElement


        return pages;
    }

    public Path createPages() {
        if (pages == null) {
            pages = new Path(getProject());
        }
        return pages.createPath();
    }
View Full Code Here


        }
    }

    public void execute() throws BuildException {
        List<String> packagesToDoc = new ArrayList<String>();
        Path sourceDirs = new Path(getProject());
        Properties properties = new Properties();
        properties.setProperty("windowTitle", windowTitle);
        properties.setProperty("docTitle", docTitle);
        properties.setProperty("footer", footer);
        properties.setProperty("header", header);
        checkScopeProperties(properties);
        properties.setProperty("publicScope", publicScope.toString());
        properties.setProperty("protectedScope", protectedScope.toString());
        properties.setProperty("packageScope", packageScope.toString());
        properties.setProperty("privateScope", privateScope.toString());
        properties.setProperty("author", author.toString());
        properties.setProperty("processScripts", processScripts.toString());
        properties.setProperty("includeMainForScripts", includeMainForScripts.toString());
        properties.setProperty("overviewFile", overviewFile != null ? overviewFile.getAbsolutePath() : "");

        if (sourcePath != null) {
            sourceDirs.addExisting(sourcePath);
        }
        parsePackages(packagesToDoc, sourceDirs);

        if (classTemplates.size() == 0)
            throw new BuildException("Method getClassTemplates() needs to return at least a single classTemplate String!");
View Full Code Here

  }

  public void testResultStreamError() throws Exception {
    List<String> messages = new ArrayList<String>();

    model.addClasspath(new Path(new Project()));
    model.setResultFile("/this/result/file/does/not/exist.txt");
    assertFalse(model.validate(messages));
    assertTrue(messages.contains(TaskModel.ERROR_RESULT_FILE_CREATION_FAILED));
  }
View Full Code Here

  }

  public void testErrorStreamError() throws Exception {
    List<String> messages = new ArrayList<String>();

    model.addClasspath(new Path(new Project()));
    model.setErrorFile("/this/error/file/does/not/exist.txt");
    assertFalse(model.validate(messages));
    assertTrue(messages.contains(TaskModel.ERROR_ERROR_FILE_CREATION_FAILED));
  }
View Full Code Here

    assertTrue(messages.contains(TaskModel.ERROR_ERROR_FILE_CREATION_FAILED));
  }

  public void testGetClassPath() throws Exception {
    Project proj = new Project();
    Path p = new Path(proj);

    proj.setBasedir(".");
    p.setLocation(new File("src-test/com/google/ant"));

    model.addClasspath(p);
    Matcher matcher = Pattern.compile("src-test.com.google.ant").matcher(model.getClassPath());
    assertTrue(matcher.find());
  }
View Full Code Here

  }

  public void testResultFileNotSet() throws Exception {
    List<String> messages = new ArrayList<String>();

    model.addClasspath(new Path(new Project()));
    model.setResultFile(null);
    assertTrue(model.validate(messages));
    assertTrue(messages.contains(TaskModel.ERROR_RESULT_FILE_NOT_SET));
  }
View Full Code Here

  }

  public void testFilterNotSet() throws Exception {
    List<String> messages = new ArrayList<String>();

    model.addClasspath(new Path(new Project()));
    model.setFilter(null);
    assertTrue(model.validate(messages));
    assertTrue(messages.contains(TaskModel.ERROR_FILTER_NOT_SET));
  }
View Full Code Here

  }

  public void testErrorFileSameAsResultFile() throws Exception {
    List<String> messages = new ArrayList<String>();

    model.addClasspath(new Path(new Project()));
    model.setErrorFile(null);
    model.setResultFile(File.createTempFile("anyfile", ".temp").toString());
    assertTrue(model.validate(messages));
    assertEquals(model.getResultFile(), model.getErrorFile());
  }
View Full Code Here

  public Vector<Path> getFileSets() {
    return classPaths;
  }

  public String getClassPath() {
    Path totalPath = null;
    for (Path p : classPaths) {
      if (totalPath == null) {
        totalPath = p;
        continue;
      }
      totalPath.add(p);
    }

    return totalPath != null ? totalPath.toString() : DEFAULT_FILTER;
  }
View Full Code Here

    }


    public Path createClasspath() {
        if (classpath == null) {
            classpath = new Path(getProject());
        }
        return classpath;
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.types.Path$PathElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.