}
public void onOpen(OpenEvent<TreeItem> event) {
final TreeItem node = event.getTarget();
if ( ExplorerNodeConfig.TEST_SCENARIOS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
moduleService.listModules( new GenericCallback<Module[]>() {
public void onSuccess(Module[] conf) {
node.removeItems();
removeTestScenarioIDs( itemWidgets );
for (int i = 0; i < conf.length; i++) {
final Module c = conf[i];
TreeItem pkg = new TreeItem( Util.getHeader( DroolsGuvnorImageResources.INSTANCE.packages(),
c.getName() ) );
node.addItem( pkg );
pkg.setUserObject( c );
itemWidgets.put( pkg,
ExplorerNodeConfig.TEST_SCENARIOS_ID );
}
}
} );
} else if ( ExplorerNodeConfig.ANALYSIS_ROOT_ID.equals( itemWidgets.get( node ) ) ) {
ModuleServiceAsync moduleService = GWT.create(ModuleService.class);
moduleService.listModules( new GenericCallback<Module[]>() {
public void onSuccess(Module[] conf) {
node.removeItems();
removeAnalysisIDs( itemWidgets );
for (int i = 0; i < conf.length; i++) {
final Module c = conf[i];