-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Feat: deprecate class driver #15560
Feat: deprecate class driver #15560
Conversation
…e class side Previously, this transformation overrided `new` and `systemIcon` methods that are not needed to override. Also, it was incorrect since it was creating `deprecated` method which doesn't not make the class deprecated. Finally, we've removed comment creation since new comment overrides exisitng one, and it's currently very hard to preserve the old comment and prepend it with "Deprecated". But the system strikes through the class, so we have visual representation, which should be enough.
Selectors were misleading because instead of `class` they expected `className`
We've figured a simpler order of transformations: 1. Rename old class name to new class name 2. Add new subclass with the name of old class 3. Deprecate newly created subclass
User can choose between: - Rename old class, migrate the references to new class and deprecate the old class - Migrate references to an existing class and deprecate the class
`applicabilityPreconditions` and `checkApplicabilityPreconditions` are used both by refactorings and transformations so it makes sense to have them in the common superclass.
Hi!
Instead we can add a sentence to the class initialization you do in the future I want to add this to the class definition instead of going through the initialize |
Hey @jecisc, I now remember that we talked about this back in September. I will look at how |
I would be good to enter an issue to remove a refactoring that does not make sense because it is less work for us. |
So what do we do. |
To use What do you think of this? |
I can integrate it now and we can add it or not. |
This PR introduces interactive driver for deprecate class family of transformations.
Driver offers user three options:
isDeprecated
method to the class side (@MarcusDenker I think you'll like this one :))I tried to clean as much as possible, but there is still some work left. I will get back to this after I clean the API a bit.
New driver can be initalized through:
Right click on a class -> Refactoring -> Deprecate
Right now we have duplicate commands that don't use driver. Those are:
Right click on a class -> Deprecate
(this subclasses and renames the class)Right click on a class -> Migrate references
(deprecate and migrate references)If the driver commands seem good, we can remove these commands.