go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.57k stars 573 forks source link

Code completion doesn't work for pointer and ... #93

Closed AlexLuya closed 12 years ago

AlexLuya commented 12 years ago

1,doesn't work for pointer properly

type CustomizedType struct{
   Field0 string
}
//with one method
func (t *CustomizedType) method0(){}

/// ...................
//if passing by poniter
func caller(pointer *CustomizedType){
      //here,type:"pointer.",only Field0 got displayed in 
      //suggestions popup
}
//if passing by value
func caller(value CustomizedType){
      //here,type: "value.",both Field0 and method0 got displayed in 
     //suggestions popup
}

2,doesn't work properly for type assert

if x's actual type is Type0(define above)


    y:=x.(Type0)    //  y+"." will not show Field0
    //but
    x.(CustomizedType). // directly   will show Field0

and I noticed,all methods of CustomizedType don't get shown in structure view

Thank you,util now,you guys provide best IDE for golang.

By the way,you may know gocode:https://github.com/nsf/gocode/ ,it works quite well,problems above don't existed in the IDEs integrated with gocode,you may use it.

mtoader commented 12 years ago

There is a completely different architecture between how we do it and how go code works. I really think the way we do it can be way more powerful because it can enable a more complete type analysis which in turn can add better refactorings/inspections/intentions/etc.

The issues you pointed out were kind of known but since we wanted to see what people think we went ahead with them anyway :). They will be fixed.

AlexLuya commented 12 years ago

Thanks,I did a little bit updates about issue.

mtoader commented 12 years ago

Hey alex. Can you look over the examples in this issue and give me definition of Type0 ?

mtoader commented 12 years ago

Hi Alex,

Can you let me know how the completion works for you right now ?

Mihai

AlexLuya commented 12 years ago

Yes,it works now,thanks.

Date: Fri, 3 Aug 2012 10:52:04 -0700 From: reply@reply.github.com To: alex.luya@hotmail.com Subject: Re: [google-go-lang-idea-plugin] Code completion doesn't work for pointer and ... (#93)

Hi Alex,

Can you let me know how the completion works for you right now ?

Mihai


Reply to this email directly or view it on GitHub: https://github.com/mtoader/google-go-lang-idea-plugin/issues/93#issuecomment-7489556