redhat-developer / redhat-developer/vscode-java
No code action or quick fix available on remote
未关闭
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
[provide a description of the issue]
Environment
- Operating System:
Server Windows 10 Enterprise LTSC 1809 17763.1577
Client Windows 10 Professional 20H2 19042.685
- JDK version:
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.275-b01, mixed mode)
- Visual Studio Code version: 1.52.1
- Java extension version: vscjava.vscode-java-pack 0.12.1 redhat.java 0.73.0
Steps To Reproduce
- Connect to SSH based server (vscode remote development)
- Install Java extension pack "vscjava.vscode-java-pack"
- Open a folder and a java file
- Remove one of the import line
- See "Predicate cannot be resolved to a type" or something with a type name
- "Ctrl+." to trigger quick fix
- No quick fix available
[Please attach a sample project reproducing the error]
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
//import java.util.function.Predicate;
class Person {
public Person(int age, Sex gender) {
this.age = age;
this.gender = gender;
}
public enum Sex {
MALE, FEMALE
}
public int age;
public Sex gender;
void printPerson() {
System.out.println("Age: " + age);
}
}
class MyClass {
public static void printPersons(List<Person> roster, Predicate<Person> tester, Consumer<Person> block) {
for (Person p : roster) {
if (tester.test(p)) {
block.accept(p);
}
}
}
}
class HelloWorldApp {
public static void main(String[] args) {
MyClass.printPersons(
new ArrayList<Person>(
Arrays.asList(new Person(19, Person.Sex.MALE), new Person(15, Person.Sex.FEMALE))),
(Person p) -> p.gender == Person.Sex.MALE && p.age >= 18 && p.age <= 25,
(Person p) -> System.out.println(p.age));
}
}
Please attach logs
client.log
server.log
Current Result
Expected Result
Additional Informations
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,按照列出的 VS Code Remote SSH 步骤重现缺失的快速修复,然后检查 client.log 和 server.log,以查找 Java 语言服务器的请求和失败。对于远程 Java 文件,缺失导入的快速修复可用,并且提供的示例项目按预期运行,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100