Search in sources :

Example 1 with DatabaseNode

use of net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode in project tdq-studio-se by Talend.

the class DetailTabManager method createTabs.

/**
 * Returns a list of all available tabs for a given node. These tabs can be
 * standard or plugin tabs.
 *
 * @param node for which to find tabs.
 * @return List of tabs
 */
private static List<IDetailTab> createTabs(INode node) {
    if (_logger.isDebugEnabled()) {
        // $NON-NLS-1$
        _logger.debug("Creating tabs for: " + node.getUniqueIdentifier());
    }
    ArrayList<IDetailTab> tabList = new ArrayList<IDetailTab>();
    // create connection info tab if needed
    if (node instanceof DatabaseNode) {
        IDetailTab dbTab = new ConnectionInfoTab();
        dbTab.setNode(node);
        tabList.add(dbTab);
    }
    // create our basic table tabs
    if (node instanceof TableNode) {
        IDetailTab tab1 = new ColumnInfoTab();
        IDetailTab tab2 = new TableInfoTab();
        IDetailTab tab3 = new PreviewTab();
        IDetailTab tab4 = new RowCountTab();
        IDetailTab tab5 = new PrimaryKeysTab();
        IDetailTab tab6 = new ExportedKeysTab();
        IDetailTab tab7 = new ImportedKeysTab();
        IDetailTab tab8 = new IndexesTab();
        IDetailTab tab9 = new PriviligesTab();
        IDetailTab tab10 = new ColumnPriviligesTab();
        IDetailTab tab11 = new RowIdsTab();
        IDetailTab tab12 = new VersionsTab();
        tab1.setNode(node);
        tab2.setNode(node);
        tab3.setNode(node);
        tab4.setNode(node);
        tab5.setNode(node);
        tab6.setNode(node);
        tab7.setNode(node);
        tab8.setNode(node);
        tab9.setNode(node);
        tab10.setNode(node);
        tab11.setNode(node);
        tab12.setNode(node);
        tabList.add(tab1);
        tabList.add(tab2);
        tabList.add(tab3);
        tabList.add(tab4);
        tabList.add(tab5);
        tabList.add(tab6);
        tabList.add(tab7);
        tabList.add(tab8);
        tabList.add(tab9);
        tabList.add(tab10);
        tabList.add(tab11);
        tabList.add(tab12);
    }
    // create extension point tabs
    String databaseProductName = node.getSession().getRoot().getDatabaseProductName().toLowerCase().trim();
    String nodeType = node.getType().toLowerCase().trim();
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    // $NON-NLS-1$ $NON-NLS-2$
    IExtensionPoint point = registry.getExtensionPoint("net.sourceforge.sqlexplorer", "nodeDetailTab");
    IExtension[] extensions = point.getExtensions();
    for (int i = 0; i < extensions.length; i++) {
        IExtension e = extensions[i];
        IConfigurationElement[] ces = e.getConfigurationElements();
        for (int j = 0; j < ces.length; j++) {
            try {
                boolean isValidProduct = false;
                boolean isValidNodeType = false;
                // $NON-NLS-1$ $NON-NLS-2$
                String[] validProducts = ces[j].getAttribute("database-product-name").split(",");
                // $NON-NLS-1$ $NON-NLS-2$
                String[] validNodeTypes = ces[j].getAttribute("node-type").split(",");
                // check if tab is valid for current database product
                for (int k = 0; k < validProducts.length; k++) {
                    String product = validProducts[k].toLowerCase().trim();
                    if (product.length() == 0) {
                        continue;
                    }
                    if (product.equals("*")) {
                        // $NON-NLS-1$
                        isValidProduct = true;
                        break;
                    }
                    // $NON-NLS-1$ $NON-NLS-2$
                    String regex = TextUtil.replaceChar(product, '*', ".*");
                    if (databaseProductName.matches(regex)) {
                        isValidProduct = true;
                        break;
                    }
                }
                if (!isValidProduct) {
                    continue;
                }
                // check if tab is valid for current node type
                for (int k = 0; k < validNodeTypes.length; k++) {
                    String type = validNodeTypes[k].toLowerCase().trim();
                    if (type.length() == 0) {
                        continue;
                    }
                    if (type.equals("*")) {
                        // $NON-NLS-1$
                        isValidNodeType = true;
                        break;
                    }
                    // $NON-NLS-1$ $NON-NLS-2$
                    String regex = TextUtil.replaceChar(type, '*', ".*");
                    if (nodeType.matches(regex)) {
                        isValidNodeType = true;
                        break;
                    }
                }
                if (!isValidNodeType) {
                    continue;
                }
                // add tab to list
                // $NON-NLS-1$
                IDetailTab tab = (IDetailTab) ces[j].createExecutableExtension("class");
                tab.setNode(node);
                tabList.add(tab);
            } catch (Throwable ex) {
                SQLExplorerPlugin.error(Messages.getString("DataSetTableActionGroup.cannotCreateMenuAction"), ex);
            }
        }
    }
    return tabList;
}
Also used : ArrayList(java.util.ArrayList) TableInfoTab(net.sourceforge.sqlexplorer.dbdetail.tab.TableInfoTab) RowIdsTab(net.sourceforge.sqlexplorer.dbdetail.tab.RowIdsTab) ColumnPriviligesTab(net.sourceforge.sqlexplorer.dbdetail.tab.ColumnPriviligesTab) PriviligesTab(net.sourceforge.sqlexplorer.dbdetail.tab.PriviligesTab) VersionsTab(net.sourceforge.sqlexplorer.dbdetail.tab.VersionsTab) DatabaseNode(net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode) IExtension(org.eclipse.core.runtime.IExtension) PreviewTab(net.sourceforge.sqlexplorer.dbdetail.tab.PreviewTab) ColumnInfoTab(net.sourceforge.sqlexplorer.dbdetail.tab.ColumnInfoTab) IExtensionRegistry(org.eclipse.core.runtime.IExtensionRegistry) ColumnPriviligesTab(net.sourceforge.sqlexplorer.dbdetail.tab.ColumnPriviligesTab) ImportedKeysTab(net.sourceforge.sqlexplorer.dbdetail.tab.ImportedKeysTab) IConfigurationElement(org.eclipse.core.runtime.IConfigurationElement) ConnectionInfoTab(net.sourceforge.sqlexplorer.dbdetail.tab.ConnectionInfoTab) IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) IExtensionPoint(org.eclipse.core.runtime.IExtensionPoint) PrimaryKeysTab(net.sourceforge.sqlexplorer.dbdetail.tab.PrimaryKeysTab) RowCountTab(net.sourceforge.sqlexplorer.dbdetail.tab.RowCountTab) TableNode(net.sourceforge.sqlexplorer.dbstructure.nodes.TableNode) IndexesTab(net.sourceforge.sqlexplorer.dbdetail.tab.IndexesTab) ExportedKeysTab(net.sourceforge.sqlexplorer.dbdetail.tab.ExportedKeysTab)

