public String _dir(String args[]) { if (args.length < 2) { domain.warning("Need at least one file name for ${dir;...}"); return null; } String del = ""; StringBuilder sb = new StringBuilder(); for (int i = 1; i < args.length; i++) { File f = domain.getFile(args[i]); if (f.exists() && f.getParentFile().exists()) { sb.append(del); sb.append(f.getParentFile().getAbsolutePath()); del = ","; } } return sb.toString(); }
public void init() throws IOException { URL s = getClass().getClassLoader().getResource(SERVICE_JAR_FILE); if (s == null) if (underTest) return; else throw new Error("No " + SERVICE_JAR_FILE + " resource in jar"); service.getParentFile().mkdirs(); IO.copy(s, service); }
public static void testClasspath() throws Exception { File project = new File("").getAbsoluteFile(); File workspace = project.getParentFile(); Processor processor = new Processor(); EclipseClasspath p = new EclipseClasspath(processor, workspace, project); System.err.println(p.getDependents()); System.err.println(p.getClasspath()); System.err.println(p.getSourcepath()); System.err.println(p.getOutput()); }