New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alis of package name in Eclipse #159
Comments
FWIW, this works in GoSublime and the latest gocode for me. Are you sure there isn't more to the source code than the snippet you type up? |
It looks weird, yes, this "feature" worked for years and does work. If you can give me an exact file where it fails on goclipse, I can try it on one of other editors. By exact file I mean of course a short example if you can make one. Sure bugs are possible, but I need a way to reproduce them. |
Well...it works fine in new empty project. |
As I said, maybe it is a bug indeed. But I need a way to reproduce it. You can try shrinking your "old project" line by line until bug disappears and it may give me some clue where it happens. And perhaps you can actually create a minimalistic example of the reproducable case. Also maybe it's some weird cache bug, try restarting gocode and see if it fixes the problem. |
Ok, I think I found the problem. |
It shouldn't be a problem. Gocode understands utf-8 just fine. Perhaps goclipse passes a wrong cursor position. |
Here's the thing, eclipse has this API function: So, I'll keep trying to figure that out and let you know. GoClipse passes that offset assuming it's offset in characters. |
Also if you can give me a short example with the chinese comment where goclipse fails, that would be nice. I'll try it in my text editor and see if it works there. |
Here it's ~
|
I found that some chinese character can pass, some others cannot.
|
http://www.moransoft.com/chinesecode.html |
It works just fine in emacs as you can see on the screenshot. Then it must be a goclipse problem. |
If some chinese characters pass and some doesn't. It could be a utf-16 issue. Java uses utf-16 for strings as far as I know and in that case cursor position must be in utf-16 code points and as we know, some unicode code points are encoded using two utf-16 code points. Really we should ask goclipse guys, they know better why it happens. |
And your "fmt" example works in emacs as well, all four cases. |
Thanks a lot. |
Try a different text editor is my advice :) Like GoSublime or something. |
I'll try :3 |
The alis name of package won't autocomplete at all.
Version
Eclipse: Build id: 20130225-0426 (Juno)
Golipse: 0.7.6v439
Gocode: Newest Version ( Today )
Go: go1.1
The text was updated successfully, but these errors were encountered: