ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <step...@wanderinghorse.net>
Subject new feature: RecorderEntry accepts -emacs
Date Thu, 21 Mar 2002 21:25:01 GMT
:)
i'm just so tickled, i wanted to pre-announce: i've just made the following 
changes to today's CVS version:

org.apache.tools.ant.util.StringUtils:
added 
    public static boolean getBooleanValue( String s );
    public static String getStringValue( boolean b );

They treat the following String values as boolean true (case-insensitive):
  true, on, yes, 1, yessireebob (no, i'm not kidding)


org.apache.tools.ant.Main:
- now sets emacsMode property in the the project:
  project.setProperty( Project.EMACS_MODE_FLAG,
org.apache.tools.ant.util.StringUtils.getStringValue( this.emacsMode ) );


org.apache.tools.ant.Project:
- now applies emacsMode to all listeners who are BuildLoggers
---------------------------------
public static final String EMACS_MODE_FLAG = "emacsMode";

public void addBuildListener(BuildListener listener) {
  if( listener instanceof org.apache.tools.ant.BuildLogger ) 
  {
    BuildLogger bl = (BuildLogger)listener;
    bl.setEmacsMode( 
      org.apache.tools.ant.util.StringUtils.getBooleanValue( 
              getProperty( Project.EMACS_MODE_FLAG )  /* man, that's anal */ 
);
  }
  listeners.addElement(listener);
}
---------------------------------

org.apache.tools.ant.RecorderEntry:
- now applies emacsMode check to all log() and messageLogged() calls (even 
debuggering calls to log() ).


What's the current prefered way to submit these (feel free to point me to 
google ;)?

:)

----- stephan@wanderinghorse.net
http://qub.sourceforge.net  - http://radioaqtiph.sourceforge.net
http://www.countermoves.net - http://stephan.rootonfire.org
"Unix: the shell is your oyster."




--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message