google / google/google-java-format

Differences in imports order in IntelliJ and Eclipse.

未關閉
#1,007 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
6.2k
分支
937
平均合併
6 分鐘
30 天內合併 PR
3

描述

Using v1.18.1 plugins for Eclipse and IntelliJ, but there is difference in imports order for both IDEs.
Imports layouts for Eclipse:
![eclipse_import_layout](https://github.com/google/google-java-format/assets/29916082/09378a53-2b38-488f-968a-529da590c5fe)
Imports layouts for IntelliJ:
![idea_import_layout](https://github.com/google/google-java-format/assets/29916082/0d90c902-617b-48bd-af7a-89a21f1f894f)

Imports in IntelliJ:
```
import com.domain.sap.IF.helper.DocumentHelper;
import com.domain.sap.SapUtility;
import com.domain.sap.SyncDocument;
```

Imports in Eclipse:
```
import com.domain.sap.SapUtility;
import com.domain.sap.SyncDocument;
import com.domain.sap.IF.helper.DocumentHelper;
````

For me it looks like IntelliJ uses a Code Formatter also for Imports formatting and Eclipse uses it's own mechanism.
How to make it common?

貢獻指南

開啟貢獻指南

研究方向

首先,使用 issue 中描述的 Eclipse 和 IntelliJ 外掛程式,搭配提供的 import 範例與 v1.18.1 設定,重現不同的 import 順序。比較每個 IDE 整合如何套用 import 排序,並找出相關的外掛程式進入點。當兩個整合針對回報的 import 產生相同的排序時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。