mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Added a green "SUCCESS" message for successful builds
This commit is contained in:
parent
1a187de4c9
commit
d7d88585d2
5 changed files with 18 additions and 9 deletions
|
@ -9760,9 +9760,9 @@ namespace IDE
|
||||||
CompileResult(buildCompletedCmd.mHotProjectName, !buildCompletedCmd.mFailed);
|
CompileResult(buildCompletedCmd.mHotProjectName, !buildCompletedCmd.mFailed);
|
||||||
|
|
||||||
if (buildCompletedCmd.mFailed)
|
if (buildCompletedCmd.mFailed)
|
||||||
OutputLineSmart("ERROR: BUILD FAILED");
|
OutputLineSmart("ERROR: BUILD FAILED. Total build time: {0:0.00}s", buildCompletedCmd.mStopwatch.ElapsedMilliseconds / 1000.0f);
|
||||||
if ((mVerbosity >= .Detailed) && (buildCompletedCmd.mStopwatch != null))
|
if ((mVerbosity >= .Detailed) && (buildCompletedCmd.mStopwatch != null))
|
||||||
OutputLine("Total build time: {0:0.00}s", buildCompletedCmd.mStopwatch.ElapsedMilliseconds / 1000.0f);
|
OutputLineSmart("SUCCESS: Build completed with no errors. Total build time: {0:0.00}s", buildCompletedCmd.mStopwatch.ElapsedMilliseconds / 1000.0f);
|
||||||
|
|
||||||
if (mDebugger?.mIsComptimeDebug == true)
|
if (mDebugger?.mIsComptimeDebug == true)
|
||||||
DebuggerComptimeStop();
|
DebuggerComptimeStop();
|
||||||
|
@ -11455,12 +11455,12 @@ namespace IDE
|
||||||
mLastTestFailed = true;
|
mLastTestFailed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void CompileFailed()
|
protected virtual void CompileFailed(Stopwatch stopwatch)
|
||||||
{
|
{
|
||||||
if (mTestManager != null)
|
if (mTestManager != null)
|
||||||
mTestManager.BuildFailed();
|
mTestManager.BuildFailed();
|
||||||
if (mVerbosity > .Quiet)
|
if (mVerbosity > .Quiet)
|
||||||
OutputLine("Compile failed.");
|
OutputLineSmart("ERROR: Compile failed. Total build time: {0:0.00}s", stopwatch.ElapsedMilliseconds / 1000.0f);
|
||||||
mLastCompileFailed = true;
|
mLastCompileFailed = true;
|
||||||
|
|
||||||
if (mRunningTestScript)
|
if (mRunningTestScript)
|
||||||
|
@ -11624,7 +11624,7 @@ namespace IDE
|
||||||
if ((passInstance.mFailed) && (passInstance.mCompileSucceeded))
|
if ((passInstance.mFailed) && (passInstance.mCompileSucceeded))
|
||||||
{
|
{
|
||||||
// This can happen if we can't load a Beef file
|
// This can happen if we can't load a Beef file
|
||||||
CompileFailed();
|
CompileFailed(startStopWatch);
|
||||||
passInstance.mCompileSucceeded = false;
|
passInstance.mCompileSucceeded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11656,7 +11656,7 @@ namespace IDE
|
||||||
if (!mDebugger.mIsRunning)
|
if (!mDebugger.mIsRunning)
|
||||||
{
|
{
|
||||||
OutputErrorLine("Hot compile failed - target no longer running");
|
OutputErrorLine("Hot compile failed - target no longer running");
|
||||||
CompileFailed();
|
CompileFailed(startStopWatch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11688,7 +11688,7 @@ namespace IDE
|
||||||
SkipProjectCompile(project, hotProject);
|
SkipProjectCompile(project, hotProject);
|
||||||
}
|
}
|
||||||
CompileResult((hotProject != null) ? hotProject.mProjectName : null, false);
|
CompileResult((hotProject != null) ? hotProject.mProjectName : null, false);
|
||||||
CompileFailed();
|
CompileFailed(startStopWatch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11740,7 +11740,7 @@ namespace IDE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
CompileFailed();
|
CompileFailed(startStopWatch);
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
|
@ -12268,7 +12268,7 @@ namespace IDE
|
||||||
passInstance = CompileBeef(hotProject, hotIdx, lastCompileHadMessages, let hadBeef);
|
passInstance = CompileBeef(hotProject, hotIdx, lastCompileHadMessages, let hadBeef);
|
||||||
if (passInstance == null)
|
if (passInstance == null)
|
||||||
{
|
{
|
||||||
CompileFailed();
|
CompileFailed(scope .());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -351,6 +351,7 @@ namespace IDE
|
||||||
public Color mError = 0xFFFF0000;
|
public Color mError = 0xFFFF0000;
|
||||||
public Color mBuildError = 0xFFFF8080;
|
public Color mBuildError = 0xFFFF8080;
|
||||||
public Color mBuildWarning = 0xFFFFFF80;
|
public Color mBuildWarning = 0xFFFFFF80;
|
||||||
|
public Color mBuildSuccess = 0xFF80FF80;
|
||||||
public Color mVisibleWhiteSpace = 0xFF9090C0;
|
public Color mVisibleWhiteSpace = 0xFF9090C0;
|
||||||
public Color mCurrentLineHilite = 0xFF4C4C54;
|
public Color mCurrentLineHilite = 0xFF4C4C54;
|
||||||
public Color mCurrentLineNumberHilite = 0x18FFFFFF;
|
public Color mCurrentLineNumberHilite = 0x18FFFFFF;
|
||||||
|
@ -426,6 +427,7 @@ namespace IDE
|
||||||
GetColor("Error", ref mError);
|
GetColor("Error", ref mError);
|
||||||
GetColor("BuildError", ref mBuildError);
|
GetColor("BuildError", ref mBuildError);
|
||||||
GetColor("BuildWarning", ref mBuildWarning);
|
GetColor("BuildWarning", ref mBuildWarning);
|
||||||
|
GetColor("BuildSuccess", ref mBuildSuccess);
|
||||||
GetColor("VisibleWhiteSpace", ref mVisibleWhiteSpace);
|
GetColor("VisibleWhiteSpace", ref mVisibleWhiteSpace);
|
||||||
GetColor("CurrentLineHilite", ref mCurrentLineHilite);
|
GetColor("CurrentLineHilite", ref mCurrentLineHilite);
|
||||||
GetColor("CurrentLineNumberHilite", ref mCurrentLineNumberHilite);
|
GetColor("CurrentLineNumberHilite", ref mCurrentLineNumberHilite);
|
||||||
|
@ -457,6 +459,7 @@ namespace IDE
|
||||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Error] = mError;
|
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Error] = mError;
|
||||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.BuildError] = mBuildError;
|
SourceEditWidgetContent.sTextColors[(.)SourceElementType.BuildError] = mBuildError;
|
||||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.BuildWarning] = mBuildWarning;
|
SourceEditWidgetContent.sTextColors[(.)SourceElementType.BuildWarning] = mBuildWarning;
|
||||||
|
SourceEditWidgetContent.sTextColors[(.)SourceElementType.BuildSuccess] = mBuildSuccess;
|
||||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.VisibleWhiteSpace] = mVisibleWhiteSpace;
|
SourceEditWidgetContent.sTextColors[(.)SourceElementType.VisibleWhiteSpace] = mVisibleWhiteSpace;
|
||||||
|
|
||||||
DarkTheme.COLOR_TEXT = mText;
|
DarkTheme.COLOR_TEXT = mText;
|
||||||
|
|
|
@ -306,6 +306,10 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "WARNING".Length, (.)SourceElementType.BuildWarning));
|
mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "WARNING".Length, (.)SourceElementType.BuildWarning));
|
||||||
}
|
}
|
||||||
|
if (line.StartsWith("SUCCESS:"))
|
||||||
|
{
|
||||||
|
mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "SUCCESS".Length, (.)SourceElementType.BuildSuccess));
|
||||||
|
}
|
||||||
Write(line);
|
Write(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,6 +806,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
0xFFFF8080, // BuildError
|
0xFFFF8080, // BuildError
|
||||||
0xFFFFFF80, // BuildWarning
|
0xFFFFFF80, // BuildWarning
|
||||||
|
0xFF80FF80, // BuildSuccess
|
||||||
|
|
||||||
0xFF9090C0, // VisibleWhiteSpace
|
0xFF9090C0, // VisibleWhiteSpace
|
||||||
) ~ delete _;
|
) ~ delete _;
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
BuildError,
|
BuildError,
|
||||||
BuildWarning,
|
BuildWarning,
|
||||||
|
BuildSuccess,
|
||||||
|
|
||||||
VisibleWhiteSpace
|
VisibleWhiteSpace
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue