• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Shell.ErrorListProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.VisualStudio.Shell.ErrorListProvider的典型用法代码示例。如果您正苦于以下问题:C# ErrorListProvider类的具体用法?C# ErrorListProvider怎么用?C# ErrorListProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ErrorListProvider类属于Microsoft.VisualStudio.Shell命名空间,在下文中一共展示了ErrorListProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialize

        protected override void Initialize()
        {
            Debug.WriteLine ("Entering Initialize() of: {0}", this);
            base.Initialize();

            _dte = (DTE)GetService(typeof(DTE));
            _events = _dte.Events;
            _documentEvents = _events.DocumentEvents;
            _documentEvents.DocumentSaved += DocumentEvents_DocumentSaved;

            var window = _dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);

            var outputWindow = (OutputWindow)window.Object;

            _outputPane = outputWindow.OutputWindowPanes
                                      .Cast<OutputWindowPane>()
                                      .FirstOrDefault(p => p.Name == "AutoRunCustomTool")
                          ?? outputWindow.OutputWindowPanes.Add("AutoRunCustomTool");
            _errorListProvider = new ErrorListProvider(this)
                                 {
                                      ProviderName = "AutoRunCustomTool",
                                      ProviderGuid = Guid.NewGuid()
                                 };
            RegisterExtenderProvider();
        }
开发者ID:VasiliyNovikov,项目名称:AutoRunCustomTool,代码行数:25,代码来源:AutoRunCustomToolPackage.cs


示例2: VsTextViewCreated

        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            IWpfTextView view = AdaptersFactory.GetWpfTextView(textViewAdapter);

            view.TextBuffer.Properties.GetOrCreateSingletonProperty(() => view);
            _errorList = view.TextBuffer.Properties.GetOrCreateSingletonProperty(() => new ErrorListProvider(ServiceProvider));

            if (_errorList == null)
                return;

            if (ExtensibilityToolsPackage.Options.PkgdefShowIntellisense)
            {

                PkgdefCompletionController completion = new PkgdefCompletionController(view, CompletionBroker);
                IOleCommandTarget completionNext;
                textViewAdapter.AddCommandFilter(completion, out completionNext);
                completion.Next = completionNext;
            }

            PkgdefFormatter formatter = new PkgdefFormatter(view);
            IOleCommandTarget formatterNext;
            textViewAdapter.AddCommandFilter(formatter, out formatterNext);
            formatter.Next = formatterNext;

            view.Closed += OnViewClosed;
        }
开发者ID:NotYours180,项目名称:ExtensibilityTools,代码行数:26,代码来源:PkgdefTextViewCreationListener.cs


示例3: CreateTask

        private static ErrorTask CreateTask(LintingError error, ErrorListProvider provider)
        {
            ErrorTask task = new ErrorTask()
            {
                Line = error.LineNumber - 1,
                Column = error.ColumnNumber,
                ErrorCategory = error.IsWarning ? TaskErrorCategory.Warning : TaskErrorCategory.Error,
                Category = TaskCategory.Html,
                Document = error.FileName,
                Priority = TaskPriority.Normal,
                Text = $"({error.Provider}) {error.Message}",
            };

            EnvDTE.ProjectItem item = VSPackage.Dte.Solution.FindProjectItem(error.FileName);

            if (item != null && item.ContainingProject != null)
                AddHierarchyItem(task, item.ContainingProject);

            task.Navigate += (s, e) =>
            {
                provider.Navigate(task, new Guid(EnvDTE.Constants.vsViewKindPrimary));

                if (task.Column > 0)
                {
                    var doc = (EnvDTE.TextDocument)VSPackage.Dte.ActiveDocument.Object("textdocument");
                    doc.Selection.MoveToLineAndOffset(task.Line + 1, task.Column, false);
                }
            };

            return task;
        }
开发者ID:QuinntyneBrown,项目名称:WebLinter,代码行数:31,代码来源:ErrorList.cs


示例4: Logger

        public Logger(IServiceProvider serviceProvider)
        {
            sp = serviceProvider;
            tasksDictionary = new Dictionary<string, List<ErrorTask>>();

            elp = new ErrorListProvider(sp);
            elp.ProviderName = "Factory Guide Errors";
            elp.ProviderGuid = new Guid("5A10E43F-8D1D-4026-98C0-E6B502058901");
        }
