internal TaggerProvider(ITableManagerProvider tableManagerProvider, ITextDocumentFactoryService textDocumentFactoryService, IIssuesFilter issuesFilter, IAnalyzerController analyzerController, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ISonarLanguageRecognizer languageRecognizer, IAnalysisRequester analysisRequester, ILogger logger, IScheduler scheduler) { this.errorTableManager = tableManagerProvider.GetTableManager(StandardTables.ErrorsTable); this.textDocumentFactoryService = textDocumentFactoryService; this.issuesFilter = issuesFilter; this.errorTableManager.AddSource(this, StandardTableColumnDefinitions.DetailsExpander, StandardTableColumnDefinitions.ErrorSeverity, StandardTableColumnDefinitions.ErrorCode, StandardTableColumnDefinitions.ErrorSource, StandardTableColumnDefinitions.BuildTool, StandardTableColumnDefinitions.ErrorSource, StandardTableColumnDefinitions.ErrorCategory, StandardTableColumnDefinitions.Text, StandardTableColumnDefinitions.DocumentName, StandardTableColumnDefinitions.Line, StandardTableColumnDefinitions.Column, StandardTableColumnDefinitions.ProjectName); this.analyzerController = analyzerController; this.dte = serviceProvider.GetService <DTE>(); this.languageRecognizer = languageRecognizer; this.logger = logger; this.scheduler = scheduler; vsStatusBar = serviceProvider.GetService(typeof(IVsStatusbar)) as IVsStatusbar; analysisRequester.AnalysisRequested += OnAnalysisRequested; }
public PreCompiledHeadersEventListener(ICFamilyAnalyzer cFamilyAnalyzer, IActiveDocumentTracker activeDocumentTracker, IScheduler scheduler, ISonarLanguageRecognizer sonarLanguageRecognizer) : this(cFamilyAnalyzer, activeDocumentTracker, scheduler, sonarLanguageRecognizer, new EnvironmentSettings(), new PchCacheCleaner(new FileSystem(), CFamilyHelper.PchFilePath)) { }
internal TaggerProvider(ISonarErrorListDataSource sonarErrorDataSource, ITextDocumentFactoryService textDocumentFactoryService, IIssuesFilter issuesFilter, IAnalyzerController analyzerController, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ISonarLanguageRecognizer languageRecognizer, IAnalysisRequester analysisRequester, IAnalysisIssueVisualizationConverter converter, ILogger logger, IScheduler scheduler) { this.sonarErrorDataSource = sonarErrorDataSource; this.textDocumentFactoryService = textDocumentFactoryService; this.issuesFilter = issuesFilter; this.analyzerController = analyzerController; this.dte = serviceProvider.GetService <DTE>(); this.languageRecognizer = languageRecognizer; this.converter = converter; this.logger = logger; this.scheduler = scheduler; vsStatusBar = serviceProvider.GetService(typeof(IVsStatusbar)) as IVsStatusbar; analysisRequester.AnalysisRequested += OnAnalysisRequested; vsSolution = serviceProvider.GetService(typeof(SVsSolution)) as IVsSolution5; }
internal TaggerProvider(ITableManagerProvider tableManagerProvider, ITextDocumentFactoryService textDocumentFactoryService, ISonarLintDaemon daemon, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, ISonarLintSettings settings, ISonarLanguageRecognizer languageRecognizer, ILogger logger) { this.errorTableManager = tableManagerProvider.GetTableManager(StandardTables.ErrorsTable); this.textDocumentFactoryService = textDocumentFactoryService; this.errorTableManager.AddSource(this, StandardTableColumnDefinitions.DetailsExpander, StandardTableColumnDefinitions.ErrorSeverity, StandardTableColumnDefinitions.ErrorCode, StandardTableColumnDefinitions.ErrorSource, StandardTableColumnDefinitions.BuildTool, StandardTableColumnDefinitions.ErrorSource, StandardTableColumnDefinitions.ErrorCategory, StandardTableColumnDefinitions.Text, StandardTableColumnDefinitions.DocumentName, StandardTableColumnDefinitions.Line, StandardTableColumnDefinitions.Column, StandardTableColumnDefinitions.ProjectName); this.daemon = daemon; this.dte = serviceProvider.GetService <DTE>(); this.settings = settings; this.languageRecognizer = languageRecognizer; this.logger = logger; }
private static MenuCommand CreateCFamilyReproducerCommand(IActiveDocumentLocator documentLocator, ISonarLanguageRecognizer languageRecognizer, IAnalysisRequester analysisRequester, ILogger logger) { var dummyMenuService = new DummyMenuCommandService(); new CFamilyReproducerCommand(dummyMenuService, documentLocator, languageRecognizer, analysisRequester, logger); dummyMenuService.AddedMenuCommands.Count.Should().Be(1); return(dummyMenuService.AddedMenuCommands[0]); }
internal PreCompiledHeadersEventListener(ICFamilyAnalyzer cFamilyAnalyzer, IActiveDocumentTracker activeDocumentTracker, IScheduler scheduler, ISonarLanguageRecognizer sonarLanguageRecognizer, IEnvironmentSettings environmentSettings, IPchCacheCleaner pchCacheCleaner) { this.cFamilyAnalyzer = cFamilyAnalyzer; this.activeDocumentTracker = activeDocumentTracker; this.scheduler = scheduler; this.sonarLanguageRecognizer = sonarLanguageRecognizer; this.pchCacheCleaner = pchCacheCleaner; pchJobTimeoutInMilliseconds = environmentSettings.PCHGenerationTimeoutInMs(60 * 1000); activeDocumentTracker.OnDocumentFocused += OnActiveDocumentFocused; }
/// <summary> /// Initializes a new instance of the <see cref="DisableRuleCommand"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> /// <param name="menuCommandService">Command service to add command to, not null.</param> internal /* for testing */ CFamilyReproducerCommand(IMenuCommandService menuCommandService, IActiveDocumentLocator activeDocumentLocator, ISonarLanguageRecognizer languageRecognizer, IAnalysisRequester analysisRequester, ILogger logger) { if (menuCommandService == null) { throw new ArgumentNullException(nameof(menuCommandService)); } this.activeDocumentLocator = activeDocumentLocator ?? throw new ArgumentNullException(nameof(activeDocumentLocator)); this.sonarLanguageRecognizer = languageRecognizer ?? throw new ArgumentNullException(nameof(languageRecognizer)); this.analysisRequester = analysisRequester ?? throw new ArgumentNullException(nameof(analysisRequester)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); var menuCommandID = new CommandID(CommandSet, CommandId); menuItem = new OleMenuCommand(Execute, null, QueryStatus, menuCommandID); menuCommandService.AddCommand(menuItem); }
public TaggableBufferIndicator(ISonarLanguageRecognizer languageRecognizer) { this.languageRecognizer = languageRecognizer; }