Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
blametool.c
Go to the documentation of this file.
1
[
WorkbenchPluginAttribute
(
"SVN Blame"
,
"Just for testing"
,
"ctrl+b"
,
""
, {
"ScriptEditor"
})]
2
class
SVNBlamePlugin
:
WorkbenchPlugin
3
{
4
[
Attribute
(
"TortoiseProc /command:blame /path:$path /startrev:1 /endrev:\"HEAD\" /ignoreeol /ignoreallspaces /line:$line"
,
"editbox"
)]
5
string
CommandLine
;
6
7
override
void
Run
()
8
{
9
ScriptEditor
mod =
Workbench
.
GetModule
(
"ScriptEditor"
);
10
if
(mod)
11
{
12
string
file;
13
string
absPath;
14
if
(mod.
GetCurrentFile
(file) &&
Workbench
.
GetAbsolutePath
(file, absPath))
15
{
16
int
line = mod.
GetCurrentLine
();
17
string
command =
CommandLine
;
18
command.
Replace
(
"$path"
, absPath);
19
command.
Replace
(
"$line"
, (line + 1).
ToString
());
20
Workbench
.
RunCmd
(command);
21
}
22
}
23
}
24
25
override
void
Configure
()
26
{
27
Workbench
.
ScriptDialog
(
"Configure SVN Blame"
,
"Usage: \n$path - will be replaced with file name\n$line - will be replaced with current line number"
,
this
);
28
}
29
30
[
ButtonAttribute
(
"OK"
)]
31
void
OkButton
() {}
32
}
33
Attribute
Definition
enentity.c:826
ButtonAttribute
Definition
workbenchapi.c:118
SVNBlamePlugin
Definition
blametool.c:3
SVNBlamePlugin::Run
override void Run()
Definition
blametool.c:7
SVNBlamePlugin::CommandLine
string CommandLine
Definition
blametool.c:5
SVNBlamePlugin::OkButton
void OkButton()
Definition
blametool.c:31
SVNBlamePlugin::Configure
override void Configure()
Definition
blametool.c:25
ScriptEditor
Definition
workbenchapi.c:30
ScriptEditor::GetCurrentFile
proto external bool GetCurrentFile(out string filename)
ScriptEditor::GetCurrentLine
proto native external int GetCurrentLine()
Workbench
Definition
workbenchapi.c:7
Workbench::GetModule
static proto native WBModuleDef GetModule(string type)
Workbench::ScriptDialog
static proto int ScriptDialog(string caption, string text, Class data)
Workbench::RunCmd
static proto native int RunCmd(string command, bool wait=false)
Workbench::GetAbsolutePath
static proto bool GetAbsolutePath(string relativePath, out string absPath)
WorkbenchPlugin::WorkbenchPlugin
void WorkbenchPlugin()
WorkbenchPluginAttribute
RestartDayzTool DayZTool WorkbenchPluginAttribute("DayZ Run", "Just for testing", "ctrl+2", "", {"ScriptEditor"})
Definition
dayztools.c:62
ToString
proto string ToString()
string::Replace
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.
Games
Dayz
scripts
editor
workbench
blametool.c
Generated by
1.17.0