/// <summary> /// Resets error (if any) associated with current project reference /// </summary> public void CleanProjectReferenceErrorState() { UIThread.DoOnUIThread(() => { if (projectRefError != null) { ProjectMgr.ProjectErrorsTaskListProvider.Tasks.Remove(projectRefError); projectRefError = null; } } ); }
/// <summary> /// Resets error (if any) associated with current project reference /// </summary> public void CleanProjectReferenceErrorState() { Microsoft.VisualStudio.FSharp.LanguageService.UIThread.DoOnUIThread(() => { if (projectRefError != null) { ProjectMgr.ProjectErrorsTaskListProvider.Tasks.Remove(projectRefError); projectRefError = null; } } ); }
/// <summary> /// Creates new error with given text and associates it with current project reference. /// Old error is removed /// </summary> /// <param name="text"></param> private void SetError(string text) { UIThread.DoOnUIThread(() => { // delete existing error if exists CleanProjectReferenceErrorState(); projectRefError = new Shell.ErrorTask { ErrorCategory = Shell.TaskErrorCategory.Warning, HierarchyItem = ProjectMgr.InteropSafeIVsHierarchy, Text = text }; ProjectMgr.ProjectErrorsTaskListProvider.Tasks.Add(projectRefError); } ); }