History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-5197
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: Erik Rasmussen
Votes: 1
Watchers: 1
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

"Go To Initialization" menu item under "Go To" menu

Created: 08 Aug 07 14:13   Updated: 17 Aug 07 00:40
Component/s: Code Navigation
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,111
Severity: Medium


 Description  « Hide
Here's my problem... In several places in my code, due either to how java does static initializations or treats final variables, I have to have my variable declaration and initialization on separate lines. Like so:

public static final Foo THE_FOO; // line X

static

{ THE_FOO = new Foo(); // line Y }

Right now, when I'm using THE_FOO in some code in another class somewhere, if I place my cursor on the variable, I can jump to the declaration with "Go To Declaration", but that only jumps me to line X, and what I'm really interested is line Y. It would be nice if there was a "Go To Initialization" that could get me to line Y directly. If there are multiple initialization lines, it could pop up a little box like the "Go To Implementation(s)" does.

Doesn't this sound useful? If this feature is already present, then I apologize, but I sure can't find it!



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Jemerov - 16 Aug 07 18:37
The number of cases when such feature would be useful is too limited to spend the UI real estate (and perhaps keyboard shortcuts) on that. You can use Ctrl-Alt-F7 to quickly see all usages of the field and jump to the one which initializes it.

Erik Rasmussen - 16 Aug 07 23:22
Could it not live in the "Other" section in the Keymap preferences? It just seems handy and pretty trivial to implement considering the robust code tree model you must have under the hood.

Thanks for pointing out the "show usages" shortcut. That was new (or forgotten) to me.


Dmitry Jemerov - 17 Aug 07 00:40
That's indeed pretty trivial to implement, so this feature is a good candidate for a third-party plugin.