use of com.cubrid.common.ui.cubrid.view.editor.ViewDashboardComposite.ViewsDetailInfoCTabItem in project cubrid-manager by CUBRID.
the class ViewDashboardEditorPart method refresh.
public void refresh() {
OpenViewsDetailInfoPartProgress progress = new OpenViewsDetailInfoPartProgress(database);
progress.loadViewsInfo();
if (progress.isSuccess()) {
viewList = progress.getViewList();
viewsDetailInfoTable.setInput(viewList);
viewsDetailInfoTable.refresh();
List<CTabItem> closeTabItem = new ArrayList<CTabItem>();
for (CTabItem cTabItem : tabFolder.getItems()) {
ViewsDetailInfoCTabItem viewsDetailInfoCTabItem = (ViewsDetailInfoCTabItem) cTabItem;
//refresh column data
if (findItemName(viewsDetailInfoCTabItem.getText())) {
SchemaInfo schemaInfo = database.getDatabaseInfo().getSchemaInfo(viewsDetailInfoCTabItem.getText());
viewsDetailInfoCTabItem.getViewInfoComposite().setInput(schemaInfo);
} else {
//tag non-exist view tab
closeTabItem.add(cTabItem);
}
}
//dispose non-exist view tab
for (CTabItem cTabItem : closeTabItem) {
cTabItem.dispose();
}
//if the select item is disposed ,set the first on selection
if (tabFolder.getItems().length > 0 && tabFolder.getSelection().isDisposed()) {
tabFolder.setSelection(0);
}
viewChangeFlag = false;
}
}
Aggregations