Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
     }
 }