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 246630 - Find Usages for Collections could understand add/get
Summary: Find Usages for Collections could understand add/get
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
Depends on:
Reported: 2014-08-22 08:28 UTC by Svata Dedic
Modified: 2015-02-13 19:52 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2014-08-22 08:28:31 UTC
Current find usages correctly finds all usages through "." operator for Collection/Map - typed variables/fields, read/write filters filter reads/writes to the collection field/variable.

Sometimes it would be also useful to track reads and writes of the Collection through add/remove/set/put methods. This would probably result in additional filter buttons on the Find Usages Result display.

queries for size, empty, contains could be treated either as separate operations, or part of the 'read': the first option would really filter read operation of collection *items*, the second option would just separate collection mutations from read access. 

The same feature could be useful for arrays: read from within the array and write to array element, semantic the same as for List.get() / List.set().
Comment 1 Ralph Ruijs 2014-11-20 16:39:22 UTC
changeset:   0250d79f219f
user:        Ralph Benjamin Ruijs <>
date:        Thu Nov 20 17:33:38 2014 +0100
summary:     #246630 - analyze access to collections

Does this really need to be configurable?
Comment 2 Quality Engineering 2014-11-21 03:51:09 UTC
Integrated into 'main-silver', will be available in build *201411210001* on (upload may still be in progress)

User: Ralph Benjamin Ruijs <>
Log: #246630 - analyze access to collections
Comment 3 markiewb 2015-02-13 19:52:57 UTC
*** Bug 248273 has been marked as a duplicate of this bug. ***