本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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");
}
示例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);
}
}
示例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");
}
示例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);
}
}
示例8: GetErrorListProvider
public ErrorListProvider GetErrorListProvider()
{
ErrorListProvider provider = new ErrorListProvider(this);
provider.ProviderName = "Lonestar";
provider.ProviderGuid = new Guid("1b956816-8bbd-4ef2-ae4b-fb94a2b9adfb");
return provider;
}
示例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);
}
示例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();
}
示例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();
}
示例12: SettingsManager
internal SettingsManager(IWpfTextView view, ITextDocument document, ErrorListProvider messageList)
{
_view = view;
_messageList = messageList;
_message = null;
LoadSettings(document.FilePath);
}
示例13: ErrorList
static ErrorList()
{
ErrorListProvider = new ErrorListProvider(EditorExtensionsPackage.Instance)
{
ProviderName = "Unused CSS Browser Link Extension",
ProviderGuid = new Guid("5BA8BB0D-D518-45ae-966C-864C536454F2")
};
}
示例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;
}
示例15: JsHintRunner
public JsHintRunner(string fileName)
{
_fileName = fileName;
if (!_providers.TryGetValue(fileName, out _provider))
{
_provider = new ErrorListProvider(EditorExtensionsPackage.Instance);
_providers.Add(fileName, _provider);
}
}