This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
[MSHARED-562] Color recognition based on color related methods' name #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this modification take into account the background color and not only the foreground one. The distinction is made by starting color name with 'bg' og 'fg'. Example of
.mavenrc
:-Dstyle.info=fgCyan,bgRed
The string part of enum color are no longer used. Instead, we use the name of methods related to color in the API. To accomplish this goal we use the trick
getClasse().getMethod(name).inovoke()
. Indeed all methods related to colors follow the same pattern : starting with 'bg' or 'fg' and having no arguments.Moreover, we can considere the bright modification (and other modification not yet implemented)
example :
-Dstyle.info=fgBrightCyan
fgBlack
fgBlue
fgCyan
fgGreen
fgMagenta
fgRed
fgYellow
bgCyan
bgGreen
bgMagenta
bgRed
bgYellow
fgBright
fgBrightBlack
fgBrightBlue
fgBrightCyan
fgBrightGreen
fgBrightMagenta
fgBrightRed
fgBrightYellow
bgBright
bgBrightCyan
bgBrightGreen
bgBrightMagenta
bgBrightRed
bgBrightYellow
If a color is missing, do a pull request with the appropriate method on JANSI project
See JANSI for details.
If the color format is not correct no color will be applied.