コード例 #1
0
 private void RenameClicked(object sender, EventArgs args)
 {
     //GotoAction ga = new GotoAction();
     if (CodeCompletionActionsManager.CanGoTo(CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea))
     {
         CodeCompletionActionsManager.Rename(CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea);
     }
 }
コード例 #2
0
        private void OpeningContextMenu(object sender, CancelEventArgs args)
        {
            GotoAction ga = new GotoAction();
            TextArea   ta = CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;

            this.cmGotoDefinition.Enabled      = CodeCompletionActionsManager.CanGoTo(ta);
            this.cmGotoRealization.Enabled     = CodeCompletionActionsManager.CanGoToRealization(ta);
            this.cmFindAllReferences.Enabled   = CodeCompletionActionsManager.CanFindReferences(ta);
            this.cmGenerateRealization.Enabled = CodeCompletionActionsManager.CanGenerateRealization(ta);
            this.cmRename.Enabled = CodeCompletionActionsManager.CanGoTo(ta);
        }
コード例 #3
0
 void tsIntellisense_DropDownOpened(object sender, EventArgs e)
 {
     if (UserOptions.AllowCodeCompletion)
     {
         //GotoAction ga = new GotoAction();
         TextArea ta = CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea;
         this.tsGotoDefinition.Enabled    = CodeCompletionActionsManager.CanGoTo(ta);
         this.tsGotoRealization.Enabled   = CodeCompletionActionsManager.CanGoToRealization(ta);
         this.tsFindAllReferences.Enabled = CodeCompletionActionsManager.CanFindReferences(ta);
         //this.cmFindAllReferences.Enabled = ga.CanFindReferences(ta);
         this.miGenerateRealization.Enabled = CodeCompletionActionsManager.CanGenerateRealization(ta);
     }
 }
コード例 #4
0
        public static void DefinitionByMouseClickManager_TextAreaMouseDown(object sender, EventArgs e)
        {
            TextArea textArea = (TextArea)sender;

            if (Control.ModifierKeys == Keys.Control && textArea.SelectionManager.SelectionCollection.Count == 0)
            {
                gotoInProgress = true;
                if (CodeCompletionActionsManager.CanGoToRealization(textArea))
                {
                    CodeCompletionActionsManager.GotoRealization(textArea);
                }
                else if (CodeCompletionActionsManager.CanGoTo(textArea))
                {
                    CodeCompletionActionsManager.GotoDefinition(textArea);
                }
                gotoInProgress = false;
            }
        }