~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
                void LoadSolutionContents (Solution sln)
193
193
                {
194
194
                        loadedSlns.Add (sln);
195
 
                        
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)
200
 
                                        continue;
201
 
                                var tags = pContext.GetExtensionObject<ProjectCommentTags> ();
202
 
                                if (tags == null) {
203
 
                                        tags = new ProjectCommentTags ();
204
 
                                        pContext.UpdateExtensionObject (tags);
205
 
                                        tags.Update (pContext.Project);
206
 
                                } else {
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) {
 
200
                                                continue;
 
201
                                        }
 
202
                                        var tags = pContext.GetExtensionObject<ProjectCommentTags> ();
 
203
                                        if (tags == null) {
 
204
                                                tags = new ProjectCommentTags ();
 
205
                                                pContext.UpdateExtensionObject (tags);
 
206
                                                tags.Update (pContext.Project);
 
207
                                        } else {
 
208
                                                foreach (var kv in tags.Tags) {
 
209
                                                        UpdateCommentTags (sln, kv.Key, kv.Value);
 
210
                                                }
209
211
                                        }
210
212
                                }
211
 
                        }
 
213
                        });
212
214
                }
213
215
                
214
216
                
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))
258
 
                                                continue;
259
 
                                        
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;
267
 
                                                else
268
 
                                                        desc = tag.Key + ": " + desc;
 
261
 
 
262
                                        if (!priorities.TryGetValue (tag.Key, out priority)) {
 
263
                                                if (!Enum.TryParse (tag.Key, out priority))
 
264
                                                        priority = TaskPriority.High;
 
265
                                        } else {
 
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;
 
272
                                                        else
 
273
                                                                desc = tag.Key + ": " + desc;
 
274
                                                }
269
275
                                        }
270
276
                                        
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);
274
280
                                }
275
281
                        }