开发者ID:coryandrew1988,项目名称:jshint-vs2015,代码行数:9,代码来源:Logger.cs


示例5: Initialize

    protected override void Initialize()
    {
        base.Initialize();

        var exceptionDialog = new ExceptionDialog("http://code.google.com/p/notifypropertyweaver/issues/list", "NotifyPropertyWeaver");
        try
        {
            using (var catalog = new AssemblyCatalog(GetType().Assembly))
            using (var container = new CompositionContainer(catalog))
            {
                var menuCommandService = (IMenuCommandService) GetService(typeof (IMenuCommandService));
                var errorListProvider = new ErrorListProvider(ServiceProvider.GlobalProvider);

                container.ComposeExportedValue(exceptionDialog);
                container.ComposeExportedValue(menuCommandService);
                container.ComposeExportedValue(errorListProvider);

                container.GetExportedValue<MenuConfigure>().RegisterMenus();
                container.GetExportedValue<SolutionEvents>().RegisterSolutionEvents();
                container.GetExportedValue<TaskFileReplacer>().CheckForFilesToUpdate();
            }
        }
        catch (Exception exception)
        {
            exceptionDialog.HandleException(exception);
        }
    }
开发者ID:shiftkey,项目名称:NotifyPropertyWeaver,代码行数:27,代码来源:NotifyPropertyWeaverVsPackagePackage.cs


示例6: CreateErrorListProvider

 private void CreateErrorListProvider()
 {
     IServiceProvider serviceProvider = new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)mApplication);
       mErrorListProvider = new ErrorListProvider(serviceProvider);
       mErrorListProvider.ProviderName = "CppCheck Errors";
       mErrorListProvider.ProviderGuid = new Guid("5A10E43F-8D1D-4026-98C0-E6B502058901");
 }
开发者ID:noizefloor,项目名称:cppcheck-vs-add-in,代码行数:7,代码来源:ErrorHandler.cs


示例7: Initialize

    protected override void Initialize()
    {
        base.Initialize();
        var exceptionDialog = new ExceptionDialog();
        try
        {
            var menuCommandService = (IMenuCommandService) GetService(typeof (IMenuCommandService));
            var errorListProvider = new ErrorListProvider(ServiceProvider.GlobalProvider);

            var currentProjectFinder = new CurrentProjectFinder();
            var contentsFinder = new ContentsFinder();
            var configureMenuCallback = new ConfigureMenuCallback(currentProjectFinder, contentsFinder, exceptionDialog);
            var messageDisplayer = new MessageDisplayer(errorListProvider);
            var disableMenuConfigure = new DisableMenuConfigure(currentProjectFinder, messageDisplayer, exceptionDialog);
            var containsFodyChecker = new ContainsFodyChecker();
            var menuStatusChecker = new MenuStatusChecker(currentProjectFinder, exceptionDialog, containsFodyChecker);
            new MenuConfigure(configureMenuCallback, disableMenuConfigure, menuCommandService, menuStatusChecker).RegisterMenus();
            var taskFileReplacer = new TaskFileReplacer(messageDisplayer, contentsFinder);
            var taskFileProcessor = new TaskFileProcessor(taskFileReplacer, messageDisplayer);
            var msBuildKiller = new MSBuildKiller();
            new SolutionEvents(taskFileProcessor, exceptionDialog, msBuildKiller).RegisterSolutionEvents();
            new TaskFileReplacer(messageDisplayer, contentsFinder).CheckForFilesToUpdate();
        }
        catch (Exception exception)
        {
            exceptionDialog.HandleException(exception);
        }
    }
开发者ID:paulcbetts,项目名称:Fody,代码行数:28,代码来源:FodyVSPackagePackage.cs


示例8: GetErrorListProvider

 public ErrorListProvider GetErrorListProvider()
 {
     ErrorListProvider provider = new ErrorListProvider(this);
     provider.ProviderName = "Lonestar";
     provider.ProviderGuid = new Guid("1b956816-8bbd-4ef2-ae4b-fb94a2b9adfb");
     return provider;
 }
