private Collection<File> toFiles(Collection<Container> path) { List<File> result = new ArrayList<File>(path.size()); for (Container c : path) { if (c.getError() == null) { result.add(c.getFile()); } } return result; }
public String getColumnText(Object element, int columnIndex) { Container c = (Container) element; switch (columnIndex) { case 0: return c.getBundleSymbolicName(); case 1: return c.getVersion(); case 2: return c.getError(); case 3: return c.getFile() + " (" + (c.getFile()!=null && c.getFile().exists() ? "exists" : "?") + ")"; } return null; }
/** * Must show the file name or the error formatted as a file name * * @return */ @Override public String toString() { if (getError() != null) return "/error/" + getError(); return getFile().getAbsolutePath().replace(File.separatorChar, '/'); }
/** * Must show the file name or the error formatted as a file name * * @return */ @Override public String toString() { if (getError() != null) return "/error/" + getError(); return getFile().getAbsolutePath().replace(File.separatorChar, '/'); }
private Option bndToExam(Run bndRunInstruction) throws Exception { Collection<Option> urls = new ArrayList<>(); Collection<Container> bundles = bndRunInstruction.getRunbundles(); for (Container container : bundles) { urls.add(url(container.getFile().toURI().toASCIIString())); } return composite(urls.toArray(new Option[urls.size()])); } }
/** * Must show the file name or the error formatted as a file name * * @return */ @Override public String toString() { if (getError() != null) return "/error/" + getError(); return getFile().getAbsolutePath(); }
/** * Must show the file name or the error formatted as a file name * * @return */ public String toString() { if (getError() != null) return "/error/" + getError(); else return getFile().getAbsolutePath(); }
/** * Must show the file name or the error formatted as a file name * * @return */ public String toString() { if (getError() != null) return "/error/" + getError(); else return getFile().getAbsolutePath(); }
public void addClasspath(Container c) throws IOException { File file = c.getFile(); if ((c.getType() == TYPE.PROJECT) && !file.exists()) { return; } Jar jar = new Jar(file); super.addClasspath(jar); project.unreferencedClasspathEntries.put(jar.getName(), c); }
public void add(Collection<Container> testpath) throws Exception { for (Container c : Container.flatten(testpath)) { if (c.getError() != null) { project.error("Adding %s to %s, got error: %s", c, name, c.getError()); } else { entries.add(c.getFile() .getAbsoluteFile()); } } }
public void add(Collection<Container> testpath) throws Exception { for (Container c : Container.flatten(testpath)) { if (c.getError() != null) { project.error("Adding %s to %s, got error: %s", c, name, c.getError()); } else { entries.add(c.getFile() .getAbsoluteFile()); } } }
public void add(Collection<Container> testpath) throws Exception { for (Container c : Container.flatten(testpath)) { if (c.getError() != null) { project.error("Adding %s to %s, got error: %s", c, name, c.getError()); } else { entries.add(c.getFile().getAbsoluteFile()); } } }
public void addBundles(File bndrun) throws Exception { Run run = Run.createRun(getWorkspace(), bndrun); List<Bundle> bundles = new ArrayList<>(); for (Container c : run.getRunbundles()) { assert c.getError() == null; Bundle bundle = context.installBundle(c.getFile() .toURI() .toString()); bundles.add(bundle); } startAll(bundles); }
public void addClasspath(Container c) throws IOException { File file = c.getFile(); if ((c.getType() == TYPE.PROJECT) && !file.exists()) { return; } Jar jar = new Jar(file); super.addClasspath(jar); project.unreferencedClasspathEntries.put(jar.getName(), c); }
public void add(Collection<Container> testpath) throws Exception { for (Container c : Container.flatten(testpath)) { if (c.getError() != null) { project.error("Adding %s to %s, got error: %s", c, name, c.getError()); } else { entries.add(c.getFile().getAbsoluteFile()); } } }
public void addBundles(File bndrun) throws Exception { Run run = Run.createRun(getWorkspace(), bndrun); List<Bundle> bundles = new ArrayList<>(); for (Container c : run.getRunbundles()) { assert c.getError() == null; Bundle bundle = context.installBundle(c.getFile() .toURI() .toString()); bundles.add(bundle); } startAll(bundles); }
/** * 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()); }
/** * 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()); }
@Override public Entry<String, Resource> export(String type, Project project, Map<String, String> options) throws Exception { project.prepare(); Collection<Container> runbundles = project.getRunbundles(); Jar jar = new Jar(project.getName()); jar.setDoNotTouchManifest(); for (Container container : runbundles) { File source = container.getFile(); String path = nonCollidingPath(jar, source.getName()); jar.putResource(path, new FileResource(source)); } return new SimpleEntry<>(jar.getName(), new JarResource(jar, true)); }
@Override public Entry<String, Resource> export(String type, Project project, Map<String, String> options) throws Exception { project.prepare(); Collection<Container> runbundles = project.getRunbundles(); Jar jar = new Jar(project.getName()); jar.setDoNotTouchManifest(); for (Container container : runbundles) { File source = container.getFile(); String path = nonCollidingPath(jar, source.getName()); jar.putResource(path, new FileResource(source)); } return new SimpleEntry<>(jar.getName(), new JarResource(jar, true)); }