/** * Since the catalog has changed, it is necessary to reload the schema info and expand the tables node * in the tree. Saves the user a few clicks. * * @param session * the session whose ObjectTreePanel should be updated * @param selectedCatalog * the catalog that was selected. */ private void expandTablesForCatalog(ISession session, String selectedCatalog) { IObjectTreeAPI api = session.getObjectTreeAPIOfActiveSessionWindow(); api.refreshTree(true); if (api.selectInObjectTree(selectedCatalog, null, new FilterMatcher("TABLE", null))) { ObjectTreeNode[] nodes = api.getSelectedNodes(); if (nodes.length > 0) { ObjectTreeNode tableNode = nodes[0]; // send a tree expansion event to the object tree api.expandNode(tableNode); } } } }
/** * Since the catalog has changed, it is necessary to reload the schema info and expand the tables node * in the tree. Saves the user a few clicks. * * @param session * the session whose ObjectTreePanel should be updated * @param selectedCatalog * the catalog that was selected. */ private void expandTablesForCatalog(ISession session, String selectedCatalog) { IObjectTreeAPI api = session.getObjectTreeAPIOfActiveSessionWindow(); api.refreshTree(true); if (api.selectInObjectTree(selectedCatalog, null, new FilterMatcher("TABLE", null))) { ObjectTreeNode[] nodes = api.getSelectedNodes(); if (nodes.length > 0) { ObjectTreeNode tableNode = nodes[0]; // send a tree expansion event to the object tree api.expandNode(tableNode); } } } }
success = objectTree.selectInObjectTree(catSchemObj.get(0), catSchemObj.get(1), new FilterMatcher(catSchemObj.get(2), null)); if (success)
success = objectTree.selectInObjectTree(catSchemObj.get(0), catSchemObj.get(1), new FilterMatcher(catSchemObj.get(2), null)); if (success)