This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198838 - Code template for pre-creation of return type code
Summary: Code template for pre-creation of return type code
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2011-05-23 23:56 UTC by pekarna
Modified: 2015-03-22 14:16 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description pekarna 2011-05-23 23:56:28 UTC
When you write

   public List<Message> getMessages( ... ){

then you're most probably going to create a List<Message> and return it at the end of the method.

I suggest to implement a "wizard" which would guide you through it:

   public List<Message> getMessages( ... ){
      List<Message> [list] = new [ArrayList]();

      return list;

with these points to be filled by user:

  1) name of the variable
  2) if return type is an interface, offer classes which implement it

As with all wizards, it's always easier to delete a line than write it, for the cases when user does not want to have it.

Thanks for considering.