Thanks Fabian, I was looking at doing a spot bugs plugin, but Walters email here got me thinking that this would be an idea for a much simpler plugin to get started with ;) I'll come back to the spot bugs one later on.
Based on how the google style library works I can provide a string, effectively the class being saved, and it formats it and returns the formatted version of it, hence I effectively remove the contents of the document and then re-add the new version of it - this is where the cursor and break point info is lost. I'll take look at your plugin later on when I get home. Regards John On Wed, 20 Nov 2019 at 13:14, Fabian Bahle <[email protected]> wrote: > Hi John, > > I took over the eclipse code formatter plugin for NetBeans just some days > ago and actually thought about integrating the Google Code Formatter too, > but as you were faster then me, I might postpone or even cancel it. > Regarding your open issues, maybe you want to check the code from markiewb > in https://github.com/funfried/eclipsecodeformatter_for_netbeans < > https://github.com/funfried/eclipsecodeformatter_for_netbeans>, maybe > that helps to fix your issues. > > Kind regards, > Fabian > > > > Am 20.11.2019 um 00:55 schrieb John McDonnell <[email protected] > >: > > > > Hi Walter, > > > > I threw together a basic plugin relatively quickly on GitHub for the > Google Code Style for Java: > > https://github.com/mcdonnell-john/nb-google-java-code-formatter-plugin > > > > You can clone it and build it from there, or the first version should be > published to Maven Central and downloadable from there in a few hours, and > then install into your NetBeans 11.2 IDE. > > > > Once installed it should add a project level property setting to enable > formatting on save. Note, theres 2 current issues with this version: > > 1. the cursor position is lost on save > > 2. breakpoints are lost on save > > > > I'll try and look into them as I go, and I have 2 open issues on GitHub > to track these as well. If you decide to try this out, and witness any > other issues, or have other ideas for enhancement please feel free to raise > an issue on GitHub? > > > > Its definitely to be considered a work in progress... > > > > Regards > > > > John > > > > On 2019/11/13 17:52:44, Thomas Kellerer <[email protected]> wrote: > >>> I would have one question about code style support. > >>> Are you planning to add support of the google style guide for Netbeans > in > >>> the near future? > >>> We would like to become an IDE independent developer group in here at > >>> Nokia. We really like Netbeans and other major IDEs in here. > Unfortunately > >>> Netbeans is the only one IDE from the major IDEs that can't support the > >>> google style guide as a common formatting options. > >> > >> You'll probably get better responses if you describe what kind of > formatting rules you can not configure with the built-in NetBeans Java > Formatter. > >> > >> (I wasn't even aware that Google hat their own coding style rules) > >> > >> Thomas > >> > >> > >> --------------------------------------------------------------------- > >> 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 > >> > >> > >> > >> > > > > --------------------------------------------------------------------- > > 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 > > > > > > > > > >
