当前位置: 首页>>代码示例>>C#>>正文


C# Shell.ErrorListProvider类代码示例

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


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


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