-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change code style to refer to the one from maven-shared-resources #329
Conversation
Maybe point the download links to ASF gitbox instead of a "just a mirror" GH? |
Download <<<{{{https://github.com/apache/maven-shared-resources/blob/master/src/main/resources/config/eclipse-formatter-config.xml}eclipse-formatter-config.xml}}>>> | ||
and import it into IDEA using Intellij IDEA > Preferences > Editor > Code Style > Java > Gear icon > | ||
Import Scheme > Eclipse XML Profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link is for eclipse-formatter-config.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slawekjaranowski YES ! A single file is used. The recent versions of IDEA allow importing eclipse config files 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is NOT a "latest" IDEA feature at all, it is since a while, that IDEA supports eclipse XML import....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as @cstamas on 2022.2.1 Community Edition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supported since 2014 it seems https://blog.jetbrains.com/idea/2014/01/intellij-idea-13-importing-code-formatter-settings-from-eclipse/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slawekjaranowski Eclipse Interoperability plugin disabled maybe? (by default is enabled, unless you tampered with it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, given we enforce a 120 characters hard break on lines, I wonder if we should switch to header formatted in the same way, something like
|
@cstamas |
I tested importing importing eclipse formats ... into InteliJ,
how we will manage it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention that plugin Eclipse Interoperability
must be enable.
Meh, you're right. We could tell users that imports won't be sorted and that they need to either add those or rely on the impsort plugin wich will fix those. Alternatively, we can add back idea settings, but I'd rather avoid it. We can generate it by importing the eclipse settings into IDEA, fix the import settings to comply with maven code style and export those settings. But we'd have to put them in maven-shared-resources also I suppose. |
I'm for preserve native settings for InteliJ, it can be in m-shared-r. It will be easier for user to simply import settings. We have also import settings for eclipse in https://github.com/apache/maven-site/blob/master/content/resources/developers/maven-eclipse.importorder so this file should be moved to shared to have everything in one place. |
PR following up apache/maven-shared-resources#1 to use a single reference for code style formatting.