ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinayak <>
Subject AntForms: Handling window close events
Date Tue, 20 Apr 2010 07:14:34 GMT
I tried searching for the same on net, but not able to figure out a proper
way to do the same,
Here's what i have been able to think of,

<target name="first-target">
  <var name="build.flag" value="test" />
  <solicit-properties />

<macrodef name="solicit-properties>
  <antform title="Plugin Build">
    ... <!-- some boolean and text properties -->
    <button label="Build" type="ok" focus="true" target="build-proceed" />
    <button label="Reset" type="reset" />
    <button label="Cancel" type="cancel" target="build-cancel" />

<target name="build-cancel">
  <clean-up />
  <fail message="Aborting Build Process. Reason: Recieved Cancel Request."

<target name="build-proceed">
  <echo message="Proceed Build..." />
  <var name="build.flag" unset="true" />
  <var name="build.flag" value="OK" />
  <echo message="${build.flag}" />

<target name="build-proceed-check">
  <echo message="${build.flag}" />
    <not><equals arg1="${build.flag}" arg2="OK" /></not>
      <antcall target="build-cancel" />

     [echo] Proceed Build...
     [echo] OK
     [echo] test
     [echo] Cleaning Classes and Build Directory.....

What I am trying to do here: When the user closes antforms dialog window
('X' button on top right), I want to intercept that and perform code clean
up before aborting the build process.

If anyone can help me with this, i would love to hear from you,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message