开发者ID:BenHall,项目名称:lonestar,代码行数:7,代码来源:StatusController.cs


示例9: Initialize

        /////////////////////////////////////////////////////////////////////////////
        // Overridden Package Implementation
        #region Package Members

        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            //create the menu service
            OleMenuCommandService _menuService = this.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            //get the menu item command based on the GUID/ID
            CommandID _cleanHiveCmd = new CommandID(Guid.Parse("{1467AD39-B4C7-47EC-8075-09AB259EB847}"), int.Parse("7A121",System.Globalization.NumberStyles.HexNumber));

            MenuCommand _clientHiveMenuItem = new MenuCommand(ExecuteCleanHiveAndDebug, _cleanHiveCmd);
            _menuService.AddCommand(_clientHiveMenuItem);

            CommandID _enableVSIPLoggingCmd = new CommandID(Guid.Parse("{1467AD39-B4C7-47EC-8075-09AB259EB847}"), int.Parse("7A122", System.Globalization.NumberStyles.HexNumber));
            MenuCommand _enableVSIPMenuItem = new MenuCommand(ExecuteEnableVSIPLogging,_enableVSIPLoggingCmd);
            _menuService.AddCommand(_enableVSIPMenuItem);

            CommandID _disbleVSIPLoggingCmd = new CommandID(Guid.Parse("{1467AD39-B4C7-47EC-8075-09AB259EB847}"), int.Parse("7A123", System.Globalization.NumberStyles.HexNumber));
            MenuCommand _disableVSIPMenuItem = new MenuCommand(ExecuteDisableVSIPLogging, _disbleVSIPLoggingCmd);
            _menuService.AddCommand(_disableVSIPMenuItem);

            //create the errorlist provider
            _errProvider = new ErrorListProvider(this);

           
        }
开发者ID:modulexcite,项目名称:CleanHiveAndDebugExtension,代码行数:34,代码来源:CleanHiveAndDebugExtensionPackage.cs


示例10: ErrorList

 public ErrorList(DTE _dte)
 {
     dte = _dte;
       _errorListProvider = new ErrorListProvider(this);
       _errorListProvider.ProviderName = "SPSF Generator";
       _errorListProvider.ProviderGuid = new Guid("{051F078C-B363-4d08-B351-206E9E62BBEF}");
       _errorListProvider.Show();
 }
开发者ID:sunday-out,项目名称:SharePoint-Software-Factory,代码行数:8,代码来源:ErrorListProvider.cs


示例11: ErrorListHelper

 public ErrorListHelper(object dte2)
 {
     _serviceProvider = new ServiceProvider(dte2 as Microsoft.VisualStudio.OLE.Interop.IServiceProvider);
     _errorProvider = new ErrorListProvider(_serviceProvider);//this implementing IServiceProvider
     _errorProvider.ProviderName = "JS Lint";
     _errorProvider.ProviderGuid = new Guid(); // should be package guid
     _errorProvider.Show();
 }
开发者ID:michalliu,项目名称:jslint4vs2012,代码行数:8,代码来源:ErrorListHelper.cs


示例12: SettingsManager

        internal SettingsManager(IWpfTextView view, ITextDocument document, ErrorListProvider messageList)
        {
            _view = view;
            _messageList = messageList;
            _message = null;

            LoadSettings(document.FilePath);
        }
开发者ID:octoberclub,项目名称:editorconfig-visualstudio,代码行数:8,代码来源:SettingsManager.cs


示例13: ErrorList

 static ErrorList()
 {
     ErrorListProvider = new ErrorListProvider(EditorExtensionsPackage.Instance)
     {
         ProviderName = "Unused CSS Browser Link Extension",
         ProviderGuid = new Guid("5BA8BB0D-D518-45ae-966C-864C536454F2")
     };
 }
开发者ID:ncl-dmoreira,项目名称:WebEssentials2013,代码行数:8,代码来源:ErrorList.cs


