代码之家  ›  专栏  ›  技术社区  ›  Jin Kwon

如何对齐括号块?

  •  0
  • Jin Kwon  · 技术社区  · 6 年前

    代码如下:

    bytes[i] = (byte) ((Character.digit(hex.charAt(j), 16) << 4)
            | Character.digit(hex.charAt(++j), 16));
    

    如何在 ( ) ?所以我可以看到以下内容?

    bytes[i] = (byte) ((Character.digit(hex.charAt(j), 16) << 4)
                       | Character.digit(hex.charAt(++j), 16));
    

    我该登记哪一个 Preferences / Editor / CodeStyle / Java / Wrapping and Braces ?

    1 回复  |  直到 6 年前
        1
  •  2
  •   Andrey    6 年前

    你在找 Binary expressions / Align when multiline

    启用: Code style with option enabled

    禁用(默认): Code style with option disabled

    要快速找到相应的代码样式选项,请在编辑器中选择代码段并调用alt+enter意向操作,然后选择 调整代码样式设置 从弹出窗口: enter image description here

    然后找到选项: enter image description here