return getName();
if (target.length == 1 && target[0] instanceof String) {
String bsn = (String) target[0];
String title = bsn;
Program p = library.getProgram(Library.OSGI_GROUP, bsn);
if (p != null) {
for (Version version : versions(bsn)) {
RevisionRef findUpdate = findUpdate(p, version);
if (findUpdate != null)
title += SUPERIOR_1; // superscript 1
}
}
return title;
}
if (target.length == 2 && target[0] instanceof String && target[1] instanceof Version) {
String bsn = (String) target[0];
Version version = (Version) target[1];
Library.RevisionRef resource = index.getRevisionRef(bsn, version);
if (resource == null)
return "[deleted " + version + "]";
String title = getPhase(resource.phase.toString()) + " " + version.toString();
File path = cache.getPath(bsn, version, resource.revision);
if (path.isFile() && path.length() == resource.size) {
title += DOWN_ARROW;
}
Program p = library.getProgram(Library.OSGI_GROUP, bsn);
if (p != null) {
RevisionRef findUpdate = findUpdate(p, version);
if (findUpdate != null)
title += SUPERIOR_1; // superscript 1
}