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.
class Foo def self.bar end end 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 def self.bar end end end 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.
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.
I'm not sure what to do here - I'll see if I can get some UI team feedback.
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)
Reassigning this issue to newly created 'ruby' component.
Will attempt to address for 6.0
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.