MenuCommand MakeFindOverridesItem(IMember member) { if (member == null || !member.IsOverridable) { return(null); } var item = new MenuCommand(StringParser.Parse("${res:SharpDevelop.Refactoring.FindOverridesCommand}")); //item.Image = ClassBrowserIconService.Method.Bitmap; item.ShortcutKeys = Keys.F6; item.Click += delegate { ContextActionsHelper.MakePopupWithOverrides(member).OpenAtCaretAndFocus(); }; return(item); }
protected override void RunImpl(ITextEditor editor, int offset, ResolveResult symbol) { var classUnderCaret = GetClass(symbol); if (classUnderCaret != null) { ContextActionsHelper.MakePopupWithDerivedClasses(classUnderCaret).OpenAtCaretAndFocus(); return; } var memberUnderCaret = GetMember(symbol); if (memberUnderCaret != null && memberUnderCaret.IsOverridable) { ContextActionsHelper.MakePopupWithOverrides(memberUnderCaret).OpenAtCaretAndFocus(); return; } MessageService.ShowError("${res:ICSharpCode.Refactoring.NoClassOrOverridableSymbolUnderCursorError}"); }