192
192
void LoadSolutionContents (Solution sln)
194
194
loadedSlns.Add (sln);
196
// Load all tags that are stored in pidb files
197
foreach (Project p in sln.GetAllProjects ()) {
198
var pContext = TypeSystemService.GetProjectContentWrapper (p);
199
if (pContext == null)
201
var tags = pContext.GetExtensionObject<ProjectCommentTags> ();
203
tags = new ProjectCommentTags ();
204
pContext.UpdateExtensionObject (tags);
205
tags.Update (pContext.Project);
207
foreach (var kv in tags.Tags) {
208
UpdateCommentTags (sln, kv.Key, kv.Value);
195
System.Threading.ThreadPool.QueueUserWorkItem (delegate {
196
// Load all tags that are stored in pidb files
197
foreach (Project p in sln.GetAllProjects ()) {
198
var pContext = TypeSystemService.GetProjectContentWrapper (p);
199
if (pContext == null) {
202
var tags = pContext.GetExtensionObject<ProjectCommentTags> ();
204
tags = new ProjectCommentTags ();
205
pContext.UpdateExtensionObject (tags);
206
tags.Update (pContext.Project);
208
foreach (var kv in tags.Tags) {
209
UpdateCommentTags (sln, kv.Key, kv.Value);
254
256
List<Task> newTasks = new List<Task> ();
255
257
if (tagComments != null) {
256
258
foreach (Tag tag in tagComments) {
257
if (!priorities.ContainsKey (tag.Key))
260
//prepend the tag if it's not already there
259
TaskPriority priority;
261
260
string desc = tag.Text.Trim ();
262
if (!desc.StartsWith (tag.Key)) {
263
if (desc.StartsWith (":"))
264
desc = tag.Key + desc;
265
else if (tag.Key.EndsWith (":"))
266
desc = tag.Key + " " + desc;
268
desc = tag.Key + ": " + desc;
262
if (!priorities.TryGetValue (tag.Key, out priority)) {
263
if (!Enum.TryParse (tag.Key, out priority))
264
priority = TaskPriority.High;
266
//prepend the tag if it's not already there
267
if (!desc.StartsWith (tag.Key, StringComparison.Ordinal)) {
268
if (desc.StartsWith (":", StringComparison.Ordinal))
269
desc = tag.Key + desc;
270
else if (tag.Key.EndsWith (":", StringComparison.Ordinal))
271
desc = tag.Key + " " + desc;
273
desc = tag.Key + ": " + desc;
271
277
Task t = new Task (fileName, desc, tag.Region.BeginColumn, tag.Region.BeginLine,
272
TaskSeverity.Information, priorities[tag.Key], wob);
278
TaskSeverity.Information, priority, wob);
273
279
newTasks.Add (t);