redhat-developer / redhat-developer/vscode-java
No code action or quick fix available on remote
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
[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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the missing quick fix through the listed VS Code Remote SSH steps, then inspect client.log and server.log for the Java language server request and failure. Done means the missing-import quick fix is available for the remote Java file and the supplied sample project behaves as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100