Bug 170203 - [select] Open Declaration with insertion point on constructor call opens in wrong place
Summary: [select] Open Declaration with insertion point on constructor call opens in w...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-11 06:27 EST by Timothy Mowlem CLA
Modified: 2009-04-28 03:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Mowlem CLA 2007-01-11 06:27:37 EST
Build ID: 3.3M4

Steps To Reproduce:
1. Place the insertion point on a line which calls a contructor
2. Click Navigate->Open Declaration or type F3
3. File of callee opens but the class declaration line is highlighted instead of the constructor declaration.


More information:
This happens even for a public class which declared a single public constructor. A direct import of the class was present, i.e.

import com.mycompany.mypackage.MyClass;
Comment 1 Frederic Fusier CLA 2007-01-11 09:58:49 EST
I cannot reproduce your problem with a simple test case:
MyClass.java:
  package com.mycompany.mypackage;
  public class MyClass {
	int x;
	public MyClass() {
		super();
	}
	public MyClass(int x) {
		super();
		this.x = x;
	}
  }

Test.java:
  package com.test;
  import com.mycompany.mypackage.MyClass;
  public class Test {
	MyClass mc = new MyClass(0);
  }

When I put the mouse pointer on MyClass constructor in Test, then F3 opens Test.java _and_ selects the correct constructor.

Can you provide a test case which reproduces the problem?
Thanks
Comment 2 Timothy Mowlem CLA 2007-01-12 16:15:20 EST
(In reply to comment #1)
> I cannot reproduce your problem with a simple test case:
> MyClass.java:
>   package com.mycompany.mypackage;
>   public class MyClass {
>         int x;
>         public MyClass() {
>                 super();
>         }
>         public MyClass(int x) {
>                 super();
>                 this.x = x;
>         }
>   }
> 
> Test.java:
>   package com.test;
>   import com.mycompany.mypackage.MyClass;
>   public class Test {
>         MyClass mc = new MyClass(0);
>   }
> 
> When I put the mouse pointer on MyClass constructor in Test, then F3 opens
> Test.java _and_ selects the correct constructor.
> 
> Can you provide a test case which reproduces the problem?
> Thanks

Sorry but I client confidentiality prevents me from posting an example.
Comment 3 David Audel CLA 2009-04-17 05:49:24 EDT
I cannot reproduce the problem.

As there is no test case to reproduce the problem i close this bug as WORKSFORME.
Comment 4 Srikanth Sankaran CLA 2009-04-28 03:01:30 EDT
Verified for 3.5M7 using I20090426-2000