formatter設定 - tat-tea/sample GitHub Wiki

# Eclipse Code Formatter Settings - "Pleiades [カスタム]"

## フォーマット設定詳細

### インデントと空白
- **インデントサイズ**:  
  設定: 4スペース (`org.eclipse.jdt.core.formatter.indentation.size = 4`).
- **連続するインデント**:  
  設定: 2スペース (`org.eclipse.jdt.core.formatter.continuation_indentation = 2`).

### 改行と空行
- **パッケージ宣言後の空行**:  
  設定: 1行 (`org.eclipse.jdt.core.formatter.blank_lines_after_package = 1`).
- **ブロック前の空行**:  
  設定: 0行 (`org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block = 0`).

### 括弧とブレース
- **if文の括弧**:  
  設定: `if`と条件式の間にスペース挿入 (`org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if = insert`).
- **ブレースの位置**:
  - ブロックのブレース: 同一行 (`org.eclipse.jdt.core.formatter.brace_position_for_block = end_of_line`).
  - ケース文のブレース: 同一行 (`org.eclipse.jdt.core.formatter.brace_position_for_block_in_case = end_of_line`).

### コメント
- **Javadocコメントのフォーマット**:  
  設定: 無効 (`org.eclipse.jdt.core.formatter.comment.format_javadoc_comments = false`).
- **ブロックコメント内の空白行のクリア**:  
  設定: 無効 (`org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment = false`).

### 演算子とキーワード
- **代入演算子の前後のスペース**:  
  設定: 代入演算子の前後にスペース挿入 (`org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator = insert`, `org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator = insert`).
- **条件演算子の前後のスペース**:  
  設定: 条件演算子の前後にスペース挿入 (`org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional = insert`, `org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional = insert`).

### その他の設定
- **省略記号の後のスペース**:  
  設定: 省略記号の後にスペースを挿入 (`org.eclipse.jdt.core.formatter.insert_space_after_ellipsis = insert`).
- **列挙宣言内のコンマの後のスペース**:  
  設定: コンマの後にスペースを挿入 (`org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations = insert`).
- **配列式内のコンマの前のスペース**:  
  設定: コンマの前にスペースを挿入しない (`org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression = do not insert`).
- **for文内の括弧の位置**:  
  設定: 一般的な行配置 (`org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment = common_lines`).
- **ブロック境界における新しい行のコメント**:  
  設定: 真 (`org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries = true`).
- **コンストラクタ宣言のパラメータ内のコンマの後のスペース**:  
  設定: コンマの後にスペースを挿入 (`org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters = insert`).