Bug 239108 - Enhance Find Unreferenced Members
Summary: Enhance Find Unreferenced Members
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2008-07-01 08:21 EDT by dev2null CLA
Modified: 2019-09-06 15:33 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dev2null CLA 2008-07-01 08:21:12 EDT
Build ID: N/A

Steps To Reproduce:
The Find Unreferenced Members action in the Core Tools plugin is a great tool for finding potential dead code! However it would be nice is some configuration could made to the plugin as outline below.

1. Create a new Java Project with two source folders src/main/java and src/test/java.
2. Add a class Foo with a method dummy() to the src/main/java folder
3) Add a Junit test FooTest that tests the dummy() method in Foo to src/test/java folder
4. Install The Core Tools Plugin (http://www.eclipse.org/eclipse/platform-core/updates/)
5. Right-click on the src/main/java folder and select Find Unreferenced Members

Now Foo.dummy() is not reported as unused as the compilation unit (?) as FooTest refers to the class. 

A preference page should be added for configuring the find unreferenced members action. A simple configuration option could be to add a "Ignore references from paths matching "vale", e.g. src/test/java. References that from source files matching the path set in the configuration should be ignore. If no path string is specified in the preference page all referring classes should be considered.

The Find Unreferenced Code action should also be configurable to ignore the serialVersionUID field for classes implementing java.io.Serializable.


More information:
The bug should probably be filed against JDT.. I've patched the core-tools plugin locally to add the enhancement requested in this bug report but it would be nice to see an updated official version of core-tools.
Comment 1 Eric Moffatt CLA 2008-07-02 11:18:43 EDT
Passing to JDT for comment, punt back if it's not the right component.
Comment 2 Martin Aeschlimann CLA 2008-07-02 11:47:21 EDT
I think this is from Platform Core (John)
Comment 3 John Arthorne CLA 2008-07-02 12:22:45 EDT
Can you give a patch for this?
Comment 4 Eclipse Webmaster CLA 2019-09-06 15:33:06 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.