private void RenameClicked(object sender, EventArgs args) { //GotoAction ga = new GotoAction(); if (CodeCompletionActionsManager.CanGoTo(CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea)) { CodeCompletionActionsManager.Rename(CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea); } }
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); }
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); } }
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; } }