rossluk opened a new pull request, #5900:
URL: https://github.com/apache/netbeans/pull/5900

   Hi,
   This PR adds "append uses" logic (import use one by one) for 
FixUsesPerformer to have ability to use the same logic (classes) for inline 
"use import" like in AddUseImportSuggestion. Also it includes refactoring for 
AddUseImportSuggestion to use FixUsesPerformer instead of its own logic. I know 
that implementation is not an ideal, but I believe it would be more convenient 
and much easier to maintain same logic in one place, and such changes could 
allow to implement, for instance, something like PhpStorm auto import in the 
feature if needed. 
   
   Changes are pretty complex and I think there weren't much people using 
AddUseImportSuggestion logic (because it was useless for a long time due to 
wrong class detection, ignoring traits, types, return types, functions etc.), 
but I hope now it's more useful, however I am still not sure that changes will 
be approved, so I committed final logic (only with initial tests) and decided 
to discuss my changes and additional change to previously committed logic here:
   
   - While I was working on the PR there was added PSR12 formatting and it's 
fine, I aligned the logic due to it, but I'd like to suggest moving the "psr12 
sorting checkbox" to the editor general uses options (where "prefer grouping" 
and other such option are situated) and change it to something like "Sort uses 
radiobutton - Alphabetical/PSR12", what do you think? Such change needed to 
have ability using the same option globally (like prefereGroupings etc) for 
AddUseImportSuggestion as well. 
    
   If it is approved I am going to add more tests for both classes 
FixUsesPerformer and AddUseImportSuggestion. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to