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

Rename provider expanded for cross file class renaming #248

Open
jjohnsoncertinia opened this issue Oct 20, 2023 · 0 comments · May be fixed by #253
Open

Rename provider expanded for cross file class renaming #248

jjohnsoncertinia opened this issue Oct 20, 2023 · 0 comments · May be fixed by #253
Assignees

Comments

@jjohnsoncertinia
Copy link
Contributor

jjohnsoncertinia commented Oct 20, 2023

The rename provider needs to be able to rename classes.

  • When a class is renamed, it's constructor should also be renamed and vice versa.
  • Class should be renamed everywhere that something is statically called off the class.
  • Everywhere an object instance of the class is created will need to be updated with the new name.
  • Things that have/return the class as a data type need to have the type updated to the new class name.
  • Classes extending the class need to be updated.
  • We need to rename the class file as well
  • Does it detect class names used to give data types to lists/maps

This story is partly complete. Things that still need to be completed on this story:

  • When a class is renamed, if other classes extend that class then we need to update the extends statement with the new name
  • Also need support for renaming the class from the extends statement
  • The code previously used interning for all TypeName objects but that has been removed for collection type names to allow unique locations to be stored on the TypeNames. Need to use the VisualVM tool to check the performance when load a repo before and after these changes to determine how much performance was affected by this change.
  • There seems to be an inconsistent problem where sometimes rename won't work until you make a change in the file and save. Similar problems have been seen before and were solved by calling refresh or reValidate so this may need to be done somewhere.
  • Also need to add unit tests for renaming a class from within a list e.g. List<Goose> (where Goose is the class you are renaming)
@jjohnsoncertinia jjohnsoncertinia self-assigned this Oct 20, 2023
@jjohnsoncertinia jjohnsoncertinia changed the title Rename provided expanded for cross file class renaming Rename provider expanded for cross file class renaming Oct 20, 2023
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 a pull request may close this issue.

1 participant