Ejemplo n.º 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 };
		}
Ejemplo n.º 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 };
		}
Ejemplo n.º 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 };
		}
Ejemplo n.º 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
            });
        }
Ejemplo n.º 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
            });
        }
Ejemplo n.º 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
            });
        }