Beispiel #1
0
        public TaggerProvider(
            [Import] ITableManagerProvider tableManagerProvider,
            [Import] ITextDocumentFactoryService textDocumentFactoryService,
            [Import] IVisualLinterOptions options,
            [Import] ILinter linter)
        {
            _tableManager = tableManagerProvider
                            .GetTableManager(StandardTables.ErrorsTable);

            _textDocumentFactoryService = textDocumentFactoryService;

            _linter = linter;

            _optionsMap.Add(".html", () => options.EnableHtmlLanguageSupport);
            _optionsMap.Add(".js", () => options.EnableJavaScriptLanguageSupport);
            _optionsMap.Add(".jsx", () => options.EnableReactLanguageSupport);
            _optionsMap.Add(".vue", () => options.EnableVueLanguageSupport);

            var columns = new[]
            {
                StandardTableColumnDefinitions.BuildTool,
                StandardTableColumnDefinitions.Column,
                StandardTableColumnDefinitions.DetailsExpander,
                StandardTableColumnDefinitions.DocumentName,
                StandardTableColumnDefinitions.ErrorCategory,
                StandardTableColumnDefinitions.ErrorCode,
                StandardTableColumnDefinitions.ErrorSeverity,
                StandardTableColumnDefinitions.ErrorSource,
                StandardTableColumnDefinitions.Line,
                StandardTableColumnDefinitions.Text
            };

            _tableManager.AddSource(this, columns);
        }
Beispiel #2
0
 static EslintHelper()
 {
     Options = ServiceProvider.GlobalProvider.GetMefService <IVisualLinterOptions>() ??
               throw new Exception("exception: helper unable to retrieve options");
 }
 static OutputWindowHelper()
 {
     Options = ServiceProvider.GlobalProvider.GetMefService <IVisualLinterOptions>() ??
               throw new Exception("exception: logger unable to retrieve options");
 }
 protected ViewModelBase()
 {
     Options = ServiceProvider.GlobalProvider.GetMefService <IVisualLinterOptions>() ??
               throw new Exception("exception: unable to retrieve options");
 }