use of net.sourceforge.sqlexplorer.plugin.views.DatabaseDetailView in project tdq-studio-se by Talend.
the class RefreshNodeAction method run.
/**
* Refresh selected node and descendants.
* @see org.eclipse.jface.action.IAction#run()
*/
public void run() {
// clear cache for all nodes
for (int i = 0; i < _selectedNodes.length; i++) {
if (_selectedNodes[i] instanceof DatabaseNode) {
// clear detail cache for session
DetailTabManager.clearCacheForSession(_selectedNodes[i].getSession());
break;
} else {
// clear detail cache for node.
DetailTabManager.clearCacheForNode(_selectedNodes[i]);
}
}
// refresh nodes
for (int i = 0; i < _selectedNodes.length; i++) {
_selectedNodes[i].refresh();
}
// refresh structure view
DatabaseStructureView structureView = SQLExplorerPlugin.getDefault().getDatabaseStructureView();
_treeViewer.refresh();
// refresh detail view
DatabaseDetailView detailView = (DatabaseDetailView) SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(SqlexplorerViewConstants.SQLEXPLORER_DBDETAIL);
structureView.synchronizeDetailView(detailView);
}
Aggregations