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 99461 - Provide option to switch between 'lexical' and 'dynamic' view wrt. self
Summary: Provide option to switch between 'lexical' and 'dynamic' view wrt. self
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ruby
Keywords: UI
Depends on:
Reported: 2007-03-29 22:18 UTC by dinsley
Modified: 2011-01-28 20:10 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description dinsley 2007-03-29 22:18:51 UTC
class Foo

The navigator will correctly detect that the above is a class method when the
current class has a method implemented specified with the class as the reciever,
but gets confused if you define a set of class methods in the way shown below
and shows it as a class called 'self' with the methods as its children, instead
of just class methods as the above implementation does.

class Foo
  class << self

This is normally a preferred when declaring a large number of class methods as
you don't have to constantly type 'self.' as the reciever for the method.
Comment 1 Torbjorn Norbye 2007-03-30 20:37:16 UTC
This was actually intentional. Under the hood, I do determine that this class << self business is adding 
static methods to the outer class;  if you try a Foo.b (code completion) you'll see that it lists bar as a class 
method on Foo.  I had to fix this a while back since the ftools.rb file was using this technique to add static 
methods into the File class (#makedirs, #chmod, etc) and they weren't showing up in the index.

For the navigator on the other hand I thought it was useful to show the separate class definition as its own 
logical node, since it corresponds to a separate class structure (foldable and all) in the source.

Perhaps that's a bad idea. It should be easy to change.
Comment 2 Torbjorn Norbye 2007-06-19 22:57:41 UTC
I'm not sure what to do here - I'll see if I can get some UI team feedback.
Comment 3 dinsley 2007-06-21 22:39:41 UTC
Would it be feasible to have an option for this so that you could have it either way? (I know there's a freeze on right
now as you've said, but it might be something to think about for the future)
Comment 4 Jiri Kovalsky 2007-07-03 14:16:19 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 5 Torbjorn Norbye 2007-08-04 20:00:31 UTC
Will attempt to address for 6.0
Comment 6 Martin Krauskopf 2008-03-26 17:37:07 UTC
I agree with Tor here that navigator should be rather lexically-oriented. But an option to switch would be definitely
nice. Tweaking subject, changing to RFE.