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 227969 - [cc] Support for @Singleton transformation
Summary: [cc] Support for @Singleton transformation
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Martin Janicek
URL: http://groovy.codehaus.org/Singleton+...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-26 20:44 UTC by Martin Janicek
Modified: 2013-03-28 02:14 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 Martin Janicek 2013-03-26 20:44:06 UTC
As shown in link [1], groovy supports @Singleton annotation which can be used directly on a class definition. This AST transformation results in creation of the field called "instance" and accessor method called "getInstance()".

Our code completion should take this transformation into account and show both field and method when @Singleton is used.

Example:

@Singleton
class Showcase {
}

Showcase show = new Showcase();
show.^

.. using CC on the ^ location should shown instance field and getInstance() method.

[1] http://groovy.codehaus.org/Singleton+transformation
Comment 1 Martin Janicek 2013-03-26 21:15:56 UTC
Fixed in: web-main #5a5c60a752a3
Comment 2 Martin Janicek 2013-03-27 10:13:14 UTC
Related commit: web-main #578de036632b
Fixes use case when code completion is invoked without any prefix
Comment 3 Quality Engineering 2013-03-28 02:14:22 UTC
Integrated into 'main-golden', will be available in build *201303272300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5a5c60a752a3
User: Martin Janicek <mjanicek@netbeans.org>
Log: #227969 - [cc] Support for @Singleton transformation