Bug 367223

Summary: [javadoc] Show array index of hovered element in the hover
Product: [Eclipse Project] JDT Reporter: Nathan Reynolds <numeralnathan>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: daniel_megert
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Nathan Reynolds CLA 2011-12-20 12:20:52 EST
Build Identifier: 20110916-0149

When navigating through an array in the Java editor, an array index doesn't popup in a tool tip.

A tool tip should show up displaying the array index.  For example, if my
cursor is position somewhere on "two" (in the code below), a tool tip should pop up saying "numbers[2]".

For multi-dimensional arrays, the tool tip should say "numbers[2][5][1]".

This will great aid writing and maintain long or complex initialization arrays.

Reproducible: Always

Steps to Reproduce:
1. Create the following array in a Java method:  String numbers[] = new String
[] {"zero", "one", "two", "three"};
2. Place the cursor at some element in the array.
3. No tool tip pops up showing the current array index.
Comment 1 Dani Megert CLA 2011-12-21 02:49:50 EST
Note that this can get quite complex, since not all array declarations are that simple and can be deeply nested.