Bug 37509 - Open Declaration opens class declaration for local variables
Summary: Open Declaration opens class declaration for local variables
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 3345 37511 39361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-12 13:54 EDT by Uli Bubenheimer CLA
Modified: 2003-11-21 12:02 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uli Bubenheimer CLA 2003-05-12 13:54:05 EDT
When the cursor is positioned on a local variable representing an object, 
and "Open Declaration" is selected, e.g. from the pop-up menu, Eclipse opens 
the file where the variable's class is declared. Instead, Eclipse should just 
jump to the position of the local variable's declaration.

When the local variable has a primitive type, nothing whatsoever happens.
Comment 1 Philipe Mulet CLA 2003-05-13 06:11:03 EDT
This is the intended behavior. Currently, we do not have an element 
representation for local variables (which is what we answer back from 
codeselect). A text range would be more generic, but less informative for 
clients (like search references to selection).
Comment 2 Philipe Mulet CLA 2003-05-13 06:12:09 EDT
Forgot to mention that we plan to address this issue for 3.0.
Comment 3 Philipe Mulet CLA 2003-05-13 06:24:38 EDT
*** Bug 37511 has been marked as a duplicate of this bug. ***
Comment 4 Oyvind Harboe CLA 2003-05-23 04:06:39 EDT
Similarly. If you search for references of a local variable(e.g. "foo" below), 
it is the type that is search for in the entire project.


public class Foo
{
	int foobar;

	public void xxx()
	{
		Object foo;
	}
}
Comment 5 Philipe Mulet CLA 2003-09-02 09:14:08 EDT
*** Bug 39361 has been marked as a duplicate of this bug. ***
Comment 6 Jerome Lanneluc CLA 2003-10-23 10:41:39 EDT
ICodeAssist.codeSelect(...) now returns an ILocalVariable when the selection is 
a local variable reference/declaration. UI side should be fixed (see bug 45444)

Searching local variables is captured in bug 43967.

Tooltip for a local variable still doesn't work. Entered bug 45445.

Marking this bug as fixed as the JDT/Core side is now implemented.
Comment 7 Jerome Lanneluc CLA 2003-10-30 09:21:56 EST
*** Bug 3345 has been marked as a duplicate of this bug. ***
Comment 8 David Audel CLA 2003-11-21 12:02:39 EST
Verified.