this.packageService = packageService;
}
protected Object doExecute() throws Exception {
SortedMap<String, PackageRequirement> imports = packageService.getImports();
ShellTable table = new ShellTable();
table.column(new Col(onlyPackage ? "Package name" : "Filter"));
table.column(new Col("Optional"));
table.column(new Col("ID"));
table.column(new Col("Bundle Name"));
table.column(new Col("Resolveable"));
for (String filter : imports.keySet()) {
PackageRequirement req = imports.get(filter);
Bundle bundle = req.getBundle();
String firstCol = onlyPackage ? req.getPackageName() : req.getFilter();
table.addRow().addContent(firstCol, req.isOptional() ? "optional" : "", bundle.getBundleId(), bundle.getSymbolicName(), req.isResolveable());
}
table.print(System.out, !noFormat);
return null;
}