static void RunCustomTool(CustomToolRun run) { if (activeToolRun != null) { toolRuns.Enqueue(run); } else { try { run.customTool.GenerateCode(run.baseItem, run.context); } catch (Exception ex) { LoggingService.Error(ex); run.context.MessageView.AppendLine("Custom tool '" + run.baseItem.CustomTool + "' failed."); if (run.showMessageBoxOnErrors) { MessageService.ShowError("Custom tool '" + run.baseItem.CustomTool + "' failed:" + Environment.NewLine + ex.ToString()); } } if (run.context.RunningSeparateThread) { activeToolRun = run; } } }
internal static void NotifyAsyncFinish(CustomToolContext context) { WorkbenchSingleton.SafeThreadAsyncCall( delegate { activeToolRun = null; CustomToolRun nextRun = toolRuns[0]; toolRuns.RemoveAt(0); RunCustomTool(nextRun); }); }
internal static void NotifyAsyncFinish(CustomToolContext context) { SD.MainThread.InvokeAsyncAndForget(delegate { activeToolRun = null; if (toolRuns.Count > 0) { CustomToolRun nextRun = toolRuns.Dequeue(); if (nextRun != null) { RunCustomTool(nextRun); } } }); }
internal static void NotifyAsyncFinish(CustomToolContext context) { WorkbenchSingleton.SafeThreadAsyncCall( delegate { activeToolRun = null; if (toolRuns.Count > 0) { CustomToolRun nextRun = toolRuns.Dequeue(); if (nextRun != null) { RunCustomTool(nextRun); } } }); }
internal static void NotifyAsyncFinish(CustomToolContext context) { WorkbenchSingleton.SafeThreadAsyncCall( delegate { activeToolRun = null; if(toolRuns.Count > 0) { CustomToolRun nextRun = toolRuns.Dequeue(); if(nextRun != null) { RunCustomTool(nextRun); } } }); }