コード例 #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 };
		}
コード例 #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 };
		}
コード例 #3
0
		public static ContextActionsPopup MakePopupWithBaseClasses(IClass @class)
		{
			var baseClassList = @class.ClassInheritanceTree.Where(
				baseClass => (baseClass != @class) && (baseClass.CompilationUnit != null) && (baseClass.CompilationUnit.FileName != null));
			var popupViewModel = new ContextActionsViewModel { Title = MenuService.ConvertLabel(StringParser.Parse(
				"${res:SharpDevelop.Refactoring.BaseClassesOf}", new StringTagPair("Name", @class.Name)))};
			popupViewModel.Actions = new PopupListViewModelBuilder().BuildListViewModel(baseClassList);
			return new ContextActionsPopup { Actions = popupViewModel, Symbol = @class };
		}
コード例 #4
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
            });
        }
コード例 #5
0
        public static ContextActionsPopup MakePopupWithBaseClasses(IClass @class)
        {
            var baseClassList = @class.ClassInheritanceTree.Where(
                baseClass => (baseClass != @class) && (baseClass.CompilationUnit != null) && (baseClass.CompilationUnit.FileName != null));
            var popupViewModel = new ContextActionsViewModel {
                Title = MenuService.ConvertLabel(StringParser.Parse(
                                                     "${res:SharpDevelop.Refactoring.BaseClassesOf}", new StringTagPair("Name", @class.Name)))
            };

            popupViewModel.Actions = new PopupListViewModelBuilder().BuildListViewModel(baseClassList);
            return(new ContextActionsPopup {
                Actions = popupViewModel, Symbol = @class
            });
        }
コード例 #6
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
            });
        }