My team uses NetBeans and has coalesced around NetBean's default formatting. Is there way to import NetBeans formatting rules for Java into Eclipse? There are a lot of Eclipse format plugins for NetBeans but none for the other way around, that I can find.
1 Answer
A quick look at the source code for the indenter gives me the impression that the formatter classes are tightly coupled to the editor and other netbeans-specific classes. Creating such a plugin would require bringing in these dependencies, along with the Netbeans platform to connect the pieces.
I wouldn't hold my breath for such a plugin to become available.
If you have the authority to challenge the team's decision, you could use this maven plugin, tied to the lifecycle so that builds trigger a code reformat using eclipse's formatter. This way you lose one or two seconds when you build, but you don't have to explicitly reformat the files.
-
Here is the better link: github.com/revelc/formatter-maven-plugin Oct 25, 2018 at 1:51