/// <summary> /// Called after the execution of run/compile/check/prolint, clear the current operation from the file /// </summary> public static void OnSingleExecutionEnd(ProExecution lastExec) { try { var treatedFile = lastExec.ListToCompile.First(); CurrentOperation currentOperation; if (!Enum.TryParse(lastExec.ExecutionType.ToString(), true, out currentOperation)) { currentOperation = CurrentOperation.Run; } // Clear flag or we can't do any other actions on this file FilesInfo.GetFileInfo(treatedFile.InputPath).CurrentOperation &= ~currentOperation; var isCurrentFile = treatedFile.InputPath.EqualsCi(Plug.CurrentFilePath); if (isCurrentFile) { FilesInfo.UpdateFileStatus(); } } catch (Exception e) { ErrorHandler.ShowErrors(e, "Error in OnExecutionEnd"); } }
/// <summary> /// Called after the execution of run/compile/check/prolint, clear the current operation from the file /// </summary> public static void OnSingleExecutionEnd(ProExecution lastExec) { try { var exec = (ProExecutionHandleCompilation)lastExec; var treatedFile = exec.Files.First(); CurrentOperation currentOperation; if (!Enum.TryParse(exec.ExecutionType.ToString(), true, out currentOperation)) { currentOperation = CurrentOperation.Run; } // Clear flag or we can't do any other actions on this file FilesInfo.GetFileInfo(treatedFile.SourcePath).CurrentOperation &= ~currentOperation; var isCurrentFile = treatedFile.SourcePath.EqualsCi(Npp.CurrentFile.Path); if (isCurrentFile) { FilesInfo.UpdateFileStatus(); } FilesInfo.CurrentFileInfoObject.ProgressExecution = null; } catch (Exception e) { ErrorHandler.ShowErrors(e, "Error in OnExecutionEnd"); } }