RFR: 8346610: Make all imports consistent in the FFM API
Henry Jen
henryjen at openjdk.org
Wed Jan 15 02:23:42 UTC 2025
On Wed, 8 Jan 2025 09:08:11 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> > Do we have a sense on how easy would it be, moving forward, to preserve the "correct" order of imports? E.g. if I add a new one using IntelliJ autocompletion, where would it end up? Has this patch been generated using the IDE's own import reorganization? Perhaps doing something like that might be preferrable/more maintainable longer term?
>
> The updates in this PR were generated automatically by selecting the relevant packages and then using IntelliJ's automatic Code->Optimize Imports. It is possible to tell IntelliJ to make this automatically upon saving a file: https://www.jetbrains.com/help/idea/creating-and-optimizing-imports.html#optimize-on-save
I like auto import, it's great feature to ensure consistency. But the prerequisite is to have consistent settings in coding style(, and different IDEs would be different as well. https://www.jetbrains.com/help/idea/code-style-java.html#imports_table
Just curious, do we have a standard IntelliJ setting for OpenJDK coding style, perhaps it's prepared by `bash bin/idea.sh` mentioned in https://github.com/openjdk/jdk/blob/master/doc/ide.md?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22827#issuecomment-2591497703
More information about the core-libs-dev
mailing list