PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/Console/console/commands/diff.xml

#
XML | 127 lines | 100 code | 24 blank | 3 comment | 0 complexity | da6319378073bcb241da9be873784914 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE COMMANDO SYSTEM "commando.dtd">
  3. <!-- This was based around the 'diff' from GNU diffutils 2.7.
  4. It should also work with Cygwin diff, and diffs from other
  5. Unices, but some options might not be supported. -->
  6. <COMMANDO>
  7. <UI>
  8. <CAPTION LABEL="File specification">
  9. <FILE_ENTRY LABEL="Original file" VARNAME="from"
  10. EVAL="buffer.getPath() + '~'" />
  11. <FILE_ENTRY LABEL="Changed file" VARNAME="to"
  12. EVAL="buffer.getPath()" />
  13. <TOGGLE LABEL="Recursively compare directories"
  14. VARNAME="recursive" />
  15. <ENTRY LABEL="Ignore files regexp" VARNAME="ignore" />
  16. </CAPTION>
  17. <CAPTION LABEL="Options">
  18. <TOGGLE LABEL="Treat files as text, even if binary"
  19. VARNAME="binary" />
  20. <TOGGLE LABEL="Ignore changes in white space"
  21. VARNAME="whitespace" />
  22. <TOGGLE LABEL="Ignore addition and removal of blank lines"
  23. VARNAME="blankLines" />
  24. <TOGGLE LABEL="Expand tabs in output" VARNAME="softTabs" />
  25. <TOGGLE LABEL="Ignore case" VARNAME="ignoreCase" />
  26. <TOGGLE LABEL="Handle missing files" VARNAME="newFile" />
  27. <TOGGLE LABEL="Report which files are the same"
  28. VARNAME="identical" />
  29. <CHOICE LABEL="Algorithm" VARNAME="algorithm">
  30. <OPTION LABEL="Default" VALUE="default" />
  31. <OPTION LABEL="More accurate but slower" VALUE="slow" />
  32. <OPTION LABEL="Large files with many small changes"
  33. VALUE="large" />
  34. </CHOICE>
  35. <CHOICE LABEL="Output format" VARNAME="output" DEFAULT="unified">
  36. <OPTION LABEL="Brief" VALUE="brief" />
  37. <OPTION LABEL="Context" VALUE="context" />
  38. <OPTION LABEL="ED script" VALUE="ed" />
  39. <OPTION LABEL="RCS" VALUE="rcs" />
  40. <OPTION LABEL="Side by side" VALUE="sideBySide" />
  41. <OPTION LABEL="Unified" VALUE="unified" />
  42. </CHOICE>
  43. <ENTRY LABEL="Lines of context" VARNAME="context" DEFAULT="3" />
  44. </CAPTION>
  45. </UI>
  46. <COMMANDS>
  47. <COMMAND CONFIRM="FALSE" TO_BUFFER="TRUE"
  48. BUFFER_MODE="patch" SHELL="System">
  49. StringBuffer buf = new StringBuffer("diff ");
  50. if(recursive)
  51. buf.append(" -r");
  52. if(!ignore.equals(""))
  53. {
  54. buf.append(" -X ");
  55. buf.append(ignore);
  56. }
  57. if(binary)
  58. buf.append(" -a");
  59. if(whitespace)
  60. buf.append(" -b");
  61. if(blankLines)
  62. buf.append(" -B");
  63. if(softTabs)
  64. buf.append(" -t");
  65. if(ignoreCase)
  66. buf.append(" -i");
  67. if(newFile)
  68. buf.append(" -N");
  69. if(identical)
  70. buf.append(" -s");
  71. if(algorithm.equals("slow"))
  72. buf.append(" -d");
  73. else if(algorithm.equals("large"))
  74. buf.append(" -H");
  75. if(output.equals("brief"))
  76. buf.append(" -q");
  77. else if(output.equals("context"))
  78. {
  79. buf.append(" -C ");
  80. buf.append(context);
  81. }
  82. else if(output.equals("ed"))
  83. buf.append(" -e");
  84. else if(output.equals("rcs"))
  85. buf.append(" -n");
  86. else if(output.equals("sideBySide"))
  87. buf.append(" -y");
  88. else if(output.equals("unified"))
  89. {
  90. buf.append(" -U ");
  91. buf.append(context);
  92. }
  93. buf.append(" \"");
  94. buf.append(from);
  95. buf.append("\" \"");
  96. buf.append(to);
  97. buf.append('"');
  98. // return value
  99. buf.toString();
  100. </COMMAND>
  101. </COMMANDS>
  102. </COMMANDO>