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 227946 - [cc] Support for @Delegate transformation
Summary: [cc] Support for @Delegate transformation
Status: STARTED
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:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-26 12:19 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 12:19:46 UTC
As shown in link [1], groovy supports @Delegate annotation which can be used within a class definition on a specific field. It results in delegating all method calls on declaring class to that specified field.

Our code completion should take this transformation into account and show all methods of each @Delegate field.

Example:

interface Whatever {
    void showMe();
}

class Implementor {
    @Delegate Whatever w
    void normal();
}

Implementor abc = new Implementor();
abc.^

.. using CC on the ^ location should shown showMe() method together with it's own methods.

[1] http://groovy.codehaus.org/Delegate+transformation
Comment 1 Martin Janicek 2013-03-27 10:14:21 UTC
Basic implementation done in: web-main #0a3e87374405
I'm going to add more tests
Comment 2 Quality Engineering 2013-03-28 02:14:40 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/0a3e87374405
User: Martin Janicek <mjanicek@netbeans.org>
Log: #227946 - [cc] Support for @Delegate transformation