intellij-idea - IntelliJ 在使用 ctrl+alt+L 重新格式化时拆分我的代码
问题描述
ctrl+alt+L 像这样拆分我的代码:
public void message_should_be_displayed(String text) {
qip.executeAssertEquals("Asserting if correct alert msg is displayed : ", text, qip.driver.switchTo()
.alert()
.getText());
}
如果我重新格式化,它会将最后两行放在单独的行中。知道如何解决这个问题吗?
解决方案
设置(macOS 上的首选项)| 编辑 | 代码风格 | 爪哇 | 包装和大括号 | 链式方法调用:不要换行。
推荐阅读
- gnupg - .gpg、.sig. 和 .asc 之间有哪些有意义的区别?
- reactjs - Cant api 连接不适用于生产反应本机
- ruby - 在 Google-API-client Gem 中为模块起别名
- javascript - 使用 vue.js 路由和 mixin 的问题
- firefox - 应用程序关闭后,Web 推送通知在 Firefox Mobile 中不起作用
- ckeditor - ckeditor 4.13 如何禁用内容转换
- c# - 在不打开浏览器的情况下启动 API
- python-3.x - 从一组列表中访问特定列表
- django - 如何从不同的模型制作自定义序列化器?
- javascript - 如何通过星级投票最小化加载 jQuery 的速度影响