public String _basedir(@SuppressWarnings("unused") String args[]) { if (base == null) throw new IllegalArgumentException("No base dir set"); return IO.absolutePath(base); }
public String _basedir(@SuppressWarnings("unused") String args[]) { if (base == null) throw new IllegalArgumentException("No base dir set"); return IO.absolutePath(base); }
private String getJavaExecutable() { String javaHome = System.getProperty("java.home"); if (javaHome == null) { return "java"; } File java = new File(javaHome, "bin/java"); return IO.absolutePath(java); }
public String _p_output(String args[]) throws Exception { if (args.length != 1) throw new IllegalArgumentException("${output} should not have arguments"); return IO.absolutePath(getOutput()); }
private void traverse(List<String> paths, File item) { if (item.isDirectory()) { for (File sub : item.listFiles()) { traverse(paths, sub); } } else if (item.isFile()) paths.add(IO.absolutePath(item)); else paths.add(item.getName()); }
/** * Return the name of the properties file */ public String _thisfile(String[] args) { if (propertiesFile == null) { error("${thisfile} executed on a processor without a properties file"); return null; } return IO.absolutePath(propertiesFile); }
@Override public String getLocation() { return IO.absolutePath(workspace.getBase()); }
public String _p_output(String args[]) throws Exception { if (args.length != 1) throw new IllegalArgumentException("${output} should not have arguments"); return IO.absolutePath(getOutput()); }
public String _propertiesdir(String[] args) { if (args.length > 1) { error("propertiesdir does not take arguments"); return null; } File pf = getPropertiesFile(); if (pf == null) return ""; return IO.absolutePath(pf.getParentFile()); }
public String _osfile(String args[]) { verifyCommand(args, _fileHelp, null, 3, 3); File base = new File(args[1]); File f = Processor.getFile(base, args[2]); return IO.absolutePath(f); }
public String _osfile(String args[]) { verifyCommand(args, _fileHelp, null, 3, 3); File base = new File(args[1]); File f = Processor.getFile(base, args[2]); return IO.absolutePath(f); }
/** * This methods attempts to turn any jar into a valid jar. If this is a * bundle with manifest, a manifest is added based on defaults. If it is a * bundle, but not r4, we try to add the r4 headers. * * @throws Exception */ public Jar getValidJar(File f) throws Exception { Jar jar = new Jar(f); return getValidJar(jar, IO.absolutePath(f)); }
@Override public void setBase(File file) { super.setBase(file); getProperties().put("project.dir", IO.absolutePath(getBase())); }
@Override public void setBase(File file) { super.setBase(file); getProperties().put("project.dir", IO.absolutePath(getBase())); }
@Override public void close() throws IOException { if (inited) { exec(close, IO.absolutePath(getRoot())); if (hasIndex) index.close(); } }
public void set(SetLocation sl) { sl.file(IO.absolutePath(file)); sl.line(line); sl.length(length); } }
/** * Must show the file name or the error formatted as a file name */ @Override public String toString() { if (getError() != null) return "/error/" + getError(); return IO.absolutePath(getFile()); }
public void set(SetLocation sl) { sl.file(IO.absolutePath(file)); sl.line(line); sl.length(length); } }
@Override public void close() throws IOException { if (inited) { exec(close, IO.absolutePath(getRoot())); if (hasIndex) index.close(); } }
/** * Must show the file name or the error formatted as a file name */ @Override public String toString() { if (getError() != null) return "/error/" + getError(); return IO.absolutePath(getFile()); }