Example 2 with DatabaseNode

use of net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode 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)

Example 3 with DatabaseNode

use of net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode in project tdq-studio-se by Talend.

the class SqlexplorerService method findSqlExplorerTableNode.

/*
     * (non-Javadoc)
     * 
     * @see
     * org.talend.dataprofiler.service.ISqlexplorerService#findSqlExplorerTableNode(org.talend.core.model.metadata.builder
     * .connection.Connection, orgomg.cwm.objectmodel.core.Package, java.lang.String, java.lang.String)
     */
@Override
public void findSqlExplorerTableNode(Connection providerConnection, Package parentPackageElement, String tableName, String activeTabName) {
    // Open data explore perspective.
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
        ITDQRepositoryService service = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(ITDQRepositoryService.class);
        if (service != null) {
            service.changePerspectiveAction(SQLExplorerPluginPerspective.class.getName());
        } else {
            return;
        }
    }
    Collection<Alias> aliases = SQLExplorerPlugin.getDefault().getAliasManager().getAliases();
    String url = JavaSqlFactory.getURL(providerConnection);
    User currentUser = null;
    for (Alias alias : aliases) {
        if (alias.getUrl().equals(url)) {
            currentUser = alias.getDefaultUser();
            OpenPasswordConnectDialogAction openDlgAction = new OpenPasswordConnectDialogAction(alias, alias.getDefaultUser(), false);
            openDlgAction.run();
            break;
        }
    }
    // MOD qiongli bug 13093,2010-7-2,show the warning dialog when the table can't be found
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    if (currentUser == null) {
        // $NON-NLS-1$
        MessageDialog.openWarning(// $NON-NLS-1$
        shell, // $NON-NLS-1$
        Messages.getString("SqlExplorerBridge.Warning"), // $NON-NLS-1$
        Messages.getString("SqlExplorerBridge.MissTable") + tableName);
        return;
    }
    DatabaseNode root = currentUser.getMetaDataSession().getRoot();
    root.load();
    List<INode> catalogs = root.getCatalogs();
    List<INode> schemas = root.getSchemas();
    Catalog catalog = SwitchHelpers.CATALOG_SWITCH.doSwitch(parentPackageElement);
    Schema schema = SwitchHelpers.SCHEMA_SWITCH.doSwitch(parentPackageElement);
    INode catalogOrSchemaNode = null;
    // TDQ-12005: fix Exasol/hive(TDQ-11887: hdp20 at least) database can view index/keys well
    String findCatalogNodeName = isExasol(url) ? "EXA_DB" : (isHive(url) ? "NoCatalog" : "");
    if (!findCatalogNodeName.equals("") && !catalogs.isEmpty()) {
        for (INode catalogNode : catalogs) {
            if (findCatalogNodeName.equalsIgnoreCase(catalogNode.getName())) {
                catalogOrSchemaNode = catalogNode;
                break;
            }
        }
    } else {
        if (catalog != null) {
            // MOD klliu bug 14662 2010-08-05
            if (!catalogs.isEmpty()) {
                for (INode catalogNode : catalogs) {
                    if (parentPackageElement.getName().equalsIgnoreCase(catalogNode.getName())) {
                        catalogOrSchemaNode = catalogNode;
                        break;
                    }
                }
            } else {
                catalogOrSchemaNode = root;
            }
        } else {
            // MOD by zshen for 20517
            if (schemas.isEmpty()) {
                // the case for mssql/postgrel(which have catalog and schema structor) schema analysis.
                Catalog shcmeaOfCatalogNode = CatalogHelper.getParentCatalog(parentPackageElement);
                for (INode catalogNode : catalogs) {
                    if (shcmeaOfCatalogNode != null && shcmeaOfCatalogNode.getName().equalsIgnoreCase(catalogNode.getName())) {
                        catalogOrSchemaNode = catalogNode;
                        break;
                    }
                }
            }
            for (INode schemaNode : schemas) {
                if (parentPackageElement.getName().equalsIgnoreCase(schemaNode.getName())) {
                    catalogOrSchemaNode = schemaNode;
                    break;
                }
            }
        }
    }
    // find the table folder node.
    if (catalogOrSchemaNode == null) {
        // $NON-NLS-1$
        throw new NullPointerException(Messages.getString("SqlExplorerBridge.CATORSCHMISNULL"));
    }
    // catalog node.
    if (schema != null) {
        if (catalogOrSchemaNode.getSchemaName() == null) {
            catalogOrSchemaNode.setSchemaName(schema.getName());
        } else if (!StringUtils.equals(catalogOrSchemaNode.getSchemaName(), schema.getName())) {
            // if this catalog already loaded its children of some schema, should reload for this schema.
            if (catalogOrSchemaNode.isChildrenLoaded()) {
                SQLExplorerPlugin.getDefault().getDatabaseStructureView().refreshSessionTrees(currentUser.getMetaDataSession());
                List<INode> catalogs2 = currentUser.getMetaDataSession().getRoot().getCatalogs();
                if (catalogs2.size() != 0) {
                    for (INode catalogNode : catalogs2) {
                        if (catalogOrSchemaNode.getName().equalsIgnoreCase(catalogNode.getName())) {
                            catalogOrSchemaNode = catalogNode;
                            catalogOrSchemaNode.setSchemaName(schema.getName());
                            break;
                        }
                    }
                }
            }
        }
    }
    // ~
    INode[] childNodes = catalogOrSchemaNode.getChildNodes();
    // need to find the schema and load the table nodes
    if (isNetezza(url)) {
        SchemaNode sNode = getNetezzaSchema(childNodes, JavaSqlFactory.getUsername(providerConnection));
        if (sNode != null) {
            childNodes = sNode.getChildNodes();
        }
    }
    TableFolderNode tableFolderNode = null;
    for (INode node : childNodes) {
        if ("TABLE".equals(node.getQualifiedName())) {
            // $NON-NLS-1$
            tableFolderNode = (TableFolderNode) node;
            break;
        }
    }
    if (tableFolderNode == null) {
        // $NON-NLS-1$
        log.fatal(Messages.getString("SqlExplorerBridge.TABLE_FOLDER_NULL0"));
    } else {
        INode[] tableNodes = tableFolderNode.getChildNodes();
        for (INode node : tableNodes) {
            if (tableName.equalsIgnoreCase(node.getName())) {
                DetailTabManager.setActiveTabName(activeTabName);
                DatabaseStructureView dsView = SQLExplorerPlugin.getDefault().getDatabaseStructureView();
                dsView.setSessionSelectionNode(currentUser.getMetaDataSession(), new StructuredSelection(node));
                // MOD qiongli bug 13093,2010-7-2
                SQLExplorerPlugin.getDefault().getConnectionsView().getTreeViewer().setSelection(new StructuredSelection(currentUser));
                return;
            }
        }
    }
    // $NON-NLS-1$
    MessageDialog.openWarning(// $NON-NLS-1$
    shell, // $NON-NLS-1$
    Messages.getString("SqlExplorerBridge.Warning"), // $NON-NLS-1$
    Messages.getString("SqlExplorerBridge.MissTable") + tableName);
}
Also used : INode(net.sourceforge.sqlexplorer.dbstructure.nodes.INode) User(net.sourceforge.sqlexplorer.dbproduct.User) ITDQRepositoryService(org.talend.core.ITDQRepositoryService) Schema(orgomg.cwm.resource.relational.Schema) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) OpenPasswordConnectDialogAction(net.sourceforge.sqlexplorer.plugin.actions.OpenPasswordConnectDialogAction) Catalog(orgomg.cwm.resource.relational.Catalog) TableFolderNode(net.sourceforge.sqlexplorer.dbstructure.nodes.TableFolderNode) SchemaNode(net.sourceforge.sqlexplorer.dbstructure.nodes.SchemaNode) Shell(org.eclipse.swt.widgets.Shell) DatabaseNode(net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode) Alias(net.sourceforge.sqlexplorer.dbproduct.Alias) SQLExplorerPluginPerspective(net.sourceforge.sqlexplorer.plugin.perspectives.SQLExplorerPluginPerspective) List(java.util.List) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) DatabaseStructureView(net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView)

