PageRenderTime 64ms CodeModel.GetById 58ms app.highlight 1ms RepoModel.GetById 4ms app.codeStats 1ms

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

#
XML | 81 lines | 60 code | 20 blank | 1 comment | 0 complexity | 9db6cfbe71dac94308c2a6cf244a0488 MD5 | raw file
 1<?xml version="1.0" ?>
 2
 3<!-- This was based around jikes 1.10. -->
 4
 5<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
 6
 7<COMMANDO>
 8	<UI>
 9		<CAPTION LABEL="Source file(s)">
10
11		<FILE_ENTRY LABEL="Source file(s)" VARNAME="source"
12			EVAL="buffer.getPath()" />
13
14		</CAPTION>
15
16		<CAPTION LABEL="Paths">
17
18		<ENTRY LABEL="Class path" VARNAME="classpath_env"
19			EVAL="jEdit.getProperty(&quot;CLASSPATH&quot;, &quot;&quot;);" />
20		<FILE_ENTRY LABEL="Output directory" VARNAME="outputpath" />
21
22		</CAPTION>
23
24		<CAPTION LABEL="Compilation flags">
25
26		<TOGGLE LABEL="Generate debug info" VARNAME="debug" />
27		<TOGGLE LABEL="Optimize" VARNAME="optimize" />
28		<TOGGLE LABEL="Show warnings" VARNAME="warn" DEFAULT="TRUE" />
29		<TOGGLE LABEL="Show deprecation" VARNAME="deprecation" DEFAULT="TRUE" />
30		<TOGGLE LABEL="Pedantic warnings" VARNAME="pedantic" />
31		<TOGGLE LABEL="Treat cautions as errors" VARNAME="cautions" />
32
33		</CAPTION>
34	</UI>
35
36	<COMMANDS>
37		<COMMAND SHELL="System" CONFIRM="FALSE">
38			buf = new StringBuffer("jikes +E");
39			
40			jEdit.setProperty("CLASSPATH", classpath_env);
41			setenv("CLASSPATH", classpath_env);
42			classpath = getBufferClassPath(buffer);
43
44			if(!classpath.equals(""))
45			{
46				buf.append(" -classpath \"");
47				buf.append(classpath);
48				buf.append('"');
49			}
50
51			if(!outputpath.equals(""))
52			{
53				buf.append(" -d \"");
54				buf.append(outputpath);
55				buf.append('"');
56			}
57
58			if(debug)
59				buf.append(" -g");
60
61			if(optimize)
62				buf.append(" -O");
63
64			if(!warn)
65				buf.append(" -nowarn");
66
67			if(deprecation)
68				buf.append(" -deprecation");
69
70			if(pedantic)
71				buf.append(" +P");
72
73			buf.append(" \"");
74			buf.append(source);
75			buf.append('"');
76
77			// return value
78			buf.toString();
79		</COMMAND>
80	</COMMANDS>
81</COMMANDO>