Search in sources :

Example 1 with DatabaseDetailView

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);
}
Also used : DatabaseNode(net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode) DatabaseDetailView(net.sourceforge.sqlexplorer.plugin.views.DatabaseDetailView) DatabaseStructureView(net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView)

Aggregations

DatabaseNode (net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode)1 DatabaseDetailView (net.sourceforge.sqlexplorer.plugin.views.DatabaseDetailView)1 DatabaseStructureView (net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView)1