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 98852 - Code completion for attr_accessor, class variables not working
Summary: Code completion for attr_accessor, class variables not working
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 21:37 UTC by fabian_e
Modified: 2008-08-23 05:42 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 fabian_e 2007-03-23 21:37:24 UTC
Code completion doesn't work for attr_accessor and class variables, e.g.:

#super song
class Song
  @@songcounter=0
  #new comment
  def initialize(name="test")
    @@songcounter=@@songcounter+1
    @name=name
  end
  attr_accessor :age, :name
  def sing(text="lala")
    puts text
  end
end

ss = Song.new()
ss.sing # is completed
ss.age # not completed
ss.songcounter # is not shown, but
ss.@@songcounter # is shown
Comment 1 Torbjorn Norbye 2007-06-19 22:47:17 UTC
The attributes part (attr_accessor) has been fixed; "age" does show up in code completion now. Classvars still need to be fixed.
Comment 2 Jiri Kovalsky 2007-07-03 13:59:07 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 3 Torbjorn Norbye 2008-08-23 05:42:09 UTC
This should be working now. I don't think it's valid to try to access the fields directly like that on an object (indeed
if I try to run the code, it gives an error message).  The attributes are properly included.