use of com.cubrid.common.ui.cubrid.table.dashboard.control.TableDashboardPart in project cubrid-manager by CUBRID.
the class OpenTargetAction method showTableDashboard.
public void showTableDashboard(CubridDatabase database) {
if (database == null) {
return;
}
if (database.getDatabaseInfo() == null || !JDBCConnectionManager.isConnectable(database.getDatabaseInfo())) {
return;
}
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) {
return;
}
TableDashboardInput input = new TableDashboardInput(database);
TableDashboardPart tablesDetailInfoPart = (TableDashboardPart) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findEditor(input);
if (tablesDetailInfoPart == null) {
OpenTablesDetailInfoPartProgress progress = new OpenTablesDetailInfoPartProgress(database);
progress.loadTablesInfo();
if (progress.isSuccess()) {
input.setTableList(progress.getList());
try {
window.getActivePage().openEditor(input, TableDashboardPart.ID);
} catch (PartInitException e) {
LOGGER.error("Can not initialize the db table list UI.", e);
}
}
} else {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(tablesDetailInfoPart);
}
}
Aggregations