redhat-developer / redhat-developer/vscode-java
Preventing .classpath overwrite
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Hello,
While I'm fully aware that Android projects are unsupported, manually crafting .classpath files provide quite satisfying results - with the caveat that they don't support env vars, so you have to hardcode the path to your Android SDK.
For example, with a classpath that looks like:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="lib" path="/Users/arnaud/dev/android-sdk/platforms/android-26/android.jar" />
</classpath>
I'm able, after indexing, to get completion for my project's classes, but also Android's.
Libraries need a little more work, but I don't mind doing everything manually, as both the platform version and libraries don't change often.
The problem is that vscode-java notices that this is a gradle project, and will overwrite.
I have to rewrite the .classpath with my version every time I reopen vscode.
I'd like to have a setting to tell the plugin never to overwrite .classpath on its own.
Environment
- Operating System: macOS & Windows
- JDK version: 1.8
- Visual Studio Code version: 1.15.1
- Java extension version: Latest as of writing
Steps To Reproduce
- Open a
- Patch the .classpath yourself. Make sure you back it up somewhere else
- Restart vscode
Current Result
.classpath was overwritten with an empty one
Expected Result
.classpath should have not been overwritten
Additional Informations
I tried setting " "java.configuration.updateBuildConfiguration": "disabled" ", but that does not help
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、手動で編集した .classpath と java.configuration.updateBuildConfiguration 設定を使って、再起動のワークフローを再現します。VS Code を再度開く前後でファイルを比較し、その後、拡張機能による Gradle プロジェクトの処理を追跡します。通常のプロジェクト更新を引き続き利用できるまま、文書化された設定によって .classpath の自動上書きを防止できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- build-system, devtools, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100