/// <summary> /// Determines whether the task's file should be opened automatically when jumping to the next error. /// </summary> public static bool IsProjectTaskFile(TaskListEntry t) { if (t.FileName.IsNullOrEmpty) { return(false); } //only files that are part of project Project p = t.WorkspaceObject as Project; if (p == null) { return(false); } if (p.GetProjectFile(t.FileName) == null) { return(false); } //only text files var mimeType = DesktopService.GetMimeTypeForUri(t.FileName); if (!DesktopService.GetMimeTypeIsText(mimeType)) { return(false); } //only files for which we have a default internal display binding var binding = DisplayBindingService.GetDefaultBinding(t.FileName, mimeType, p); if (binding == null || !binding.CanUseAsDefault || binding is IExternalDisplayBinding) { return(false); } return(true); }