Ejemplo n.º 1
0
        public SettingsDialog( AddIn addIn )
            : base(addIn)
        {
            KeyName = "LannSettings";
            DisplayName = "Laan Settings";
            DescriptivePhrase = "Set preferences for Laan SMSS Addin";

            ButtonText = "Laan Settings";
            //ToolTip = "Formats the current file";
        }
Ejemplo n.º 2
0
        public OutputOnly( AddIn addIn )
            : base(addIn)
        {
            KeyName = "LaanSqlPareseOnly";
            DisplayName = "Output Parsed SQL";
            DescriptivePhrase = "Outputting Parsed SQL";

            ButtonText = "&Parse SQL";
            ToolTip = "parses and outputs SQL";
            ImageIndex = 59;
            KeyboardBinding = "Text Editor::Ctrl+Shift+E";
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the SqlTemplateOptionAction class.
        /// </summary>
        public SqlTemplateOptionAction(AddIn addIn)
            : base(addIn)
        {
            KeyName = "LaanSqlTemplateOptionView";
            DisplayName = "View Laan Sql Templates";
            DescriptivePhrase = "Viewing Laan Sql Templates";

            ButtonText = "Sql Template Designer";
            ToolTip = "View Laan Sql Templates";
            ImageIndex = 59;
            KeyboardBinding = "Text Editor::Ctrl+Alt+O";
        }
Ejemplo n.º 4
0
        public SqlTemplating(AddIn addIn)
            : base(addIn)
        {
            Templates = LoadTemplates();

            KeyName = "LaanSqlTemplating";
            DisplayName = "Insert Template";
            DescriptivePhrase = "Inserting Template";

            ButtonText = "Insert &Template";
            ToolTip = "Inserts a template at the cursor";
            ImageIndex = 59;
            KeyboardBinding = "Text Editor::`";
        }
Ejemplo n.º 5
0
        public SaveResultAs2( AddIn addIn )
            : base(addIn)
        {
            KeyName = "LannSqlSaveResultsAs2";
            DisplayName = "Save Results As";
            DescriptivePhrase = "Save Results to log file and optionally copy file to clipboard";
            ButtonText = "Save Results to .log";
            //ToolTip = "hi there";

            SaveResultsAsPatternName = Settings.Constants.SaveResultsAsPattern2;
            SaveResultsAsPatternDefault = Settings.Defaults.SaveResultsAsPattern2;
            SaveResultsAsCopyToClipboardName = Settings.Constants.SaveResultsCopyToClipboard2;
            SaveResultsAsCopyToClipboardDefault = Settings.Defaults.SaveResultsCopyToClipboard2;
        }
Ejemplo n.º 6
0
        // Experimental (not working!)
        //private static int GetStartIndent( TextDocument textDocument )
        //{
        //    var text = textDocument.Selection.Text;
        //    int index = 0;
        //    while ( ( text[ index ] == ' ' ) && ( text[ index ] != '\n' ) )
        //        index++;
        //    return index + textDocument.Selection.AnchorColumn;
        //}
        public SqlFormatter(AddIn addIn)
            : base(addIn)
        {
            _engine = new FormattingEngine();
            _engine.IndentStep = 0; // experimental: GetStartIndent( textDocument ) / engine.TabSize;

            KeyName = "LaanSqlFormat";
            DisplayName = "Format SQL";
            DescriptivePhrase = "Formatting SQL";

            ButtonText = "Format S&QL";
            ToolTip = "Formats the current file";
            ImageIndex = 59;
            KeyboardBinding = "Text Editor::Ctrl+`";
        }
Ejemplo n.º 7
0
 public DropDownList( AddIn addIn )
     : base(addIn)
 {
 }
Ejemplo n.º 8
0
 public ParseOnly( AddIn addIn )
     : base(addIn)
 {
 }
Ejemplo n.º 9
0
 public ScopedUndoContext( AddIn addIn, string name )
 {
     _addIn = addIn;
     _addIn.OpenUndoContext( name, true );
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the Action class.
 /// </summary>
 public BaseAction(AddIn addIn)
 {
     AddIn          = addIn;
     ImageIndex     = AddIn.DefaultImageIndex;
     ShowWaitCursor = false;
 }
Ejemplo n.º 11
0
 public ScopedUndoContext(AddIn addIn, string name)
 {
     _addIn = addIn;
     _addIn.OpenUndoContext(name, true);
 }