我使用的IntelliJ 2017.1我試圖配置格式化,我有以下代碼:格式化的IntelliJ
if (Integer.parseInt(oneProcess[1]) == 1 || Integer.parseInt(oneProcess[1]) == 2 || Integer.parseInt(oneProcess[1]) == 3) {
processArray[i] = new Process(initialTime, endTime);
}
當我按下Option + Command + L
,格式的IntelliJ的代碼如下:
if (Integer.parseInt(oneProcess[1]) == 1 || Integer.parseInt(oneProcess[1]) == 2 || Integer.parseInt(
oneProcess[1]) == 3) {
processArray[i] = new Process(burstTime, arrivalTime);
}
我想配置格式化程序如下:
if (Integer.parseInt(oneProcess[1]) == 1 || Integer.parseInt(oneProcess[1]) == 2 ||
Integer.parseInt(oneProcess[1]) == 3) {
processArray[i] = new Process(burstTime, arrivalTime);
}
這意味着Intell iJ必須在超出右邊界並與前一個條件對齊時進行線路跳轉。
我發現Preferences > Editor > Code Style > Java > Wrapping and Braces
但我不能像我之前解釋的那樣進行配置。
如何配置格式化程序?
它是關於線的長度。查找線條長度或這樣的一些事情,並調整它 –
@TuyenNguyen在右邊的保證金有'120個字符',這是好的,我需要對齊每個條件時,它超過了保證金 – elmigue017