Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Proposal: Refactoring "Remove unused members"

Hi,

I just thought about something else to tell in the "tip".

It probably makes sense to exclude JUnit-Tests from the search, as if they 
would be the only ones referencing the candidate it's propably still worth to 
remove the method and the tests. I don't see that automatic support for the 
removal would be a) much needed and b) hard to implement as the tests likely 
uses the candidate to build something better. 

Hence when removing the candidates the test code would break (compile error). 
Which can be fine or not. The refactoring is still preserving the behaviour 
of the "productive" code.

Another approach would be to change the second wizard page, presenting the 
user with the candidates for removal. 
The extension would be to also show elements which are referenced. When 
selecting a referenced member then the references will be shown in the lower 
part of the screen and the user can make an informed to decision to deprecate 
(even remove?) the element anyway.
But I believe that would be to complicate to understand for some users. Maybe 
a setting on the search page may help.
From my point of view this is a bit ugly and eventually something to do after 
the first release in any way.

Mariano




Back to the top