/plugins/Console/tags/release-4-2-6-1/console/commands/ant.xml

# · XML · 94 lines · 78 code · 11 blank · 5 comment · 0 complexity · 20c4c2e97fbc1134436d2a533c43d1de MD5 · raw file

  1. <?xml version="1.0" ?>
  2. <!DOCTYPE COMMANDO SYSTEM "commando.dtd">
  3. <!-- This was based around Ant (jakarta.apache.org) version 1.6
  4. Support for changing dirs into project root directory before
  5. executing command.
  6. -->
  7. <COMMANDO>
  8. <UI>
  9. <ENTRY LABEL="Targets to build" VARNAME="targets" />
  10. <CHOICE LABEL="Build in" VARNAME="makeIn" DEFAULT="projectroot">
  11. <OPTION LABEL="Project Root" VALUE="projectroot" />
  12. <OPTION LABEL="Source Dir" VALUE="sourcedir" />
  13. <OPTION LABEL="Custom Location" VALUE="customloc" />
  14. </CHOICE>
  15. <DIR_ENTRY LABEL="Source Dir"
  16. VARNAME = "sourcedir"
  17. EVAL = 'new File(buffer.getPath()).getParent()' />
  18. <DIR_ENTRY LABEL="Project Root"
  19. VARNAME = "projectroot"
  20. EVAL = 'projectviewer.ProjectViewer.getActiveProject(view).getRootPath()' />
  21. <DIR_ENTRY LABEL="Custom Location"
  22. VARNAME = "customlocation" />
  23. <FILE_ENTRY LABEL="Build file"
  24. VARNAME="buildfile"
  25. EVAL='buffer.getName().equals("build.xml") ? buffer.getPath() : "build.xml"' />
  26. <ENTRY LABEL="Ant command" VARNAME="command" DEFAULT="ant" />
  27. <CHOICE LABEL="Output type" VARNAME="output" DEFAULT="normal">
  28. <OPTION LABEL="Quiet" VALUE="quiet" />
  29. <OPTION LABEL="Normal" VALUE="normal" />
  30. <OPTION LABEL="Verbose" VALUE="verbose" />
  31. <OPTION LABEL="Extra verbose" VALUE="debug" />
  32. </CHOICE>
  33. <TOGGLE LABEL="Don't print adornments" VARNAME="emacs" />
  34. <ENTRY LABEL="Extra parameters" VARNAME="extra" />
  35. </UI>
  36. <COMMANDS>
  37. <COMMAND CONFIRM="FALSE" SHELL="System">
  38. if (makeIn.equals("projectroot")) {
  39. location = projectroot;
  40. }
  41. else if (makeIn.equals("customloc")) {
  42. location = customlocation;
  43. }
  44. else location=sourcedir;
  45. return "cd " + location;
  46. </COMMAND>
  47. <COMMAND CONFIRM="FALSE" SHELL="System">
  48. buf = new StringBuffer();
  49. <!-- buf.append("cd " + location + " &amp;&amp; "); -->
  50. buf.append(command);
  51. if(!buildfile.equals(""))
  52. {
  53. buf.append(" -f \"");
  54. buf.append(buildfile);
  55. buf.append('"');
  56. }
  57. if(!targets.equals(""))
  58. {
  59. buf.append(' ');
  60. buf.append(targets);
  61. }
  62. if(!output.equals("normal"))
  63. {
  64. buf.append(" -");
  65. buf.append(output);
  66. }
  67. if(emacs)
  68. buf.append(" -emacs");
  69. if(!extra.equals(""))
  70. {
  71. buf.append(' ');
  72. buf.append(extra);
  73. }
  74. return buf.toString();
  75. </COMMAND>
  76. </COMMANDS>
  77. </COMMANDO>