Search in sources :

Example 1 with OpenNewEditorAction

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());
}
Also used : MetadataRefreshAction(org.talend.sqlbuilder.actions.MetadataRefreshAction) DeleteQueryAction(org.talend.sqlbuilder.actions.DeleteQueryAction) GenerateSelectSQLAction(org.talend.sqlbuilder.actions.GenerateSelectSQLAction) OpenQueryAction(org.talend.sqlbuilder.actions.OpenQueryAction) OpenNewEditorAction(org.talend.sqlbuilder.actions.OpenNewEditorAction) ShowQueryPropertyAction(org.talend.sqlbuilder.actions.ShowQueryPropertyAction)

Example 2 with OpenNewEditorAction

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();
}
Also used : OpenQueryAction(org.talend.sqlbuilder.actions.OpenQueryAction) SelectionProviderAction(org.eclipse.ui.actions.SelectionProviderAction) MetadataRefreshAction(org.talend.sqlbuilder.actions.MetadataRefreshAction) GenerateSelectSQLAction(org.talend.sqlbuilder.actions.GenerateSelectSQLAction) DeleteQueryAction(org.talend.sqlbuilder.actions.DeleteQueryAction) OpenNewEditorAction(org.talend.sqlbuilder.actions.OpenNewEditorAction) Action(org.eclipse.jface.action.Action) ShowQueryPropertyAction(org.talend.sqlbuilder.actions.ShowQueryPropertyAction) ConnectionParameters(org.talend.core.sqlbuilder.util.ConnectionParameters) SqlBuilderRepositoryObject(org.talend.sqlbuilder.dbstructure.SqlBuilderRepositoryObject) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) OpenNewEditorAction(org.talend.sqlbuilder.actions.OpenNewEditorAction) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode)

Example 3 with OpenNewEditorAction

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();
}
Also used : OpenQueryAction(org.talend.sqlbuilder.actions.OpenQueryAction) SelectionProviderAction(org.eclipse.ui.actions.SelectionProviderAction) MetadataRefreshAction(org.talend.sqlbuilder.actions.MetadataRefreshAction) GenerateSelectSQLAction(org.talend.sqlbuilder.actions.GenerateSelectSQLAction) DeleteQueryAction(org.talend.sqlbuilder.actions.DeleteQueryAction) OpenNewEditorAction(org.talend.sqlbuilder.actions.OpenNewEditorAction) Action(org.eclipse.jface.action.Action) ShowQueryPropertyAction(org.talend.sqlbuilder.actions.ShowQueryPropertyAction) OpenNewEditorAction(org.talend.sqlbuilder.actions.OpenNewEditorAction)

Aggregations

DeleteQueryAction (org.talend.sqlbuilder.actions.DeleteQueryAction)3 GenerateSelectSQLAction (org.talend.sqlbuilder.actions.GenerateSelectSQLAction)3 MetadataRefreshAction (org.talend.sqlbuilder.actions.MetadataRefreshAction)3 OpenNewEditorAction (org.talend.sqlbuilder.actions.OpenNewEditorAction)3 OpenQueryAction (org.talend.sqlbuilder.actions.OpenQueryAction)3 ShowQueryPropertyAction (org.talend.sqlbuilder.actions.ShowQueryPropertyAction)3 Action (org.eclipse.jface.action.Action)2 SelectionProviderAction (org.eclipse.ui.actions.SelectionProviderAction)2 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)1 ConnectionParameters (org.talend.core.sqlbuilder.util.ConnectionParameters)1 IRepositoryNode (org.talend.repository.model.IRepositoryNode)1 RepositoryNode (org.talend.repository.model.RepositoryNode)1 SqlBuilderRepositoryObject (org.talend.sqlbuilder.dbstructure.SqlBuilderRepositoryObject)1