public void ShowInsertJoin()
        {
            var anal = m_anal;

            if (anal != null && anal.UsedTables.Count > 0)
            {
                m_editor.CallDatabaseConnectionNeeded();
                InsertJoinForm.Run(anal, m_editor, m_editor.Connection.Settings.CodeCompletion());
            }
        }
Example #2
0
        public static void Run(SqlEditorAnalyser anal, CodeEditor editor, CodeCompletionSettings settings)
        {
            var win = new InsertJoinForm(anal, settings);

            if (win.ShowDialogEx() == DialogResult.OK)
            {
                string text = win.GetSqlText();
                editor.InsertTextOnCursor(text);
                editor.ActiveTextAreaControl.Caret.Position = editor.Document.OffsetToPosition(editor.ActiveTextAreaControl.Caret.Offset + text.Length);
            }
        }