Esempio n. 1
0
 /// <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;
         }
     }
                           );
 }
Esempio n. 2
0
        /// <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);
            }
                                  );
        }