-
Notifications
You must be signed in to change notification settings - Fork 0
/
fmpp file.xml
103 lines (76 loc) · 2.98 KB
/
fmpp file.xml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" ?>
<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
<!--
fmpp-command V1.11 18.02.2020, by Thorsten Willert
-->
<COMMANDO>
<UI>
<CAPTION LABEL="Options">
<TOGGLE LABEL="Stop on error" VARNAME="stop_error" DEFAULT="TRUE" />
<TOGGLE LABEL="Case sensitive" VARNAME="case_sens" />
<TOGGLE LABEL="Print stack trace" VARNAME="stack_trace" />
<TOGGLE LABEL="Append log file" VARNAME="log" DEFAULT="TRUE" />
</CAPTION>
<CAPTION LABEL="">
<CHOICE LABEL="Messages" VARNAME="mes" DEFAULT=" -v">
<OPTION LABEL="Verbose" VALUE=" -v" />
<OPTION LABEL="Quiet" VALUE=" -q" />
<OPTION LABEL="Really quiet" VALUE=" -Q" />
</CHOICE>
</CAPTION>
<CAPTION LABEL="Configuration">
<FILE_ENTRY LABEL="config.fmmp" VARNAME="config" DEFAULT="" />
<DIR_ENTRY LABEL="Base directory" VARNAME="base" DEFAULT="" />
</CAPTION>
<CAPTION LABEL="Data">
<DIR_ENTRY LABEL="Data root" VARNAME="data_root" />
</CAPTION>
<CAPTION LABEL="Variables (var1:data, var2:data2 ...)">
<ENTRY LABEL="Variables" VARNAME="var" DEFAULT='' />
</CAPTION>
<CAPTION LABEL="Files">
<FILE_ENTRY LABEL="Input file" VARNAME="input" EVAL="buffer.getPath()" />
<FILE_ENTRY LABEL="Output file" VARNAME="output" EVAL='buffer.getDirectory() + "OUT\\" + buffer.getName().replaceAll(".ftl", ".txt")' />
</CAPTION>
<CAPTION LABEL="jEdit Console:">
<TOGGLE LABEL="Clear console" VARNAME="clr" DEFAULT="TRUE"/>
</CAPTION>
</UI>
<COMMANDS>
<COMMAND CONFIRM="FALSE" SHELL="System">
if (clr) clearConsole(view);
if ( buffer.isDirty() )
{
buffer.save(view,null);
VFSManager.waitForRequests();
}
buf = new StringBuffer();
File = new File(System.getenv("ProgramFiles") + "\\fmpp\\bin\\fmpp.bat");
if (File.exists())
buf.append("\"" + System.getenv("ProgramFiles") + "\\fmpp\\bin\\fmpp.bat\"");
else
{
Macros.error(view, "fmpp.bat not found!");
return;
}
FileConf = new File("\"" + config + "\"");
if (FileConf.exists() ) buf.append(" -C \"" + config + "\"");
FileBase = new File("\"" + base + "\"");
if ( FileBase.exists() && FileBase.isDirectory() ) buf.append(" --configuration-base=\"" + base + "\"");
FileRoot = new File("\"" + data_root + "\"");
if ( FileRoot.exists() && FileRoot.isDirectory() ) buf.append(" --data-root=\"" + data_root + "\"");
if (output == "") {
Macros.error(view, "No output file!");
return;
}
buf.append(" \"" + input + "\" -o \"" + output + "\"") ;
buf.append(" -D \"" + var + "\"") ;
stop_error ? buf.append(" -s") : buf.append(" -c") ;
case_sens ? buf.append(" --case-sensitive") : buf.append(" --ignore-case") ;
stack_trace ? buf.append(" --print-stack-trace") : buf.append(" --dont-print-stack-trace") ;
log ? buf.append(" --append-log-file") : buf.append(" --dont-append-log-file") ;
buf.append(mes) ;
buf.toString();
</COMMAND>
</COMMANDS>
</COMMANDO>