From: Richard Dale Date: 2005-04-29T02:49:28+09:00 Subject: Re: Ruby and IDE Paul Hanchett wrote: > Richard Dale wrote: > >> Code completion isn't easy to do in ruby, but apart from that it has most >> things on your list. I haven't used Eclipse, but I'd be interested in a >> review of that for ruby development, such as how the debugger compares >> with the other IDEs and so on. > > Isn't the thing that makes code completion difficult the fact that most > Ruby tools don't have a proper notion of a "Project"? PHP has a similar > issue, but in Eclipse I can define a PHP project. It scans the source > and presto completion works and so does a lot of other great stuff! No, the problem is that often you can't tell the type of a ruby variable until runtime (but can you do that for PHP either?). And we do discuss how to attempt to solve the problem quite regularly on this list. For instance, if I assign '@a = FooBar.new' and @a only gets assigned to in one place, then maybe I can assume variable '@a' is a FooBar, but other times it isn't so clear. I use that kind of hueristic for showing the type of a variable in the KDevelop class browser, but it's by no means water tight. Unless code completion is 100% reliable, it might well be more annoying than no code completion at all. KDevelop has the notion of a project, and it has code completion for C++ and other languages - so all the infrastructure is there. But, but.. > I haven't done much Ruby coding yet, so I can't say whether the Ruby > support for Eclipse does the same. I don't think the Eclipse plugin does code completion, but it's nice to get feedback on what the various tools do best and how they compare with each other. > (BTW, when I say "It's easy" I'm not claiming that I could do it. OK? > ;-) ) No problem, although actually I think you were wondering why we found it so difficult..