PageRenderTime 134ms CodeModel.GetById 131ms app.highlight 0ms RepoModel.GetById 2ms app.codeStats 0ms

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

#
XML | 114 lines | 94 code | 17 blank | 3 comment | 0 complexity | 5734f7b3233be758b558dde04bf6d171 MD5 | raw file
  1<?xml version="1.0" ?>
  2
  3<!-- This was based around Sun javac 1.3.1. -->
  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="Boot class path" VARNAME="bootclasspath"/> -->
 19		<HIST_ENTRY LABEL="Class path" VARNAME="classpath_env"
 20			EVAL="jEdit.getProperty(&quot;CLASSPATH&quot;, &quot;&quot;);" />
 21		<HIST_ENTRY LABEL="Source path" VARNAME="sourcepath"
 22			EVAL="getProjectRoot(view, buffer)" />
 23		<DIR_ENTRY LABEL="Extension directory" VARNAME="extdirs" />
 24		<DIR_ENTRY LABEL="Output directory" VARNAME="outputpath" />
 25
 26		</CAPTION>
 27
 28		<CAPTION LABEL="Compilation flags">
 29
 30		<TOGGLE LABEL="Generate debug info" VARNAME="debug" />
 31		<TOGGLE LABEL="Optimize" VARNAME="optimize" />
 32		<TOGGLE LABEL="Show warnings" VARNAME="warn" DEFAULT="TRUE" />
 33		<TOGGLE LABEL="Show deprecation" VARNAME="deprecation" DEFAULT="TRUE" />
 34		<!-- <TOGGLE LABEL="Verbose compile messages" VARNAME="verbose" /> -->
 35		<HIST_ENTRY LABEL="Source file encoding" VARNAME="encoding"
 36			EVAL="buffer.getProperty(Buffer.ENCODING)" />
 37
 38		</CAPTION>
 39	</UI>
 40
 41	<COMMANDS>
 42		<COMMAND SHELL="System" CONFIRM="FALSE">
 43			buf = new StringBuffer();
 44			buf.append("javac");
 45			
 46			jEdit.setProperty("CLASSPATH", classpath_env);
 47			setenv("CLASSPATH", classpath_env);
 48			classpath = getBufferClassPath(buffer);
 49
 50			/* if(!bootclasspath.equals(""))
 51			{
 52				buf.append(" -bootclasspath \"");
 53				buf.append(bootclasspath);
 54				buf.append('"');
 55			} */
 56
 57			if(!classpath.equals(""))
 58			{
 59				buf.append(" -classpath \"");
 60				buf.append(classpath);
 61				buf.append('"');
 62			}
 63
 64			if(!sourcepath.equals(""))
 65			{
 66				buf.append(" -sourcepath \"");
 67				buf.append(sourcepath);
 68				buf.append('"');
 69			}
 70
 71			if(!extdirs.equals(""))
 72			{
 73				buf.append(" -extdirs \"");
 74				buf.append(extdirs);
 75				buf.append('"');
 76			}
 77
 78			if(!outputpath.equals(""))
 79			{
 80				buf.append(" -d \"");
 81				buf.append(outputpath);
 82				buf.append('"');
 83			}
 84
 85			if(debug)
 86				buf.append(" -g");
 87
 88			if(optimize)
 89				buf.append(" -O");
 90
 91			if(!warn)
 92				buf.append(" -nowarn");
 93
 94			if(deprecation)
 95				buf.append(" -deprecation");
 96
 97			/* if(verbose)
 98				buf.append(" -verbose"); */
 99
100			if(!encoding.equals(""))
101			{
102				buf.append(" -encoding ");
103				buf.append(encoding);
104			}
105
106			buf.append(" \"");
107			buf.append(source);
108			buf.append('"');
109
110			// return value
111			buf.toString();
112		</COMMAND>
113	</COMMANDS>
114</COMMANDO>