简体   繁体   中英

How to easily differentiate variables with the same name from different classes

I have been searching on my workspace in Eclipse. One of the variables declared in ClassA is:

private String type = null;

type is such a common name, so there are probably several variables in different classes throughout different projects in the whole workspace called "type" (some of same data type and some of different data types).

Other than the view Call Hierarchy , how can I see the different files where this particular "type" variable from ClassA is used when I do Search -> File?

If you are searching within your project for all references to the variable of a specific class, the IDE should have a built in feature to find all references to that variable. I know in IntelliJ I can do that. Not positive on how in Eclipse you'd do that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM