-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created type doesn't implement sealed interface, #1553
Comments
This seems similar to Bug 564473. JDT UI still has to add the support for sealed/non-sealed/permits modifiers. However this would apply to the their wizard, which JDT-LS doesn't use. I suspect that JDT-LS has some specialized code to create the class and I'll probably just need to update it. Update : Entry point would be around https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/proposals/NewCUProposal.java#L273 |
- Add quick fix to generate proper type declaration for sealed type - Fixed eclipse-jdtls#1553 - Add testcase Signed-off-by: Roland Grunberg <[email protected]>
- Add quick fix to generate proper type declaration for sealed type - Fixes eclipse-jdtls#1553 - Add testcase Signed-off-by: Roland Grunberg <[email protected]>
- Add quick fix to generate proper type declaration for sealed type - Fixes eclipse-jdtls#1553 - Add testcase Signed-off-by: Roland Grunberg <[email protected]>
- Add quick fix to generate proper type declaration for sealed type - Fixes #1553 - Add testcase Signed-off-by: Roland Grunberg <[email protected]>
This is partially completed for now, the generated class now declares it implements the interface, but the interface methods are not implemented a that point. One needs to apply the code action that adds unimplemented methods. |
- When a non-existent type is permitted by a sealed class, the newly created type should implement the necessary methods - Related eclipse-jdtls#1553
- When a non-existent type is permitted by a sealed class, the newly created type should implement the necessary methods - Related eclipse-jdtls#1553 Signed-off-by: Roland Grunberg <[email protected]>
- When a non-existent type is permitted by a sealed class, the newly created type should implement the necessary methods - Related eclipse-jdtls#1553 Signed-off-by: Roland Grunberg <[email protected]>
In a Java 15 project, given sealed interface
Foo
:Bar doesn't exist so there's a code action to create a new class/interface. But, when applied, the new class doesn't implement Foo though, as it should.
The text was updated successfully, but these errors were encountered: