I don't know the answer to this, but it might help someone who does know
the answer to understand what you're referring to a little bit better.

Most of the time, I don't notice any difference between how IntelliJ and
NetBeans format Java source, and what seems different turns out to be
different only because of the different bells and whistles of the two IDEs.
For example, here's an excerpt from a paintComponent() override copied and
pasted from one of my NetBeans Java projects:

        g.fillOval(DEFAULT_MARGIN + DEFAULT_ZERO_INDENT,
                DEFAULT_MARGIN + DEFAULT_ZERO_INDENT,
                DEFAULT_PIE_DIAMETER - 2 * DEFAULT_ZERO_INDENT,
                DEFAULT_PIE_DIAMETER - 2 * DEFAULT_ZERO_INDENT);

I copied and pasted this into IntelliJ and deleted all the extra spacing so
the whole thing would be on one line. Then I pressed Enter after each
comma, thinking IntelliJ was going to indent it differently. Nope.

g.fillOval(DEFAULT_MARGIN + DEFAULT_ZERO_INDENT,
        DEFAULT_MARGIN + DEFAULT_ZERO_INDENT,
        DEFAULT_PIE_DIAMETER - 2 * DEFAULT_ZERO_INDENT,
        DEFAULT_PIE_DIAMETER - 2 * DEFAULT_ZERO_INDENT);

The biggest difference here is that paste from IntelliJ retains IntelliJ's
rich text formatting and syntax highlighting, whereas the paste from
NetBeans was as plain text with no formatting whatsoever (I changed it to
fixed width to facilitate comparison). If we were to compare the source
files in Windows Notepad, we'd probably see they're exactly the same.

Is this the sort of thing you're referring to?

Al

On Tue, Oct 8, 2019 at 12:52 PM Emilian Bold <emilian.b...@gmail.com> wrote:

> I'm curious, can those formatting setting be used by anything else
> other than IntelliJ? I mean, is there some Maven Plugin, or bot or
> something that can format the code independently of IntelliJ?
>
> --emi
>
> On Tue, Oct 8, 2019 at 6:56 PM Miguel Cardoso Martins
> <miguelcardosomart...@gmail.com> wrote:
> >
> > Hi all
> >
> > Is there a way (plugin?) that allows for Intellij (CE) code formatting
> rules to be imported and used by NetBeans?
> > In Intellij one can export the formatting settings as xml or
> editorconfig.
> > I tried one editorconfig plugin for NetBeans but without success since
> the IDE froze everytime
> > i tried to format a file. So I am not sure if this would work or not.
> >
> > Any help would be appreciated, since this limitation is keeping me from
> using NetBeans for work.
> >
> > Thanks
> > Miguel
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

-- 
Alonso del Arte
Author at SmashWords.com
<https://www.smashwords.com/profile/view/AlonsoDelarte>
Musician at ReverbNation.com <http://www.reverbnation.com/alonsodelarte>

Reply via email to