ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Martin <>
Subject RE: Prompt task
Date Thu, 30 Nov 2000 16:27:16 GMT
I've already written a Prompt taks which I've been using for a while. It
allows you to use both command line and swing prompts. It's probably not the
way things should go but it solved the problem I had.

There are three types of prompt plain, file or list. Plain is just plain
text entry, File allows you to select from a file dialog (Only when using
gui) and list allows you to select from a list of options. The value
captured is then placed in the property specified in the property attribute.

    <prompt property="target" type="list" mode="gui">
      <value label="Item 1" value="item1" />
      <value label="Item 2" value="item2" />

-----Original Message-----
From: Stefan Bodewig []
Sent: Thursday, November 30, 2000 11:54 AM
Subject: Prompt task


I've been thinking about a prompt or ask like task, something like

<prompt alternatives="y,n" expect="y" default="y" property="abort">
JUnit not found. If you continue, you'll be unable to run tests.


My first idea would be to have a "DialogEngine" at the project
level. By default there was an engine that writes to System.out and
reads from (logging system would not be appropriate as you
wouldn't want the prompt to end up in the log file instead the

Each front end could provide an engine of its own, from my first
impression an interface like

public String askUser(String prompt, String[] alternatives, String default);

should suffice. 



View raw message