Re: Unused import warnings


RadSolution
 

" Every IDE I have used makes a distinction between “organizing” imports and “removing unused” imports. "

...except Visual Studio, which does both with one mouse click.... ;-)


On Thursday, 3 October 2019, 02:50:39 BST, Randall Wood via Groups.Io <rhwood@...> wrote:


Every IDE I have used makes a distinction between “organizing” imports and “removing unused” imports.

Randall
> On Oct 2, 2019, at 18:47, Bob Jacobsen <rgj1927@...> wrote:
>
> And that’s great so long as those same clicks _don’t_ expand  `import java.util.*` into a flock of individual imports.  In the past, that’s been a collateral consequence.
>
> Note that I agree that reasonable people can differ on imports c.f. https://www.leadingagile.com/2018/12/the-importance-of-imports-in-java/ and I have _no_ problem with people removing individual unused imports; thank you to all that do that.
>
> At the same time, please understand that some of the JMRI development community don’t think that Huge Sequences Of Import Statements are readable, and prefers to remove them.  An `import javax.swing.*` is not a bad thing. Thank you to all that simplify those HSOIS occurrences.  (And, if you’re removing an import in a HSOIS, you can often quickly drag over N-1 of them, delete, and change the last word in the remaining one to a *)
>
> Bob
>
>> On Oct 2, 2019, at 12:24 PM, Randall Wood via Groups.Io <rhwood=mac.com@groups.io> wrote:
>>
>> The reality is that for an IDE user, removing every single unused or redundant (i.e. same package) import in JMRI is something like 4 clicks with a mouse, without touching a single file by hand.
>
> --
> Bob Jacobsen
> rgj1927@...
>
>
>
>
>
>



Join jmri@jmri-developers.groups.io to automatically receive all group messages.