redhat-developer / redhat-developer/vscode-java
No obvious way to set JDT settings
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
I would like to use the "Text Blocks" feature of Java 13. I have the Java 13 JDK installed and that is being picked up correctly by VSCode.
In addition, I have modified my "pom.xml" file to include the "--enable-preview" JVM argument that turns on this feature, like so:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>--enable-preview</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
I also attempted to edit the .settings/org.eclipse.jdt.core.prefs file and set org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled but any changes to this file are overwritten when the "Clean the java language workspace" task is run
Environment
- Operating System: Linux
- JDK version: 13
- Visual Studio Code version: 1.40.1
- Java extension version: 0.53.1
Steps To Reproduce
- Create Java project with Java 13
- Attempt to use Text Block syntax
Current Result

Expected Result
I expect to be able to enable preview features in JDT and for Text Blocks to work with no compiler error
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在使用所示 pom.xml 配置的项目中重现 Java 13 Text Blocks 错误,然后检查清理 Java 语言工作区时如何生成 .settings/org.eclipse.jdt.core.prefs 文件。当 JDT 中的预览功能保持启用,并且 Text Block 语法不产生编译器错误时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100