PageRenderTime 79ms CodeModel.GetById 71ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/XInsert/xml/java.insert.xml

#
XML | 230 lines | 218 code | 12 blank | 0 comment | 0 complexity | 282ff71740a09859d8452d7fa3ea8f9c MD5 | raw file
  1<?xml version="1.0" encoding="ISO-8859-1"?>

  2  <menu name="Java">

  3    <item name="GPL">/*

  4 * $filename - Short Description

  5 * Copyright (C) $date $author

  6 * $email

  7 * $webaddress

  8 *

  9 * This program is free software; you can redistribute it and/or

 10 * modify it under the terms of the GNU General Public License

 11 * as published by the Free Software Foundation; either version 2

 12 * of the License, or any later version.

 13 *

 14 * This program is distributed in the hope that it will be useful,

 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of

 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

 17 * GNU General Public License for more details.

 18 *

 19 * You should have received a copy of the GNU General Public License

 20 * along with this program; if not, write to the Free Software

 21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

 22 */ </item>

 23    <item name="Class" type="xinsert_script">{%classname "Class Name:"}{%extends "Extends:" "java.lang.Object" ?}/**

 24*@author {$$author}

 25*/

 26

 27public class {$=classname} extends {$=extends}

 28{

 29	/* constructor */

 30	public {$=classname}()

 31	{

 32	  |

 33	}

 34	

 35}</item>	

 36		<item name="Application" type="xinsert_script">{%classname "Class Name:"}public class {$=classname}

 37	{  

 38		public static void main(String args[])

 39		{

 40			|

 41		}

 42	}</item>

 43    <item name="Applet" type="xinsert_script">{%classname "Class Name:"}import java.awt.*;

 44

 45public class {$=classname} extends java.applet.Applet implements Runnable

 46{

 47	private Thread runner;

 48	

 49	public void start()

 50	{

 51		if (runner == null)

 52		{

 53			runner = new Thread(this);

 54			runner.start();

 55		}	

 56	}

 57	

 58	public void init()

 59	{

 60	}

 61	

 62	public void run()

 63	{

 64	}

 65	

 66	public void stop()

 67	{

 68		runner = null;

 69	}

 70	public void destroy()

 71	{

 72	}

 73	public void paint(Graphics g)

 74	{

 75	}

 76}</item>

 77    <menu name="Blocks">

 78      <item name="{ }">{\n|\n}</item>

 79      <item name="if">if (|)\n{\n} else {\n}</item>

 80      <item name="try">try\n{\n|\n} catch (Exception e) { }</item>

 81    </menu>

 82

 83    <menu name="Javadoc">

 84      <item name="author">@author $author</item>

 85      <item name="version">@version |</item>

 86      <item name="see">@see |</item>

 87      <item name="since">@since |</item>

 88      <item name="deprecated">@deprecated |</item>

 89      <item name="param">@param |</item>

 90      <item name="return">@return |</item>

 91      <item name="exception">@exception |</item>

 92      <item name="link">@link |</item>

 93    </menu>

 94

 95    <menu name="Loops">

 96      <item name="do">do\n{\n|\n} while()</item>

 97      <item name="for">for( ; ; )\n{\n|\n}</item>

 98      <item name="while">while()\n{\n|\n}</item>

 99      <item name="switch">switch()\n{\n  case:\n  |\n  default:\n}</item>

100    </menu>

101

102    <menu name="Methods/Classes">

103      <item name="abstract">abstract</item>

104      <item name="class">class</item>

105      <item name="extends">extends</item>

106      <item name="final">final</item>

107      <item name="import">import</item>

108      <item name="implements">implements</item>

109      <item name="interface">interface</item>

110      <item name="native">native</item>

111      <item name="new">new</item>

112      <item name="package">package</item>

113      <item name="private">private</item>

114      <item name="protected">protected</item>

115      <item name="public">public</item>

116      <item name="return">return</item>

