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 101131 - toArray() code template
Summary: toArray() code template
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2007-04-16 12:12 UTC by _ tboudreau
Modified: 2010-01-24 08:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-04-16 12:12:14 UTC
I find the following code template extremely useful, and always set it up.  Any
reason not to add it to the default set?

${clazz}[] ${var} = (${clazz}[]) ${coll
instanceof="java.util.Collection"}.toArray (new ${clazz}[${coll}.size()])

I usually bind it to "2arr"

It would be a little nicer if "clazz" could automatically pick up the generic
type, if any, from the collection, but it looks like the template syntax doesn't
support that yet.
Comment 1 _ tboudreau 2008-10-20 23:24:00 UTC
Any chance of this for 7.0?
Comment 2 _ tboudreau 2010-01-21 21:02:34 UTC
Fixed as part of fix for bug 116449
Fixed in main/ 4beffcfd4006
Comment 3 Quality Engineering 2010-01-24 08:44:56 UTC
Integrated into 'main-golden', will be available in build *201001240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/4beffcfd4006
User: Tim Boudreau <tboudreau@netbeans.org>
Log: #116449, #167824, #108167, #173652, #173851, #101131, #173655 - additional Java editor hints, enhancements to existing ones, addition of module development-specific hints in apisupport.project