}
}
}
public void onOpen(OpenEvent<TreeItem> event) {
final TreeItem node = event.getTarget();
if ( ExplorerNodeConfig.TEST_SCENARIOS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
RepositoryServiceFactory.getPackageService().listPackages( new GenericCallback<PackageConfigData[]>() {
public void onSuccess(PackageConfigData[] conf) {
node.removeItems();
removeTestScenarioIDs( itemWidgets );
for (int i = 0; i < conf.length; i++) {
final PackageConfigData c = conf[i];
TreeItem pkg = new TreeItem( Util.getHeader( images.packages(),
c.name ) );
node.addItem( pkg );
pkg.setUserObject( c );
itemWidgets.put( pkg,
ExplorerNodeConfig.TEST_SCENARIOS_ID );
}
}
} );
} else if ( ExplorerNodeConfig.ANALYSIS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
RepositoryServiceFactory.getPackageService().listPackages( new GenericCallback<PackageConfigData[]>() {
public void onSuccess(PackageConfigData[] conf) {
node.removeItems();
removeAnalysisIDs( itemWidgets );
for (int i = 0; i < conf.length; i++) {
final PackageConfigData c = conf[i];
TreeItem pkg = new TreeItem( Util.getHeader( images.packages(),
c.name ) );
node.addItem( pkg );
pkg.setUserObject( c );
itemWidgets.put( pkg,
ExplorerNodeConfig.ANALYSIS_ID );
}
}
} );