117      <item name="synchronized">synchronized</item>

118      <item name="static">static</item>

119      <item name="super">super</item>

120      <item name="this">this</item>

121      <item name="throw">throw</item>

122      <item name="throws">throws</item>

123      <item name="threadsafe">threadsafe</item>

124      <item name="transient">transient</item>

125    </menu>

126		<menu name="Wizards">

127			<item name="constructor" type="xinsert_script">{%className "Class Name:"}{%identifier "Choose an identifier:" "public" "protected" "private" ""}{$=identifier} {$=className}

128{

129	|

130}</item>

131			<item name="method" type="xinsert_script">{%methodname "Method Name:"}{%identifier "Choose an identifier:" "public" "protected" "private" ""}{%return "Return type:" "void" "int" "double" "long" "short" "float" "String" ?}{$=identifier} {$=return} {$=methodname}()

132{

133	|

134}</item>

135			<item name="variable" type="xinsert_script">{%varname "Variable Name:"}{%vartype "Variable Type:" "int" "double" "float" "long" "short" "byte" "char" "String" ?}{%identifier "Choose an identifier:" "public" "protected" "private" ""}{$=identifier} {$=vartype} {$=varname};</item>

136		</menu>		

137    <menu name="Misc">

138      <item name="profiling">long ttim = System.currentTimeMillis();\n// ...\nSystem.out.println("time taken (millis): " + (System.currentTimeMillis() - ttim));</item>

139    </menu>

140

141    <menu name="Types/Values">

142      <item name="byte">byte</item>

143      <item name="boolean">boolean</item>

144      <item name="char">char</item>

145      <item name="double">double</item>

146      <item name="false">false</item>

147      <item name="float">float</item>

148      <item name="int">int</item>

149      <item name="long">long</item>

150      <item name="null">null</item>

151      <item name="short">short</item>

152      <item name="true">true</item>

153      <item name="void">void</item>

154    </menu>

155

156    <menu name="Imports">

157			<item name="java.applet">import java.applet.*;</item>

158      <item name="java.io">import java.io.*;</item>

159      <item name="java.math">import java.math.*;</item>

160      <item name="java.net">import java.net.*;</item>

161			<item name="java.util">import java.util.*;</item>

162			<item name="java.text">import java.text.*;</item>

163			<item name="java.awt">import java.awt.*;</item>

164			<item name="java.awt.event">import java.awt.event.*;</item>

165			<item name="javax.swing">import javax.swing.*;</item>

166			<menu name="java.awt...">

167				<item name="java.awt.color">import java.awt.color.*;</item>

168				<item name="java.awt.datatransfer">import java.awt.datatransfer.*;</item>

169				<item name="java.awt.dnd">import java.awt.dnd.*;</item>

170				<item name="java.awt.font">import java.awt.font.*;</item>

171				<item name="java.awt.geom">import java.awt.geom.*;</item>

172				<item name="java.awt.im">import java.im.*;</item>

173				<item name="java.awt.image">import java.image.*;</item>

174				<item name="java.awt.image.renderable">import java.image.renderable.*;</item>

175				<item name="java.awt.print">import java.print.*;</item>

176      </menu>

177			<menu name="javax...">

178				<item name="javax.accessibility">import javax.accessibility.*;</item>

179				<item name="javax.swing.border">import javax.swing.border.*;</item>

180				<item name="javax.swing.colorchooser">import javax.swing.colorchooser.*;</item>

181				<item name="javax.swing.event">import javax.swing.event.*;</item>

182				<item name="javax.swing.filechooser">import javax.swing.filechooser.*;</item>

183				<item name="javax.swing.plaf">import javax.swing.plaf.*;</item>

184				<item name="javax.swing.table">import javax.swing.table.*;</item>

185				<item name="javax.swing.text">import javax.swing.text.*;</item>

186				<item name="javax.swing.text.html">import javax.swing.text.html.*;</item>