Example 4 with DatabaseNode

use of net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode in project tdq-studio-se by Talend.

the class DatabaseStructureView method addSession.

/**
 * Add a new session to the database structure view. This will create a new tab for the session.
 *
 * @param session
 */
private void addSession(final MetaDataSession session) throws SQLCannotConnectException {
    if (_allSessions.contains(session)) {
        return;
    }
    try {
        session.getMetaData();
        session.setAutoCommit(true);
    } catch (SQLCannotConnectException e) {
        SQLExplorerPlugin.error(e);
        throw e;
    } catch (SQLException e) {
        SQLExplorerPlugin.error(e);
        MessageDialog.openError(getSite().getShell(), "Cannot connect", e.getMessage());
    }
    DatabaseNode rootNode = session.getRoot();
    if (rootNode == null) {
        return;
    }
    _allSessions.add(session);
    if (_filterAction != null) {
        _filterAction.setEnabled(true);
    }
    if (_tabFolder == null || _tabFolder.isDisposed()) {
        clearParent();
        // create tab folder for different sessions
        _tabFolder = new CTabFolder(_parent, SWT.TOP | SWT.CLOSE);
        // add listener to keep both views on the same active tab
        _tabFolder.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                // set the selected node in the detail view.
                DatabaseDetailView detailView = (DatabaseDetailView) getSite().getPage().findView(SqlexplorerViewConstants.SQLEXPLORER_DBDETAIL);
                synchronizeDetailView(detailView);
            }
        });
        // Set up a gradient background for the selected tab
        Display display = getSite().getShell().getDisplay();
        _tabFolder.setSelectionBackground(new Color[] { display.getSystemColor(SWT.COLOR_WHITE), new Color(null, 211, 225, 250), new Color(null, 175, 201, 246), IConstants.TAB_BORDER_COLOR }, new int[] { 25, 50, 75 }, true);
        // Add a listener to handle the close button on each tab
        _tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {

            @Override
            public void close(CTabFolderEvent event) {
                CTabItem tabItem = (CTabItem) event.item;
                TabData tabData = (TabData) tabItem.getData();
                _allSessions.remove(tabData.session);
                event.doit = true;
            }
        });
        _parent.layout();
        _parent.redraw();
    }
    // create tab
    final CTabItem tabItem = new CTabItem(_tabFolder, SWT.NULL);
    TabData tabData = new TabData();
    tabItem.setData(tabData);
    tabData.session = session;
    // set tab text
    String labelText = session.getUser().getDescription();
    tabItem.setText(labelText);
    // create composite for our outline
    Composite composite = new Composite(_tabFolder, SWT.NULL);
    composite.setLayout(new FillLayout());
    tabItem.setControl(composite);
    // create outline
    final TreeViewer treeViewer = new TreeViewer(composite, SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER);
    tabData.treeViewer = treeViewer;
    // add drag support
    // TODO improve drag support options
    Transfer[] transfers = new Transfer[] { TableNodeTransfer.getInstance() };
    treeViewer.addDragSupport(DND.DROP_COPY, transfers, new DragSourceListener() {

        public void dragFinished(DragSourceEvent event) {
            System.out.println("$drag finished");
            TableNodeTransfer.getInstance().setSelection(null);
        }

        public void dragSetData(DragSourceEvent event) {
            Object sel = ((IStructuredSelection) treeViewer.getSelection()).getFirstElement();
            event.data = sel;
        }

        public void dragStart(DragSourceEvent event) {
            event.doit = !treeViewer.getSelection().isEmpty();
            if (event.doit) {
                Object sel = ((IStructuredSelection) treeViewer.getSelection()).getFirstElement();
                if (!(sel instanceof TableNode)) {
                    event.doit = false;
                } else {
                    TableNode tn = (TableNode) sel;
                    TableNodeTransfer.getInstance().setSelection(tn);
                    if (!tn.isTable()) {
                        event.doit = false;
                    }
                }
            }
        }
    });
    // use hash lookup to improve performance
    treeViewer.setUseHashlookup(true);
    // add content and label provider
    treeViewer.setContentProvider(new DBTreeContentProvider());
    treeViewer.setLabelProvider(new DBTreeLabelProvider());
    // set input session
    treeViewer.setInput(rootNode);
    // add selection change listener, so we can update detail view as
    // required.
    treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent ev) {
            // set the selected node in the detail view.
            DatabaseDetailView detailView = (DatabaseDetailView) getSite().getPage().findView(SqlexplorerViewConstants.SQLEXPLORER_DBDETAIL);
            synchronizeDetailView(detailView);
        }
    });
    // bring detail to front on doubleclick of node
    treeViewer.addDoubleClickListener(new IDoubleClickListener() {

        public void doubleClick(DoubleClickEvent event) {
            try {
                // find view
                DatabaseDetailView detailView = (DatabaseDetailView) getSite().getPage().findView(SqlexplorerViewConstants.SQLEXPLORER_DBDETAIL);
                if (detailView == null) {
                    getSite().getPage().showView(SqlexplorerViewConstants.SQLEXPLORER_DBDETAIL);
                }
                getSite().getPage().bringToTop(detailView);
                synchronizeDetailView(detailView);
            } catch (Exception e) {
            // fail silent
            }
        }
    });
    // add expand/collapse listener
    treeViewer.addTreeListener(new ITreeViewerListener() {

        public void treeCollapsed(TreeExpansionEvent event) {
            // refresh the node to change image
            INode node = (INode) event.getElement();
            node.setExpanded(false);
            TreeViewer viewer = (TreeViewer) event.getSource();
            viewer.update(node, null);
        }

        public void treeExpanded(TreeExpansionEvent event) {
            // refresh the node to change image
            INode node = (INode) event.getElement();
            node.setExpanded(true);
            TreeViewer viewer = (TreeViewer) event.getSource();
            viewer.update(node, null);
        }
    });
    // set new tab as the active one
    _tabFolder.setSelection(_tabFolder.getItemCount() - 1);
    // update detail view
    DatabaseDetailView detailView = (DatabaseDetailView) getSite().getPage().findView(SqlexplorerViewConstants.SQLEXPLORER_DBDETAIL);
    if (detailView != null) {
        // synchronze detail view with new session
        synchronizeDetailView(detailView);
        // bring detail to top of the view stack
        getSite().getPage().bringToTop(detailView);
    }
    // refresh view
    composite.layout();
    _tabFolder.layout();
    _tabFolder.redraw();
    // bring this view to top of the view stack, above detail if needed..
    getSite().getPage().bringToTop(this);
    // add context menu
    final DBTreeActionGroup actionGroup = new DBTreeActionGroup(treeViewer);
    MenuManager menuManager = new MenuManager("DBTreeContextMenu");
    menuManager.setRemoveAllWhenShown(true);
    Menu contextMenu = menuManager.createContextMenu(treeViewer.getTree());
    treeViewer.getTree().setMenu(contextMenu);
    menuManager.addMenuListener(new IMenuListener() {

        public void menuAboutToShow(IMenuManager manager) {
            actionGroup.fillContextMenu(manager);
        }
    });
