public VisualStudioDiagnosticListTable(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspace workspace,
            IDiagnosticService diagnosticService,
            ExternalErrorDiagnosticUpdateSource errorSource,
            ITableManagerProvider provider) :
            this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider)
        {
            ConnectWorkspaceEvents();

            _errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
            if (_errorList == null)
            {
                AddInitialTableSource(workspace.CurrentSolution, _liveTableSource);
                return;
            }

            _errorList.PropertyChanged += OnErrorListPropertyChanged;
            AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource());
            SuppressionStateColumnDefinition.SetDefaultFilter(_errorList.TableControl);

            if (ErrorListHasFullSolutionAnalysisButton())
            {
                SetupErrorListFullSolutionAnalysis(workspace);
            }
        }
示例#2
0
        public VisualStudioSuppressionFixService(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspaceImpl workspace,
            IDiagnosticAnalyzerService diagnosticService,
            ICodeFixService codeFixService,
            ICodeActionEditHandlerService editHandlerService,
            IVisualStudioDiagnosticListSuppressionStateService suppressionStateService,
            IUIThreadOperationExecutor uiThreadOperationExecutor,
            IVsHierarchyItemManager vsHierarchyItemManager)
        {
            _workspace                    = workspace;
            _diagnosticService            = diagnosticService;
            _buildErrorDiagnosticService  = workspace.ExternalErrorDiagnosticUpdateSource;
            _codeFixService               = codeFixService;
            _suppressionStateService      = (VisualStudioDiagnosticListSuppressionStateService)suppressionStateService;
            _editHandlerService           = editHandlerService;
            _uiThreadOperationExecutor    = uiThreadOperationExecutor;
            _vsHierarchyItemManager       = vsHierarchyItemManager;
            _fixMultipleOccurencesService = workspace.Services.GetService <IFixMultipleOccurrencesService>();
            _projectMap                   = workspace.Services.GetService <IHierarchyItemToProjectIdMap>();

            var errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;

            _tableControl = errorList?.TableControl;
        }
示例#3
0
            public InProgressState(ExternalErrorDiagnosticUpdateSource owner, Solution solution)
            {
                _owner   = owner;
                Solution = solution;

                // let people know build has started
                _owner.RaiseBuildProgressChanged(BuildProgress.Started);
            }
示例#4
0
            public BuildTableDataSource(Workspace workspace, ExternalErrorDiagnosticUpdateSource errorSource) :
                base(workspace)
            {
                _workspace        = workspace;
                _buildErrorSource = errorSource;

                ConnectToBuildUpdateSource(errorSource);
            }
            /// this is for test only
            private VisualStudioDiagnosticListTable(Workspace workspace, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider)
                : base(workspace, provider)
            {
                _liveTableSource  = null !;
                _buildTableSource = null !;
                _errorList        = null !;

                AddInitialTableSource(workspace.CurrentSolution, new BuildTableDataSource(workspace, errorSource));
            }
 private VisualStudioDiagnosticListTable(
     Workspace workspace,
     IDiagnosticService diagnosticService,
     ExternalErrorDiagnosticUpdateSource errorSource,
     ITableManagerProvider provider) :
     base(workspace, diagnosticService, provider)
 {
     _liveTableSource = new LiveTableDataSource(workspace, diagnosticService, IdentifierString);
     _buildTableSource = new BuildTableDataSource(workspace, errorSource);
 }
        public ProjectExternalErrorReporter(ProjectId projectId, string errorCodePrefix, IServiceProvider serviceProvider)
        {
            _projectId = projectId;
            _errorCodePrefix = errorCodePrefix;
            _diagnosticProvider = serviceProvider.GetMefService<ExternalErrorDiagnosticUpdateSource>();
            _workspace = serviceProvider.GetMefService<VisualStudioWorkspaceImpl>();

            Debug.Assert(_diagnosticProvider != null);
            Debug.Assert(_workspace != null);
        }
 private VisualStudioDiagnosticListTable(
     SVsServiceProvider serviceProvider,
     Workspace workspace,
     IDiagnosticService diagnosticService,
     ExternalErrorDiagnosticUpdateSource errorSource,
     ITableManagerProvider provider) :
     base(serviceProvider, workspace, diagnosticService, provider)
 {
     _liveTableSource = new LiveTableDataSource(serviceProvider, workspace, diagnosticService, IdentifierString);
     _buildTableSource = new BuildTableDataSource(workspace, errorSource);
 }
            private void ConnectToBuildUpdateSource(ExternalErrorDiagnosticUpdateSource errorSource)
            {
                if (errorSource == null)
                {
                    return;
                }

                SetStableState(errorSource.IsInProgress);

                errorSource.BuildStarted += OnBuildStarted;
            }
