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 }; }
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 }; }
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 }; }
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 }); }
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 }); }
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 }); }