ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Cheng" <joe_v...@hotmail.com>
Subject user prompt task
Date Wed, 09 Jan 2002 04:43:29 GMT
After reading this:

"Extending Ant to support interactive builds"
http://www-106.ibm.com/developerworks/java/library/j-antbuild/

I wrote a little task that does the same thing (prompt the user for input 
and put it in a property), but pops up a Swing-based dialog box instead of a 
text prompt.  Not as robust as the original task (no timeout), but prettier.

http://www.joecheng.com/code/promptdialogtask.jar (source included)

screenshot:
http://www.joecheng.com/code/promptdialogtask.gif

syntax:
<taskdef name="promptdialog" classname="PromptDialogTask"/>
<promptdialog
    property="property_name"       <= required
    prompt="FTP server hostname?"  <= required
    windowtitle="Build Prompt"
    defaultvalue="ftp.netscape.com"
    useexisting="false"
    required="true"/>

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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


Mime
View raw message