-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InternalComponent] Implemented
boolean run([enum context])
To Exec…
…ute Action with specific context. http://vssbe.r-eg.net/doc/Scripts/SBE-Scripts/Components/InternalComponent/#run ``` #[Core events.Pre.item("SpecBuild").run()] #[Core events.Pre.item(5).run(Build)] ``` Also: * Added messages about errors for actions in another thread when this failed. * C# Mode: Error/Warn messages also for result of this action by compiler settings - `Warnings & Errors` - `TreatWarningsAsErrors`
- Loading branch information
Showing
9 changed files
with
190 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2013-2015 Denis Kuzmin (reg) <[email protected]> | ||
* Copyright (c) 2013-2016 Denis Kuzmin (reg) <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
|
@@ -39,7 +39,7 @@ public class ActionCSharp: Action, IAction | |
/// <summary> | ||
/// Main class for user code. | ||
/// </summary> | ||
public const string MAIN_CLASS = "vsSolutionBuildEvent.CSharpMode"; | ||
public const string MAIN_CLASS = Settings.APP_NAME + ".CSharpMode"; | ||
|
||
/// <summary> | ||
/// Entry point for user code. | ||
|
@@ -49,7 +49,7 @@ public class ActionCSharp: Action, IAction | |
/// <summary> | ||
/// Prefix to cached bytecode. | ||
/// </summary> | ||
protected const string PREFIX_CACHE = "cached_vssbe."; | ||
protected const string PREFIX_CACHE = "cached_" + Settings.APP_NAME_SHORT + "."; | ||
|
||
/// <summary> | ||
/// Where to look cache. | ||
|
@@ -108,13 +108,24 @@ public override bool process(ISolutionEvent evt) | |
type = load(outputCacheFile(evt), assemblyName(evt)); | ||
} | ||
|
||
if(type == null) { | ||
Log.Error($"Compiled type is null. Something went wrong for C# Action '{evt.Name}'"); | ||
} | ||
|
||
int ret = run(type, cmd, evt); | ||
if(ret != 0) | ||
{ | ||
Log.Warn("Return code '{0}'", ret); | ||
return false; | ||
if(ret == 0) { | ||
return true; | ||
} | ||
return true; | ||
|
||
string retmsg = $"Return code '{ret}'"; | ||
|
||
if(((IModeCSharp)evt.Mode).TreatWarningsAsErrors) { | ||
Log.Error(retmsg); | ||
} | ||
else { | ||
Log.Warn(retmsg); | ||
} | ||
return false; | ||
} | ||
|
||
/// <param name="cmd"></param> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.