aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes How To configure template for  StringBuilder in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How To configure template for  StringBuilder in eclipse" Watch "How To configure template for  StringBuilder in eclipse" New topic
Author

How To configure template for StringBuilder in eclipse

shyam sunder prasad
Ranch Hand

Joined: Mar 23, 2011
Posts: 62
Hi,

I have few statements like below,

"shyam"
"sunder"
"prasad"


so,i want to configure template to create StringBuilder for above strings in Eclipse , i have to get finally like,

StringBuilder sb=new StringBuilder();
sb.append("shyam");
sb.append("sunder");
sb.append("prasad");


please help me.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

A template will not work for this because a template is usually static text (though it allows some property substitution). What you really need is a macro. I used to write macros like this in my favorite text editors (UltraEdit and NotePad++), but I haven't used macro capabilities in Eclipse. If you search for "macro" in the Eclipse Marketplace, you will see a few plugin that provide keyboard macro capabilities. You might try them and report back on which one worked best for you to perform this task.


JBoss In Action
 
 
subject: How To configure template for StringBuilder in eclipse