difftool.c 784 B

123456789101112131415161718192021222324252627282930313233
  1. [WorkbenchPluginAttribute("SVN Diff", "Just for testing", "ctrl+`", "", {"ScriptEditor"})]
  2. class SVNDiffPlugin: WorkbenchPlugin
  3. {
  4. [Attribute("TortoiseProc /command:diff /path:$path", "editbox")]
  5. string CommandLine;
  6. override void Run()
  7. {
  8. ScriptEditor mod = Workbench.GetModule("ScriptEditor");
  9. if (mod)
  10. {
  11. string file;
  12. string absPath;
  13. if (mod.GetCurrentFile(file) && Workbench.GetAbsolutePath(file, absPath))
  14. {
  15. string command = CommandLine;
  16. command.Replace("$path", absPath);
  17. Workbench.RunCmd(command);
  18. Print( command );
  19. Print( absPath );
  20. }
  21. }
  22. }
  23. override void Configure()
  24. {
  25. Workbench.ScriptDialog("Configure SVN Diff", "Usage: \n$path - will be replaced with file name", this);
  26. }
  27. [ButtonAttribute("OK")]
  28. void OkButton() {}
  29. }