Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How To configure template for StringBuilder in eclipse

 
shyam sunder prasad
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!