}
return null;
}
private String revisionTooltip(String bsn, Version version) throws Exception {
RevisionRef r = getRevisionRef(bsn, version);
if (r == null)
return null;
Formatter sb = new Formatter();
try {
sb.format("[%s:%s", r.groupId, r.artifactId);
if (r.classifier != null) {
sb.format(":%s", r.classifier);
}
sb.format("@%s]\n\n", r.version);
if (r.releaseSummary != null)
sb.format("%s\n\n", r.releaseSummary);
if (r.description != null)
sb.format("%s\n\n", r.description.replaceAll("#\\s*", ""));
sb.format("Size %s\nSHA-1 %s\nAge %s\nURL %s\n", size(r.size, 0), Hex.toHexString(r.revision),
age(r.created), r.url);
File f = cache.getPath(bsn, version, r.revision);
if (f.isFile() && f.length() == r.size)
sb.format("Cached %s\n", f);
else
sb.format("Not downloaded\n");
Program p = library.getProgram(Library.OSGI_GROUP, bsn);
if (p != null) {
RevisionRef update = findUpdate(p, version);
if (update != null) {
sb.format(DOWN_ARROW + " This version should be updated to " + update.version);
}
}
j.wrap((StringBuilder) sb.out());