Blue Theme Orange Theme Green Theme Red Theme
 
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

NetBeans IDE 7.0 Code Templates

 by Deepak Kumar Verma on Jul 14, 2011

Code Templates are used to reduce code writing efforts. Thus, development time is also reduced.
Comments: 0 Views: 1288 Printable Version 

How to use Code Templates?
Write any abbreviation listed below and press Tab, the code will be generated.

Java Code Templates

Abbreviation Generated Code
En Enumeration
Ex Exception
Ob Object
Psf public static final
Psfb public static final boolean
Psfi public static final int
Psfs public static final String
St String
ab abstract
as assert true;
bcom /**/
bo boolean
br break;
ca catch (
cl class
cn continue
db double
df default:
dowhile do {
} while (condition);
eq equals
ex extends
fa false
fcom // <editor-fold></editor-fold>
fi final
fl float
forc for (Iterator it = collection.iterator();
it.hasNext();) {
Object elem = (Object) it.next();
}
fore for (Object elem : iterable) {
}
fori for (int i = 0; i < arr.length; i++) {}
forl for (int i = 0; i < lst.size(); i++) {
Object object = lst.get(i); }
forst for (StringTokenizer stringTokenizer = new StringTokenizer(STRING); stringTokenizer.hasMoreTokens();) {
String token = stringTokenizer.nextToken();
}
forv for (int i = 0; i < vct.size(); i++) {
Object object = vct.elementAt(i);}
fy finally{ }
ie interface
ifelse if (condition){}else {
}
iff if (exp) {}
im implements
inst  if (Double instanceof Object) {
Object object = (Object) Double;
}
iof instanceof
ir import
le length
na native
newo Object name = new Object(args);
pe protected
pr private
psf private static final
psfb private static final boolean
psfi private static final int
psfs private static final String
pst printStackTrace();
psvm public static void main(String[] args){
}
pu public
re return
runn Runnable runnable = new Runnable() {
public void run() {}};
serr System.err.println ("|");
sh short
sout System.out.println ("|");
soutv System.out.println("Object = " + Object);
st static
su super
sw switch (var) { case val: break;
default: throw new AssertionError();}
sy synchronized
tds Thread.dumpStack();
th throws
tr transient
trycatch try {}
catch (Exception e) {}
tw throw
twn throw new
vo volatile
wh while (
whileit while (it.hasNext()) {
Object elem = (Object) it.next();}
whilen while (en.hasMoreElements()) {
Object elem = (Object) en.nextElement();}
whilexp while (exp) {}

JSP Code Templates

Abbrivation Generated Code
ag application.getAttribute("|")
ap application.putAttribute("|",)
ar application.removeAttribute("|")
cfgi config.getInitParameter("|")
jspf <jsp:forward page="|"/>
jspg <jsp:getProperty name="|" property="" />
jspi <jsp:include page="|"/>
jspp <jsp:plugin type="|" code="" codebase=""></jsp:plugin>
jsps <jsp:setProperty name="|" property=""/>
jspu <jsp:useBean id="I" type=""/>
oup out.print("|")
oupl out.println("|")
pcg pageContext.getAttribute("|")
pcgn pageContext.getAttributeNamesInScope("|")
pcgs pageContext.getAttributesScope("|")
pcr pageContext.removeAttribute("|")
pcs pageContext.setAttribute("|",)
pg <%@page |%>
pga <%@page autoFlush="false"%>
pgb <%@page buffer="|kb"%>
pgc <%@page contentType="|"%>
pgerr <%@page errorPage="|"%>
pgex <%@page extends="|"%>
pgie <%@page isErrorPage="true"%>
pgim <%@page import="|"%>
pgin <%@page info="|"%>
pgit <%@page isThreadSafe="false"%>
pgl <%@page language="java"%>
pgs <%@page session="false"%>
rg request.getParameter("|")
sg session.getAttribute("|")
sp session.setAttribute("|", )
sr session.removeAttribute("|")
tglb <%@taglib uri="|"%>
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Team Foundation Server Hosting
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Not Available
Joined: Feb 07, 2011
Education: Not Available
 More Blogs from this Blogger
Keyboard Shortcuts for NetBeans IDE 7.0
NetBeans IDE 7.0 Code Templates
View all »
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.