use of org.talend.sqlbuilder.actions.OpenNewEditorAction in project tdi-studio-se by Talend.
the class DBStructureComposite method makeActions.
/**
* qianbing Comment method "makeActions". Makes actions
*/
private void makeActions() {
generateSelectAction = new GenerateSelectSQLAction(treeViewer, builderDialog, false);
openNewEditorAction = new OpenNewEditorAction(treeViewer, builderDialog, builderDialog.getConnParameters(), false);
//$NON-NLS-1$
refreshConnectionAction = new RefreshConnectionAction(treeViewer, Messages.getString("DBStructureComposite.Refresh"));
metadataRefreshAction = new MetadataRefreshAction(treeViewer, builderDialog);
openQueryAction = new OpenQueryAction(treeViewer, builderDialog, builderDialog.getConnParameters());
deleteQueryAction = new DeleteQueryAction(treeViewer, builderDialog);
showQueryPropertyAction = new ShowQueryPropertyAction(treeViewer, builderDialog);
doubleClickAction = new OpenQueryAction(treeViewer, builderDialog, builderDialog.getConnParameters());
}
use of org.talend.sqlbuilder.actions.OpenNewEditorAction in project tdi-studio-se by Talend.
the class DBStructureComposite method openNewQueryEditor.
/**
* qzhang Comment method "openNewQueryEditor".
*/
public void openNewQueryEditor() {
final ConnectionParameters connParameters = builderDialog.getConnParameters();
final RepositoryNode selectQuery = this.treeLabelProvider.getSelectedExtReposiotryNode();
expandNodes = new ArrayList<RepositoryNode>();
getNeedExpandedNodes(selectQuery);
if (expandNodes.size() > 0) {
treeViewer.setExpandedElements(expandNodes.toArray(new Object[0]));
}
if (treeViewer.getTree().getItemCount() > 0) {
treeViewer.getTree().setSelection(treeViewer.getTree().getItem(0));
}
Action tempOpenNewEditorAction = new OpenNewEditorAction(treeViewer, builderDialog, connParameters, true);
tempOpenNewEditorAction.run();
}
use of org.talend.sqlbuilder.actions.OpenNewEditorAction in project tdi-studio-se by Talend.
the class DBStructureComposite method openNewEditor.
public void openNewEditor() {
treeViewer.getTree().setSelection(treeViewer.getTree().getItem(0));
Action tempOpenNewEditorAction = new OpenNewEditorAction(treeViewer, builderDialog, builderDialog.getConnParameters(), false);
tempOpenNewEditorAction.run();
treeViewer.getTree().deselectAll();
}
Aggregations