示例14: PackageRestorer

 public PackageRestorer(DTE dte, IServiceProvider serviceProvider)
 {
     _dte = dte;
     _errorListProvider = new ErrorListProvider(serviceProvider);
     _buildEvents = dte.Events.BuildEvents;
     _buildEvents.OnBuildBegin += BuildEvents_OnBuildBegin;
     _solutionEvents = dte.Events.SolutionEvents;
     _solutionEvents.AfterClosing += SolutionEvents_AfterClosing;            
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:9,代码来源:PackageRestorer.cs


示例15: JsHintRunner

        public JsHintRunner(string fileName)
        {
            _fileName = fileName;

            if (!_providers.TryGetValue(fileName, out _provider))
            {
                _provider = new ErrorListProvider(EditorExtensionsPackage.Instance);
                _providers.Add(fileName, _provider);
            }
        }
开发者ID:vikramgoudr,项目名称:WebEssentials2013,代码行数:10,代码来源:JsHintRunner.cs


示例16: ErrorList

        public ErrorList(EventBus eventBus)
        {
            _EventBus = eventBus;

            // Setup the error list controller, which will update the IDE error list with
            // error coming back from the closure compiler.
            _ErrorListProvider = new Microsoft.VisualStudio.Shell.ErrorListProvider(_EventBus.Package);
            _ErrorListProvider.ProviderGuid = SoftGPL.vs10.GuidList.guidvs10Pkg;
            _ErrorListProvider.ProviderName = "SoftGPL.gcVS10";
        }
开发者ID:MiguelCastillo,项目名称:jsCompiler,代码行数:10,代码来源:ErrorList.cs


示例17: ErrorListPresenter

    public ErrorListPresenter(ITextBuffer textBuffer, IErrorProviderFactory squiggleProviderFactory, IServiceProvider serviceProvider)
    {
      _textBuffer = textBuffer;
      _textBuffer.Changed += OnTextBufferChanged;

      _serviceProvider = serviceProvider;
      _squiggleTagger = squiggleProviderFactory.GetErrorTagger(_textBuffer);
      _errorListProvider = new Microsoft.VisualStudio.Shell.ErrorListProvider(serviceProvider);
      _previousErrors = new List<ErrorTask>();
      _previousSquiggles = new List<TrackingTagSpan<IErrorTag>>();
    }
开发者ID:derigel23,项目名称:Nitra,代码行数:11,代码来源:ErrorListPresenter.cs


示例18: LintReporter

        public LintReporter(ILintCompiler compiler, ILinterSettings settings, string fileName)
        {
            Settings = settings;
            FileName = fileName;
            _compiler = compiler;

            if (!_providers.TryGetValue(fileName, out _provider))
            {
                _provider = new ErrorListProvider(WebEssentialsPackage.Instance);
                _providers.Add(fileName, _provider);
            }
        }
开发者ID:GProulx,项目名称:WebEssentials2013,代码行数:12,代码来源:LintReporter.cs


示例19: Plugin

        public Plugin(IWpfTextView view, ITextDocument document, DTE dte, ErrorListProvider messageList)
        {
            this.view = view;
            this.dte = dte;
            this.messageList = messageList;
            this.message = null;

            document.FileActionOccurred += FileActionOccurred;
            view.GotAggregateFocus += GotAggregateFocus;
            view.Closed += Closed;

            LoadSettings(document.FilePath);
        }
开发者ID:nulltoken,项目名称:editorconfig-visualstudio,代码行数:13,代码来源:Plugin.cs


示例20: Initialize

        public static void Initialize(IServiceProvider provider, DTE _dte)
        {
            dte = _dte;
            if (errorListProvider != null)
                return;

            errorListProvider = new ErrorListProvider(provider);
            errorListProvider.ProviderGuid = Guid.Parse("7C2C89EC-D368-4B15-B93A-E506EEA449E4");
            errorListProvider.ProviderName = "Naggy.DiagnosticsProvider";

            documentEvents = dte.Events.DocumentEvents;
            documentEvents.DocumentClosing += new _dispDocumentEvents_DocumentClosingEventHandler(documentEvents_DocumentClosing);
        }
开发者ID:saaadhu,项目名称:naggy,代码行数:13,代码来源:ErrorList.cs



注:本文中的Microsoft.VisualStudio.Shell.ErrorListProvider类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Shell.ErrorTask类代码示例发布时间:2022-05-26
下一篇:
C# Project.ProjectNode类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap