Eclipseの:括弧にスペースを追加します

エマ・K:

私は、括弧の自動補完のスタイルを変更します(フォトンを使用)Eclipseで設定を探しています。

Eclipseのデフォルトは次のようになります。

function_call(arg1, arg2, arg3);

私はそれがより読みやすい見つけるように私は、そうのような書き込みコードを好みます:

function_call( arg1, arg2, arg3 );

このようにウィンドウの下の設定>設定缶編集オートコンプリートはありますか?それらを手動で編集することは面倒である、と私は私のコードは、文体、一貫した見たいです。

STaefi:

はい、あなたは、単にそれを行うことができます。以下の手順に従ってください。

  1. メニューバー、外出先からウィンドウへ - >プリファレンス
  2. ダイアログには、次のように開きます: ここでは、画像の説明を入力します。

2.1。>コードスタイル - - >フォーマッタ左側のツリーメニューをスタイルからJavaへ行きます

2.2. Now On the right you see the "Active Profile" combo box, click the Edit button

  1. Another dialog appears as follow: ここでは、画像の説明を入力します。

3.1. In this dialog you may check the following check boxes:

  • After opening parenthesis
  • Before closing parenthesis

(as shown in the above)

  1. Now you want to save these changes but the OK button seems disabled. You should change the Profile name on the top of this dialog to some name of your own. Then you can hit the OK button and all set.

  2. Then hit the Apply and Close button on the Preferences dialog.

Now every time you format you codes (using menu or Ctrl+Shift+F) your code would be formatted you desired.

あなたがその環境設定ダイアログで表示される場合がありますとして、あなたが望むように他の多くのフォーマット変更できるオプションと使用があります。

これは参考になる願っています。

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=225602&siteId=1