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 183101 - [69cat][ruby] Code Completion should order self methods first always.
Summary: [69cat][ruby] Code Completion should order self methods first always.
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@ruby
Depends on:
Reported: 2010-03-29 15:40 UTC by esmithbss
Modified: 2011-01-28 20:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2010-03-29 15:40:16 UTC
Product Version = NetBeans IDE Dev (Build 201003290201)
Operating System = Linux version 2.6.32-17-generic running on i386
Java; VM; Vendor = 1.6.0_18
Runtime = Java HotSpot(TM) Client VM 16.0-b13

When using the context sensitive code completion capabilities by hitting <ctrl><space> or letting the window pop-up in time, the list of options should always start with the methods/members from the local object context


Create a new Ruby Class (perhaps a model for a Rails application).
Add a few methods:  Perhaps methods alpha, beta, gamma, delta
Within one of the methods, add the line "self." then hit <ctrl><space>

At this point, you get a code-completion block with methods from all objects.

hit the b key, the list is now topped by a section with the local method b, followed by other b methods, then the rest of the code.

We should see a list of local functions when we hit the <ctrl><space> initially.  So there should effectively be a class order distinction.
Comment 1 Erno Mononen 2010-04-01 11:35:13 UTC
Do you get code completion from all object, or just the inherited methods? The latter is how it is supposed to work. In AR model classes the list of methods is of course rather long.
Comment 2 esmithbss 2010-04-01 18:01:05 UTC
There are two separate views that I see.  The first which appears to have everything and the kitchen sink is seen when I first trigger the code completion at the period separator.

The second which is a filtered list with the top section separated int the local methods requires me to enter at least 1 character past the period.

Based on your comment, I believe there is an edge condition that is not being fulfilled in determining what to show for code completion.