private static void deploymentListPackages( final TreeItem root ) {
ModuleServiceAsync moduleService= GWT.create(ModuleService.class);
moduleService.listModules(new GenericCallback<Module[]>() {
public void onSuccess(Module[] values) {
PackageView ph = new PackageHierarchicalView();
for (Module val : values) {
ph.addPackage(val);
}
for (Folder hf : ph.getRootFolder().getChildren()) {
buildDeploymentTree(root, hf);
}
}
});
}