This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256207 - [81cat] Improvement to "goToType" feature.
Summary: [81cat] Improvement to "goToType" feature.
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 8.2
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-27 15:04 UTC by -Silver-
Modified: 2016-07-16 17:17 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description -Silver- 2015-10-27 15:04:41 UTC
This is a very small enhancement.

Suppose to have this code:

public class Declaration {
  public void method() {
    List a = null;
      a.add(new Declaration());
      perform();
    }
}

1. Put the caret on the method add call on line 4 like this:
   a.ad|d(new Declaration());
2. Press CTRL+O

Current behavior:
The Go To Type popup is opened and the field TypeName is prefilled with "add" because the cursor is placed on the method add(..) call.

Enhancement suggested:
The Go To Type popup is opened and the field TypeName is prefilled with "List" because the cursor is placed on the method add(..) that is called on "a" that is an instance of "List".
This could be applied in general also when a variable name is selected (except for primitive types in which case the field should be prefilled with an empty string and not with the name of the variable)