Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jdt-dev] Code template advanced use

Hi, Olivier.

Can you please post this to the eclipse.tools.jdt newsgroup?  The
jdt-dev mailing list is intended for discussions by people working on
the JDT codebase, not really for general questions about using JDT.  If
you post to the newsgroup, more readers will be able to benefit from the
answer in the future, and your post will be read by more people who
might be able to answer it.

Thanks!

 

-----Original Message-----
From: jdt-dev-bounces@xxxxxxxxxxx [mailto:jdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of olivier2019
Sent: Friday, April 04, 2008 4:52 AM
To: jdt-dev@xxxxxxxxxxx
Subject: [jdt-dev] Code template advanced use


Hi. I've got a simple problem with eclipse code formatter, and no
solution.

the problem : 

Given a class 'Computer'

With a method :

 
public Float compute(String param1,Object param2) {
 
}
 

I would like to have a code template (CTRL+ESPACE magic) that gives

 
public Float compute(String param1,Object param2) {
   Float result = null;
   boolean trace = log.isDebugEnabled();
   if (trace)
   log.debug("BEGIN -
Computer.compute(param1="+param1+",param2="+param2);
   
   if (trace)
	log.debug("END - Computer.compute()");
   return result;
}
 

I have already done a template, but i can't find a solution for the
iteration on the method parameters.

Can someone help ?

Thanks VERY VERY much
Here is my eclipse template :
 
boolean trace = log.isDebugEnabled();
if (trace)
	log.debug("BEGIN: ${enclosing_type}.${enclosing_method}");
 
if (trace)
	log.debug("END  : ${enclosing_type}.${enclosing_method}");
 
--
View this message in context:
http://www.nabble.com/Code-template-advanced-use-tp16467365p16467365.htm
l
Sent from the Eclipse JDT - General mailing list archive at Nabble.com.

_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-dev


Back to the top