// if (sessionSelectionMap.containsKey(tabData.session)) {
// tabData.treeViewer.setSelection(sessionSelectionMap.get(tabData.session));
// sessionSelectionMap.remove(tabData.session);
// _allSessions.remove(tabData.session);
// }
}
Also used : INode(net.sourceforge.sqlexplorer.dbstructure.nodes.INode) CTabFolder(org.eclipse.swt.custom.CTabFolder) SQLException(java.sql.SQLException) TreeViewer(org.eclipse.jface.viewers.TreeViewer) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) DragSourceListener(org.eclipse.swt.dnd.DragSourceListener) DBTreeActionGroup(net.sourceforge.sqlexplorer.dbstructure.DBTreeActionGroup) CTabItem(org.eclipse.swt.custom.CTabItem) DragSourceEvent(org.eclipse.swt.dnd.DragSourceEvent) DatabaseNode(net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode) DBTreeLabelProvider(net.sourceforge.sqlexplorer.dbstructure.DBTreeLabelProvider) IDoubleClickListener(org.eclipse.jface.viewers.IDoubleClickListener) SelectionEvent(org.eclipse.swt.events.SelectionEvent) DBTreeContentProvider(net.sourceforge.sqlexplorer.dbstructure.DBTreeContentProvider) Menu(org.eclipse.swt.widgets.Menu) TreeExpansionEvent(org.eclipse.jface.viewers.TreeExpansionEvent) CTabFolder2Adapter(org.eclipse.swt.custom.CTabFolder2Adapter) Composite(org.eclipse.swt.widgets.Composite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Color(org.eclipse.swt.graphics.Color) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ITreeViewerListener(org.eclipse.jface.viewers.ITreeViewerListener) CTabFolderEvent(org.eclipse.swt.custom.CTabFolderEvent) DoubleClickEvent(org.eclipse.jface.viewers.DoubleClickEvent) FillLayout(org.eclipse.swt.layout.FillLayout) SQLException(java.sql.SQLException) SQLCannotConnectException(net.sourceforge.sqlexplorer.SQLCannotConnectException) IMenuListener(org.eclipse.jface.action.IMenuListener) Transfer(org.eclipse.swt.dnd.Transfer) TableNode(net.sourceforge.sqlexplorer.dbstructure.nodes.TableNode) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) SQLCannotConnectException(net.sourceforge.sqlexplorer.SQLCannotConnectException) Display(org.eclipse.swt.widgets.Display)

