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

Summary: [cc] Support for @Delegate transformation
Product: groovy Reporter: Martin Janicek <mjanicek>
Component: EditorAssignee: Martin Janicek <mjanicek>
Status: STARTED ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

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