使用“eclipse-codetemplate.xml”后,eclipse 新建 java 类文件样式不对,需要单独 format 一遍
- Dominant language
- Kotlin
- Stars
- 30.9k
- Forks
- 8k
- PR merge metrics
- No merged PRs in 30d
Description
## Rule content
eclipse-codetemplate.xml 第 19-23 行
```
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
```
## Problem description
使用“eclipse-codetemplate.xml”后,eclipse 新建 java 类文件样式不对,需要单独 format 一遍

正确应该是:
```
package com.ngailab;
public class Test {
}
```
## Advice
建议改为如下,去掉行首的空格
```
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Open eclipse-codetemplate.xml and inspect lines 19-23, especially the leading spaces around ${package_declaration}, ${typecomment}, and ${type_declaration}. Remove the unintended indentation and verify that a newly created Eclipse Java class has the expected package and class layout without requiring manual formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100