Aggregations

DatabaseNode (net.sourceforge.sqlexplorer.dbstructure.nodes.DatabaseNode)4 ArrayList (java.util.ArrayList)2 INode (net.sourceforge.sqlexplorer.dbstructure.nodes.INode)2 TableNode (net.sourceforge.sqlexplorer.dbstructure.nodes.TableNode)2 DatabaseStructureView (net.sourceforge.sqlexplorer.plugin.views.DatabaseStructureView)2 SQLException (java.sql.SQLException)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 SQLCannotConnectException (net.sourceforge.sqlexplorer.SQLCannotConnectException)1 ColumnInfoTab (net.sourceforge.sqlexplorer.dbdetail.tab.ColumnInfoTab)1 ColumnPriviligesTab (net.sourceforge.sqlexplorer.dbdetail.tab.ColumnPriviligesTab)1 ConnectionInfoTab (net.sourceforge.sqlexplorer.dbdetail.tab.ConnectionInfoTab)1 ExportedKeysTab (net.sourceforge.sqlexplorer.dbdetail.tab.ExportedKeysTab)1 ImportedKeysTab (net.sourceforge.sqlexplorer.dbdetail.tab.ImportedKeysTab)1 IndexesTab (net.sourceforge.sqlexplorer.dbdetail.tab.IndexesTab)1 PreviewTab (net.sourceforge.sqlexplorer.dbdetail.tab.PreviewTab)1 PrimaryKeysTab (net.sourceforge.sqlexplorer.dbdetail.tab.PrimaryKeysTab)1 PriviligesTab (net.sourceforge.sqlexplorer.dbdetail.tab.PriviligesTab)1 RowCountTab (net.sourceforge.sqlexplorer.dbdetail.tab.RowCountTab)1 RowIdsTab (net.sourceforge.sqlexplorer.dbdetail.tab.RowIdsTab)1