Example #1
0
        public static ContextActionsPopup MakePopupWithDerivedClasses(IClass baseClass)
        {
            var derivedClassesTree = RefactoringService.FindDerivedClassesTree(baseClass);
            var popupViewModel     = new ContextActionsViewModel {
                Title = MenuService.ConvertLabel(StringParser.Parse(
                                                     "${res:SharpDevelop.Refactoring.ClassesDerivingFrom}", new StringTagPair("Name", baseClass.Name)))
            };

            popupViewModel.Actions = new PopupTreeViewModelBuilder().BuildTreeViewModel(derivedClassesTree);
            return(new ContextActionsPopup {
                Actions = popupViewModel, Symbol = baseClass
            });
        }
Example #2
0
        public static ContextActionsPopup MakePopupWithOverrides(IMember member)
        {
            var derivedClassesTree = RefactoringService.FindDerivedClassesTree(member.DeclaringType);
            var popupViewModel     = new ContextActionsViewModel {
                Title = MenuService.ConvertLabel(StringParser.Parse(
                                                     "${res:SharpDevelop.Refactoring.OverridesOf}", new string[, ] {
                    { "Name", member.FullyQualifiedName }
                }))
            };

            popupViewModel.Actions = new OverridesPopupTreeViewModelBuilder(member).BuildTreeViewModel(derivedClassesTree);
            return(new ContextActionsPopup {
                Actions = popupViewModel, Symbol = member
            });
        }