187				<item name="javax.swing.text.html.parser">import javax.swing.text.html.parser.*;</item>

188				<item name="javax.swing.text.rtf">import javax.swing.text.rtf.*;</item>

189				<item name="javax.swing.tree">import javax.swing.tree.*;</item>

190				<item name="javax.swing.undo">import javax.swing.undo.*;</item>

191			</menu>

192			<menu name="Other">

193      	<item name="java.rmi">import java.rmi.*;</item>

194				<item name="java.rmi.activation">import java.rmi.activation.*;</item>

195				<item name="java.rmi.dgc">import java.rmi.dgc.*;</item>

196				<item name="java.rmi.registry">import java.rmi.registry.*;</item>

197				<item name="java.rmi.server">import java.rmi.server.*;</item>

198				<item name="java.security">import java.security.*;</item>

199				<item name="java.security.acl">import java.security.acl.*;</item>

200				<item name="java.security.cert">import java.security.cert.*;</item>

201				<item name="java.security.interfaces">import java.security.interfaces.*;</item>

202				<item name="java.security.spec">import java.security.spec.*;</item>

203				<item name="java.sql">import java.sql.*;</item>

204				<item name="java.util.jar">import java.util.jar.*;</item>

205				<item name="java.util.zip">import java.util.zip.*;</item>

206				<item name="java.beans">import java.beans.*;</item>

207				<item name="java.beans.beancontext">import java.beancontext.*;</item>

208			</menu>

209      </menu>

210      <menu name="GridBag Layout">

211        <variable name="gridbag" value="gridbag" />

212        <variable name="constraints" value="c" />

213        <item name="Set Up...">GridBagLayout $gridbag = new GridBagLayout();\nGridBagConstraints $constraints = new GridBagConstraints();</item>

214        <item name="gridx">$constraints.gridx = |;</item>

215        <item name="gridy">$constraints.gridy = |;</item>

216        <item name="gridwidth" type="xinsert_script">{$$constraints}.gridwidth = {%val "Grid Width:" "GridBagConstraints.RELATIVE" "GridBagConstraints.REMAINDER" ?}{$=val}|;</item>

217        <item name="gridheight" type="xinsert_script">{$$constraints}.gridheight = {%val "Grid Width:" "GridBagConstraints.RELATIVE" "GridBagConstraints.REMAINDER" ?}{$=val}|;</item>

218        <item name="fill" type="xinsert_script">{%filltype "Fill Type:" "GridBagConstraints.NONE" "GridBagConstraints.HORIZONTAL" "GridBagConstraints.VERTICAL" "GridBagConstraints.BOTH"}{$$constraints}.fill = {$=filltype}|;</item>

219        <item name="ipadx">$constraints.ipadx = |;</item>

220        <item name="ipady">$constraints.ipady = |;</item>

221        <item name="insets">$constraints.insets = |;</item>

222        <item name="anchor" type="xinsert_script">{$$constraints}.anchor = {%anchor "Anchor to:" "GridBagConstraints.CENTER" "GridBagConstraints.NORTH" "GridBagConstraints.NORTHEAST" "GridBagConstraints.EAST" "GridBagConstraints.SOUTHEAST" "GridBagConstraints.SOUTH" "GridBagConstraints.SOUTHWEST" "GridBagConstraints.WEST" "GridBagConstraints.NORTHWEST"}{$=anchor}|;</item>

223        <item name="weightx">$constraints.weightx = |;</item>

224        <item name="weighty">$constraints.weighty = |;</item>

225        <item name="RELATIVE">GridBagConstraints.RELATIVE</item>

226        <item name="REMAINDER">GridBagConstraints.REMAINDER</item>

227        <item name="new insets">new Insets(0,0,0,0)</item>

228        <item name="setConstraints">$gridbag.setConstraints(|, c);</item>

229		</menu>

230</menu>