Bug 91278 - Provide some basic method code completion
Provide some basic method code completion
Status: RESOLVED FIXED
Product: ruby
Classification: Unclassified
Component: Code
6.x
PC Linux
: P1 (vote)
: 6.x
Assigned To: Torbjorn Norbye
issues@ruby
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-19 14:17 UTC by Tomas Danek
Modified: 2007-07-03 14:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2006-12-19 14:17:06 UTC
example:

class Foo
  def initialize(var)
    @instanceVariable = var
  end
end
f = Foo.new("foo")
f. -----------> CTRL+SPACE

I suppose that after parsing this is editor aware that "f" is an instance of
class Foo. Thus code completion could provide methods of class Foo, and of
classes in inheritance tree up to Object?! (something like IRB does)
Comment 1 Torbjorn Norbye 2007-02-01 07:19:40 UTC
The situation for IRB and the editor is quite different; IRB is working on a
live executing program, so it's easy for it to know the actual type of f - and
the available methods on it.   In the editor we need to rely on static analysis,
which is possible in some cases (such as the quoted example) and also not
possible in others.

The synopsis of this bug is "Provide Some Basic Code Completion for Methods",
and that is there today. If you try to get completion on f. today, you get to
see ALL methods Ruby knows about (unless the left hand side expression is known,
such as "self" or "super").  If you try to get method completion without a dot
operator, you get to see inherited methods.

I will work on dataflow to make this better for dotted operators, but that falls
outside the "Basic" category of code completion so I'm closing this as fixed.
Comment 2 Jiri Kovalsky 2007-07-03 14:02:11 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 3 Jiri Kovalsky 2007-07-03 14:44:32 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo