Hi,
I have a problem with my error list provider, error messages are show correctly but the project field is always empty, what i need to do for set this field?
I use the following code to add errors to my error list provider.
Any help will be greatly appreciated.
Regards,
José
I have a problem with my error list provider, error messages are show correctly but the project field is always empty, what i need to do for set this field?
I use the following code to add errors to my error list provider.
private void initErrorListProvider()
{
_errors = new List<ErrorTask>();
ServiceProvider serviceProvider = new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)_applicationObject.DTE);
_errorListProvider = new Microsoft.VisualStudio.Shell.ErrorListProvider(serviceProvider);
_errorListProvider.ProviderName = "My Error Provider";
_errorListProvider.ProviderGuid = new Guid("8550EB61-847D-4d1e-A3AB-582262BD6AAE");
_errorListProvider.Show();
}
private void addError(Project project, String file, TaskErrorCategory category, int line, int column, String text)
{
ErrorTask errorTask = new ErrorTask();
errorTask.ErrorCategory = category;
// Visual Studio uses indexes starting at 0
// while the automation model uses indexes starting at 1
errorTask.Line = line - 1;
errorTask.Column = column - 1;
errorTask.Navigate +=
new EventHandler(errorTaskNavigate);
errorTask.Document = file;
errorTask.Category =
TaskCategory.BuildCompile;
errorTask.Text = text;
_errors.Add(errorTask);
_errorListProvider.Tasks.Add(errorTask);
}
Any help will be greatly appreciated.
Regards,
José