Bug 100790 - Open declaration doesn't work if constructor not found
Summary: Open declaration doesn't work if constructor not found
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 minor with 1 vote (vote)
Target Milestone: 3.5 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-20 06:21 EDT by Max Gilead CLA
Modified: 2009-04-28 02:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Gilead CLA 2005-06-20 06:21:12 EDT
Open declaration (F3) doesn't work if constructor not found. Consider this
(invalid on purpose) code:

$ cat foo/Klass.java
package foo;

public class Klass
        {
        public Klass(String a)
                {
                new foo.bar.Klass("");
                }
        }
$ cat foo/bar/Klass.java
package foo.bar;

public class Klass
        {}

Putting cursor on Klass at "new foo.bar.Klass("");" line should jump to
foo.bar.Klass but instead cursor moves to head of foo.Klass. It moves correctly
if eg. constructor exists but is invisible.
Comment 1 Jörg Heinicke CLA 2006-03-13 06:35:43 EST
Same cause, another symptom: import a class "foo.Klass" and specify a second class with its full name "foo.bar.Klass". Calling a non-existing constructor of the second lets "open declaration" jump to the imported class instead of to the one specified by the full class name, here "foo.Klass".

import foo.Klass;

public class Test {

    public void test() {
        new foo.bar.Klass();
    }

}
Comment 2 David Audel CLA 2009-04-20 05:00:34 EDT
I can not reproduce the bug in I20090407-1430.

I close this bug as WORKSFORME.
Comment 3 Srikanth Sankaran CLA 2009-04-28 02:16:58 EDT
Verified for 3.5M7 using I20090426-2000