}
public StringBuffer bundleInfo(Bundle b) {
StringBuffer sb = new StringBuffer();
Dictionary headers = b.getHeaders();
sb.append("<table border=0 cellspacing=1 cellpadding=0>\n");
appendRow(sb, "Location", "" + b.getLocation());
appendRow(sb, "State", Util.stateName(b.getState()));
if (b.getSymbolicName() != null) {
appendRow(sb, "Symbolic name", b.getSymbolicName());
}
appendRow(sb, "Last modified", "" + new SimpleDateFormat().format(new Date(b.getLastModified())));
StartLevel sls = (StartLevel)Activator.desktop.slTracker.getService();
if(sls != null) {
String level = "";
try {
level = Integer.toString(sls.getBundleStartLevel(b));
} catch (IllegalArgumentException e) {
level = "not managed";
}
appendRow(sb, "Start level", level);
}
// Spacer for better layout (and separation of non-manifest data):
appendRow(sb, " ", "");
List headerKeys = new ArrayList(headers.size());
for(Enumeration e = headers.keys(); e.hasMoreElements(); ) {
headerKeys.add(e.nextElement());
}
Collections.sort(headerKeys);
for(Iterator it = headerKeys.iterator(); it.hasNext(); ) {
String key = (String)it.next();
String value = (String)headers.get(key);
if(value != null && !"".equals(value)) {
value = Strings.replace(value, "<", "<");
value = Strings.replace(value, ">", ">");
if("Import-Package".equals(key) ||
"Export-Service".equals(key) ||