Exemplo n.º 1
0
 public MoveToFolderRefactoringAction(
     IRewritingManager rewritingManager,
     IAnnotationUpdater annotationUpdater)
     : base(rewritingManager)
 {
     _annotationUpdater = annotationUpdater;
 }
 public AnnotateDeclarationRefactoringAction(
     IRewritingManager rewritingManager,
     IAnnotationUpdater annotationUpdater,
     IAttributesUpdater attributesUpdater)
     : base(rewritingManager)
 {
     _annotationUpdater = annotationUpdater;
     _attributesUpdater = attributesUpdater;
 }
Exemplo n.º 3
0
        public TestExplorerViewModel(ISelectionService selectionService,
                                     TestExplorerModel model,
                                     IClipboardWriter clipboard,
                                // ReSharper disable once UnusedParameter.Local - left in place because it will likely be needed for app wide font settings, etc.
#pragma warning disable IDE0060 // Remove unused parameter
                                     IConfigurationService <Configuration> configService,
#pragma warning restore IDE0060 // Remove unused parameter
                                     ISettingsFormFactory settingsFormFactory,
                                     IRewritingManager rewritingManager,
                                     IAnnotationUpdater annotationUpdater)
        {
            _clipboard           = clipboard;
            _settingsFormFactory = settingsFormFactory;

            NavigateCommand              = new NavigateCommand(selectionService);
            RunSingleTestCommand         = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteSingleTestCommand, CanExecuteSingleTest);
            RunSelectedTestsCommand      = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteSelectedTestsCommand, CanExecuteSelectedCommands);
            RunSelectedGroupCommand      = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteRunSelectedGroupCommand, CanExecuteGroupCommand);
            CancelTestRunCommand         = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCancelTestRunCommand, CanExecuteCancelTestRunCommand);
            ResetResultsCommand          = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteResetResultsCommand, CanExecuteResetResultsCommand);
            CopyResultsCommand           = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCopyResultsCommand);
            OpenTestSettingsCommand      = new DelegateCommand(LogManager.GetCurrentClassLogger(), OpenSettings);
            CollapseAllCommand           = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCollapseAll);
            ExpandAllCommand             = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteExpandAll);
            IgnoreTestCommand            = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteIgnoreTestCommand, CanExecuteIgnoreTestCommand);
            UnignoreTestCommand          = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteUnignoreTestCommand, CanExecuteUnignoreTestCommand);
            IgnoreSelectedTestsCommand   = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteIgnoreSelectedTestsCommand, CanExecuteIgnoreSelectedTests);
            UnignoreSelectedTestsCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteUnignoreSelectedTestsCommand, CanExecuteUnignoreSelectedTests);
            IgnoreGroupCommand           = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteIgnoreGroupCommand, CanExecuteIgnoreGroupCommand);
            UnignoreGroupCommand         = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteUnignoreGroupCommand, CanExecuteUnignoreGroupCommand);

            RewritingManager  = rewritingManager;
            AnnotationUpdater = annotationUpdater;

            Model = model;

            if (CollectionViewSource.GetDefaultView(Model.Tests) is ListCollectionView tests)
            {
                tests.SortDescriptions.Add(new SortDescription("QualifiedName.QualifiedModuleName.Name", ListSortDirection.Ascending));
                tests.SortDescriptions.Add(new SortDescription("QualifiedName.MemberName", ListSortDirection.Ascending));
                tests.IsLiveFiltering = true;
                tests.IsLiveGrouping  = true;
                Tests = tests;
            }



            OnPropertyChanged(nameof(Tests));
            TestGrouping = TestExplorerGrouping.Outcome;

            OutcomeFilter = TestExplorerOutcomeFilter.All;
        }
        public NoIndentAnnotationCommand(
            ISelectedDeclarationProvider selectedDeclarationProvider,
            IRewritingManager rewritingManager,
            IAnnotationUpdater annotationUpdater,
            IVbeEvents vbeEvents)
            : base(vbeEvents)
        {
            _selectedDeclarationProvider = selectedDeclarationProvider;
            _rewritingManager            = rewritingManager;
            _annotationUpdater           = annotationUpdater;

            AddToCanExecuteEvaluation(SpecialEvaluateCanExecute);
        }
Exemplo n.º 5
0
 public IgnoreOnceQuickFix(IAnnotationUpdater annotationUpdater, RubberduckParserState state, IEnumerable <IInspection> inspections)
     : base(inspections.Select(s => s.GetType()).Where(i => i.CustomAttributes.All(a => a.AttributeType != typeof(CannotAnnotateAttribute))).ToArray())
 {
     _state             = state;
     _annotationUpdater = annotationUpdater;
 }
Exemplo n.º 6
0
 public RemoveDuplicatedAnnotationQuickFix(IAnnotationUpdater annotationUpdater)
     : base(typeof(DuplicatedAnnotationInspection))
 {
     _annotationUpdater = annotationUpdater;
 }
Exemplo n.º 7
0
 public AddAttributeAnnotationQuickFix(IAnnotationUpdater annotationUpdater, IAttributeAnnotationProvider attributeAnnotationProvider)
     : base(typeof(MissingModuleAnnotationInspection), typeof(MissingMemberAnnotationInspection))
 {
     _annotationUpdater           = annotationUpdater;
     _attributeAnnotationProvider = attributeAnnotationProvider;
 }
 public AdjustAttributeAnnotationQuickFix(IAnnotationUpdater annotationUpdater, IAttributeAnnotationProvider attributeAnnotationProvider)
     : base(typeof(AttributeValueOutOfSyncInspection))
 {
     _annotationUpdater           = annotationUpdater;
     _attributeAnnotationProvider = attributeAnnotationProvider;
 }
 public RemoveAnnotationQuickFix(IAnnotationUpdater annotationUpdater)
     : base(typeof(MissingAttributeInspection))
 {
     _annotationUpdater = annotationUpdater;
 }
Exemplo n.º 10
0
 public AnnotateEntryPointQuickFix(IAnnotationUpdater annotationUpdater, RubberduckParserState state)
     : base(new[] { typeof(Inspections.Concrete.ProcedureNotUsedInspection) }.ToArray())
 {
     _state             = state;
     _annotationUpdater = annotationUpdater;
 }