This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91278 - Provide some basic method code completion
Summary: Provide some basic method code completion
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


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.