Skip to content
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

Fixes #12 : Bug 577317 - [17] Provide quick fixes to add permitted #13

Merged
merged 2 commits into from
Apr 23, 2022

Conversation

ktatavarthi
Copy link
Member

class/interface for sealed class/interface

Signed-off-by: Kalyan Prasad Tatavarthi kalyan_prasad@in.ibm.com

…ermitted

class/interface for sealed class/interface

Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
@ktatavarthi ktatavarthi added this to the 4.24 M2 milestone Apr 13, 2022
@SarikaSinha
Copy link
Member

SarikaSinha commented Apr 13, 2022

image

If I use quick fix to add class in same package, the "permits" is not coloured properly. After going back to the file and adding a "enter" applies the colouring.

@SarikaSinha
Copy link
Member

For interface, we have more challenges.
We already had 2 quickfixes to create implementation class and to create new interface.
These 2 should not appear if sealed is used as this again leads to errors in both the files.

Also, we can explore keeping these quickfixes for class and interface even without errors to add new permits. We can discuss that in a separate issue.

@ktatavarthi
Copy link
Member Author

image

If I use quick fix to add class in same package, the "permits" is not coloured properly. After going back to the file and adding a "enter" applies the colouring.

I am looking into this.

@ktatavarthi
Copy link
Member Author

For interface, we have more challenges. We already had 2 quickfixes to create implementation class and to create new interface. These 2 should not appear if sealed is used as this again leads to errors in both the files.

Also, we can explore keeping these quickfixes for class and interface even without errors to add new permits. We can discuss that in a separate issue.

As currently there are no quick fixes available, I think these quick fixes are valid. There is no way to avoid error using sealed in the class creation wizard as there is no easy solution for this other than quick fixes. If we restrict creation of permits class or interface with final and non-sealed modifiers and not allow sealed modifier, then we restrict our Quick Fix to not create sub types which can also be sealed.

Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
@SarikaSinha
Copy link
Member

Created #25 as follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants