You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was pointed to the jdt.ui project for quick fix bugs. See eclipse-jdt/eclipse.jdt.core#3300. I copied and modified the quickfix-related part to this new issue.
If you have a class with a "sealed interface" then no appropriate case labels are generated for quick fix.
public class SealedInterfaceContentAssist {
sealed interface Foo {
record FooImpl_a(String x) implements Foo {
}
record FooImpl_b(String y, String z) implements Foo {
}
}
public static void main(String[] args) {
Foo foo = getFoo();
switch (foo) { // <== No quickfix for creating the case labels
}
}
private static Foo getFoo() {
return new Foo.FooImpl_b("a", "b");
}
}
This quick fix would be important because there also is no appropriate content assist for this case. And the syntax for complex cases makes it hard to type it.
The quick fix should generate
public static void main(String[] args) {
Foo foo = getFoo();
switch (foo) {
case FooImpl_a(String x) -> ;
case FooImpl_b(String y, String z) -> ;
}
}
The text was updated successfully, but these errors were encountered:
I was pointed to the jdt.ui project for quick fix bugs. See eclipse-jdt/eclipse.jdt.core#3300. I copied and modified the quickfix-related part to this new issue.
If you have a class with a "sealed interface" then no appropriate case labels are generated for quick fix.
This quick fix would be important because there also is no appropriate content assist for this case. And the syntax for complex cases makes it hard to type it.
The quick fix should generate
The text was updated successfully, but these errors were encountered: