Created
March 8, 2012 22:38
-
-
Save jpobst/2003908 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AddError (Project prj, string text, TaskErrorCategory category) | |
{ | |
IVsSolution solution = (IVsSolution)package.GetVSService (typeof (IVsSolution)); | |
IVsHierarchy hierarchy = null; | |
if (prj != null) | |
solution.GetProjectOfUniqueName (prj.UniqueName, out hierarchy); | |
ErrorTask task = new ErrorTask (); | |
task.Text = text; | |
task.ErrorCategory = category; | |
task.HierarchyItem = hierarchy; | |
package.ErrorListProvider.AddTask (text, (int)category, hierarchy); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment