Skip to content

Wrong code assist order in method call completion #287

@mauromol

Description

@mauromol

From the old GRECLIPSE-1800

Consider the following:

package c 
class C { 
    class MyBean { 
        String foo 
        int bar 
    } 
    class AnotherClass { 
        int createInt() { 
            return 1 
        } 
        String createString() { 
            return 'foo' 
        } 
    } 

    void doSomething() { 
        def a = new AnotherClass() 
        def b = new MyBean() 
        b.foo = a.cre|
    } 
}

When invoking code assist at | Greclipse is curently suggesting c.C.AnotherClass.createInt() before c.C.AnotherClass.createString(), I suspect following an alphabetical criteria, but I would expect the latter one to be proposed first, since c.C.MyBean.foo is of type String.
The same applies with the following alternative invocation:

        b.with { 
            foo = a.cre|
        } 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions