本文整理汇总了C#中Microsoft.VisualStudio.Shell.ErrorListProvider.Show方法的典型用法代码示例。如果您正苦于以下问题:C# ErrorListProvider.Show方法的具体用法?C# ErrorListProvider.Show怎么用?C# ErrorListProvider.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Shell.ErrorListProvider
的用法示例。
在下文中一共展示了ErrorListProvider.Show方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: initErrorListProvider
//
// Initialize slice builder error list provider
//
private void initErrorListProvider()
{
_errors = new List<ErrorTask>();
_errorListProvider = new Microsoft.VisualStudio.Shell.ErrorListProvider(_serviceProvider);
_errorListProvider.ProviderName = "Slice Error Provider";
_errorListProvider.ProviderGuid = new Guid("B8DA84E8-7AE3-4c71-8E43-F273A20D40D1");
_errorListProvider.Show();
}
示例4: ErrList
//.........这里部分代码省略.........
//
// if (openDoc == null)
// {
// return;
// }
//
// IVsWindowFrame frame;
// Microsoft.VisualStudio.OLE.Interop.IServiceProvider serviceProvider;
// IVsUIHierarchy hierarchy;
// uint itemId;
// Guid logicalView = VSConstants.LOGVIEWID_Code;
//
// if (ErrorHandler.Failed(openDoc.OpenDocumentViaProject(
// task.Document, ref logicalView, out serviceProvider, out hierarchy, out itemId, out frame))
// || frame == null)
// {
// return;
// }
//
// object docData;
// frame.GetProperty((int)__VSFPROPID.VSFPROPID_DocData, out docData);
//
// VsTextBuffer buffer = docData as VsTextBuffer;
// if (buffer == null)
// {
// IVsTextBufferProvider bufferProvider = docData as IVsTextBufferProvider;
// if (bufferProvider != null)
// {
// IVsTextLines lines;
// ErrorHandler.ThrowOnFailure(bufferProvider.GetTextBuffer(out lines));
// buffer = lines as VsTextBuffer;
//
// if (buffer == null)
// {
// return;
// }
// }
// }
//
// IVsTextManager mgr = GetService(typeof(VsTextManagerClass)) as IVsTextManager;
// if (mgr == null)
// {
// return;
// }
//
// mgr.NavigateToLineAndColumn(buffer, ref logicalView, task.Line, task.Column, task.Line, task.Column);
// }
//
/////////////////////////////////////////////////////////////////////////////
private void ErrList( ErrorListProvider errListProvider, int msgType, string fileName, string message, int line, int column )
{
// ******
//ErrorListProvider ep = new ErrorListProvider( GlobalServiceProvider );
if( null == errListProvider ) {
return;
}
// ******
TaskErrorCategory category;
switch( msgType ) {
case ErrorMessage:
category = TaskErrorCategory.Error;
break;
case WarningMessage:
category = TaskErrorCategory.Warning;
break;
default:
category = TaskErrorCategory.Message;
break;
}
// ******
//
// http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.errortask.aspx
//
ErrorTask et = new ErrorTask();
et.CanDelete = true;
et.ImageIndex = 0;
et.ErrorCategory = category;
et.Priority = TaskPriority.Normal; //High;
et.Document = string.IsNullOrEmpty(fileName) ? string.Empty : fileName;
et.Text = string.IsNullOrEmpty( message ) ? string.Empty : message;
et.Line = (int) line;
et.Column = (int) column;
// ******
try {
errListProvider.Tasks.Add( et );
errListProvider.Show();
}
catch ( Exception ex ) {
string str = ex.Message;
}
}
示例5: InitializeErrorProvider
private void InitializeErrorProvider()
{
m_colErrorTasks = new List<ErrorTask>();
m_objErrorListProvider = new Microsoft.VisualStudio.Shell.ErrorListProvider(this);
m_objErrorListProvider.ProviderName = "BIDS Helper SSAS Design Rules Error Provider";
m_objErrorListProvider.ProviderGuid = new Guid("570A92B8-49B7-4FD2-8A33-14245AB7E829");
m_objErrorListProvider.Show();
}