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