Formatting problems in v8

Hi all,

We recently switched to IntelliJ 8, and since then we're seeing some very strange formatting behaviour. We also switched from IPR format to .idea, so I don't know if something in our settings might have been changed in that process. Code that previously formatted like this:

  private final Map<String, ContractorDatatypeMap[]> contractorOutputByPortName
      = new HashMap<String, ContractorDatatypeMap[]>();

now formats like this:

  private final
  Map<String, ContractorDatatypeMap[]>
      contractorOutputByPortName
      = new HashMap<String, ContractorDatatypeMap[]>();

Which is pretty ugly. I can't see any setting that might have caused this, does anyone know why this might be happening?

Cheers,
Colin

5 comments
Comment actions Permalink

*bump*

Any ideas about this? Does anyone else see this? Do I have something screwed up in my settings somehow?

Thanks,
Colin

0
Comment actions Permalink

have you checked your "Assignment statement" settings? (wrapping)..that's the only one I can thing of...

0
Comment actions Permalink

Hello Colin,

Please verify that the right margin is set to a reasonable value in the code
style settings. Also please check the settings in Code Style | Wrapping.
"Assignment sign on next line" and "Wrap after modifier list" options shouldn't
be checked.

We recently switched to IntelliJ 8, and since then we're seeing some
very strange formatting behaviour. We also switched from IPR format to
.idea, so I don't know if something in our settings might have been
changed in that process. Code that previously formatted like this:

private final Map<String, ContractorDatatypeMap[]>
contractorOutputByPortName
= new HashMap<String, ContractorDatatypeMap[]>();
now formats like this:

private final
Map<String, ContractorDatatypeMap[]>
contractorOutputByPortName
= new HashMap<String, ContractorDatatypeMap[]>();
Which is pretty ugly. I can't see any setting that might have caused
this, does anyone know why this might be happening?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Wow, that was actually it, thanks! I had it as "chop down if long", and changing it to "wrap if long" worked. Thanks, that was driving me nuts.

Cheers,
Colin

0
Comment actions Permalink

Hi Dmitry,

It actually seems to have been the "chop down if long" option for assignment statements. We have the margin set to 120 chars and don't have the "wrap after modifier list" checked. We do have "assignment sign on next line", is that not generally recommended?

Thanks,
Colin

0

Please sign in to leave a comment.