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 91466 - "goto declaration" does not work when declaration is in another file
Summary: "goto declaration" does not work when declaration is in another file
Status: VERIFIED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-22 11:41 UTC by Tomas Danek
Modified: 2007-07-03 14:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
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-22 11:41:22 UTC
#196:

- in first file define some class with some method
- in second file, "require" first file, create instance of class from first
file, and invoke instance method. If you put caret on method invocation and try
try "go to|declaration". Nothing happens.

I think this can be qualified as a general feature, since i suppose that
currently one file "does not see other file"
Comment 1 Torbjorn Norbye 2007-02-01 07:22:13 UTC
This mostly works now; you can go to declarations in all the library and gem
classes. It also -sort- of works for classes in your own projects. There is
however a bug left where you have to trigger any edits you've made to the file
to get reflected in the index. Currently the easiest way to do that is to modify
the file, then invoke code completion. Now the file should get indexed. If you
go to your other file now and reference it it should show up both for go to
declaration and code completion etc.

I'm leaving this bug open to track this one issue.
Comment 2 Torbjorn Norbye 2007-02-01 08:14:18 UTC
I didn't mean to close this issue; I still want to track the last remaining issue.
Comment 3 Torbjorn Norbye 2007-02-03 01:58:30 UTC
I have fixed the bug now such that local source files are indexed (as you leave
them), which means you can now switch to another file and get completion on
require statements for local directories added (provided you added a Ruby file
there), completion on classes you've added to other files, etc.
Comment 4 Tomas Danek 2007-02-06 16:46:52 UTC
#273
does not work for me;
- created rubyapp
- created new script "hello.rb" in the same dir, and generate class "Hello" with  
class  method foo.
- in main.rb, typed
require '' and invoke CC inside - hello not found - (tracked in issue 93024)
- typed H and invoke CC - Hello class not present:( 
- continued to Hello. and invoke CC - no methods offered (only keywords and $ stuff)
- continued Hello.foo
- invoked Goto declaration on Hello - does not work
- run file (just to prove code is fine, contains no error)
Comment 5 Torbjorn Norbye 2007-02-14 19:19:48 UTC
This has been fixed recently.
Comment 6 Tomas Danek 2007-05-25 15:00:52 UTC
works fine now, verified in 20070525
Comment 7 Jiri Kovalsky 2007-07-03 14:06:56 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 8 Jiri Kovalsky 2007-07-03 14:46:43 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.