示例#10
0
 public CPSProjectFactory(
     VisualStudioProjectFactory projectFactory,
     VisualStudioWorkspaceImpl workspace,
     IProjectCodeModelFactory projectCodeModelFactory,
     [Import(AllowDefault = true)] /* not present in unit tests */ ExternalErrorDiagnosticUpdateSource externalErrorDiagnosticUpdateSource)
 {
     _projectFactory                      = projectFactory;
     _workspace                           = workspace;
     _projectCodeModelFactory             = projectCodeModelFactory;
     _externalErrorDiagnosticUpdateSource = externalErrorDiagnosticUpdateSource;
 }
示例#11
0
                private void ConnectToBuildUpdateSource(ExternalErrorDiagnosticUpdateSource errorSource)
                {
                    if (errorSource == null)
                    {
                        // it can be null in unit test
                        return;
                    }

                    SetStableState(errorSource.IsInProgress);

                    errorSource.BuildProgressChanged += OnBuildProgressChanged;
                }
        public VisualStudioDiagnosticListTable(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspace workspace,
            IDiagnosticService diagnosticService,
            ExternalErrorDiagnosticUpdateSource errorSource,
            ITableManagerProvider provider) :
            this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider)
        {
            ConnectWorkspaceEvents();

            _errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
            if (_errorList == null)
            {
                AddInitialTableSource(workspace.CurrentSolution, _liveTableSource);
                return;
            }

            _errorList.PropertyChanged += OnErrorListPropertyChanged;
            AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource());
            SuppressionStateColumnDefinition.SetDefaultFilter(_errorList.TableControl);
        }
        public VisualStudioDiagnosticListTable(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspace workspace,
            IDiagnosticService diagnosticService,
            ExternalErrorDiagnosticUpdateSource errorSource,
            ITableManagerProvider provider) :
            this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider)
        {
            ConnectWorkspaceEvents();

            _errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
            if (_errorList == null)
            {
                AddInitialTableSource(workspace.CurrentSolution, _liveTableSource);
                return;
            }

            _errorList.PropertyChanged += OnErrorListPropertyChanged;

            AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource());
        }
        public VisualStudioSuppressionFixService(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspaceImpl workspace,
            IDiagnosticAnalyzerService diagnosticService,
            ExternalErrorDiagnosticUpdateSource buildErrorDiagnosticService,
            ICodeFixService codeFixService,
            ICodeActionEditHandlerService editHandlerService,
            IVisualStudioDiagnosticListSuppressionStateService suppressionStateService,
            IWaitIndicator waitIndicator)
        {
            _workspace = workspace;
            _diagnosticService = diagnosticService;
            _buildErrorDiagnosticService = buildErrorDiagnosticService;
            _codeFixService = codeFixService;
            _suppressionStateService = (VisualStudioDiagnosticListSuppressionStateService)suppressionStateService;
            _editHandlerService = editHandlerService;
            _waitIndicator = waitIndicator;
            _fixMultipleOccurencesService = workspace.Services.GetService<IFixMultipleOccurrencesService>();

            var errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
            _tableControl = errorList?.TableControl;
        }
        public VisualStudioSuppressionFixService(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspaceImpl workspace,
            IDiagnosticAnalyzerService diagnosticService,
            ExternalErrorDiagnosticUpdateSource buildErrorDiagnosticService,
            ICodeFixService codeFixService,
            ICodeActionEditHandlerService editHandlerService,
            IVisualStudioDiagnosticListSuppressionStateService suppressionStateService,
            IWaitIndicator waitIndicator)
        {
            _workspace                    = workspace;
            _diagnosticService            = diagnosticService;
            _buildErrorDiagnosticService  = buildErrorDiagnosticService;
            _codeFixService               = codeFixService;
            _suppressionStateService      = (VisualStudioDiagnosticListSuppressionStateService)suppressionStateService;
            _editHandlerService           = editHandlerService;
            _waitIndicator                = waitIndicator;
            _fixMultipleOccurencesService = workspace.Services.GetService <IFixMultipleOccurrencesService>();

            var errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;

            _tableControl = errorList?.TableControl;
        }
示例#16
0
 public static VisualStudioDiagnosticListTable Create(Workspace workspace, IThreadingContext threadingContext, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider)
 {
     return(new VisualStudioDiagnosticListTable(workspace, threadingContext, errorSource, provider));
 }
示例#17
0
                public BuildTableDataSource(Workspace workspace, IThreadingContext threadingContext, ExternalErrorDiagnosticUpdateSource errorSource)
                    : base(workspace, threadingContext)
                {
                    _buildErrorSource = errorSource;

                    ConnectToBuildUpdateSource(errorSource);
                }
示例#18
0
 public InProgressState(ExternalErrorDiagnosticUpdateSource owner, Solution solution)
 {
     _owner   = owner;
     Solution = solution;
 }
 /// this is for test only
 internal VisualStudioDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider) :
     this(null, workspace, diagnosticService, errorSource, provider)
 {
     AddInitialTableSource(workspace.CurrentSolution, _buildTableSource);
 }