[英]Eclipse, format if statements to one line statement
有沒有辦法創建一個更改的自動格式化程序:
if (foo.length > 1)
bar = foo[1];
else
bar = "";
至
bar = (foo.length > 1) ? foo[1] : "";
如何讓shift+ctrl+f
自動組織這個?
此插件專門用於將if-else塊更改為三元運算符。
https://marketplace.eclipse.org/content/spartan-refactoring-0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.