[ 
https://issues.apache.org/jira/browse/MSHARED-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361791#comment-15361791
 ] 

ASF GitHub Bot commented on MSHARED-562:
----------------------------------------

GitHub user antoinebrl opened a pull request:

    https://github.com/apache/maven-shared/pull/14

    [MSHARED-562] Color recognition based on color related methods' name

    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`
    
    - Colors (case :warning: SENSITIVE)
      - `fgBlack`
      - ``
      - ``
      - ``
      - ``
      - ``
      - ``
    
    
    If the color format is not correct no color will be applied.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/antoinebrl/maven-shared trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-shared/pull/14.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14
    
----
commit 3575e44451a240608f37f6b2076c46e1ccf4bd48
Author: Antoine Broyelle <[email protected]>
Date:   2016-07-04T21:17:47Z

    [MSHARED-562] Color recognition based on color related methods' name
    
    The string part of enum color are no longer used. Instead, we use the name
    of methods related to color (starting by 'bg' or 'fg').
    Thus, this modification take into account the foreground and the background
    color. example : -Dstyle.info=fgCyan,bgRed
    We can also considere the modificator bright (or other ones not yet 
implemented)
    example : -Dstyle.info=fgBrightCyan

----


> add an API to create messages with consistent and configurable colors
> ---------------------------------------------------------------------
>
>                 Key: MSHARED-562
>                 URL: https://issues.apache.org/jira/browse/MSHARED-562
>             Project: Maven Shared Components
>          Issue Type: New Feature
>          Components: maven-project-utils, maven-shared-utils
>            Reporter: Hervé Boutemy
>             Fix For: maven-project-utils-1.0.0
>
>
> Instead of letting plugin developers use JAnsi's Ansi class to define 
> explicitely which colors they want to put in their messages, creating a 
> Maven-API like JAnsi's Ansi but providing Maven-use case oriented methods to 
> add colors will permit consistent and configurable colors for Maven messages



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to