Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

GlobalDefinition - renameDefinitionAs(def, newName) #156

Closed
dsherret opened this issue May 13, 2016 · 2 comments
Closed

GlobalDefinition - renameDefinitionAs(def, newName) #156

dsherret opened this issue May 13, 2016 · 2 comments

Comments

@dsherret
Copy link
Owner

dsherret commented May 13, 2016

This would replace a name used in a NamedDefinition, but would also replace its use in expressions.

The challenge will be going through and parsing all the expressions to put in the new name.

Need to look in:

  • Return type expressions
  • Expressions
  • Extends expressions
  • Type parameter expressions
  • Maybe more?
@dsherret dsherret added this to the Version 4.1 milestone Jun 11, 2016
@dsherret dsherret changed the title GlobalDefinition / FileDefinition - renameDefinition(def, newName) GlobalDefinition / FileDefinition - renameDefinitionAs(def, newName) Jun 16, 2016
@dsherret
Copy link
Owner Author

dsherret commented Jun 16, 2016

Make sure that this will search the imports to see if there are any aliases for that definition. If there are, then it should only change the import to reflect the new name.

Also, need to be careful not to rename a definition that only matches partially. For example, only rename one of these MyClasses: MyNamespace.MyClass and MyOtherNamespace.MyClass

dsherret added a commit that referenced this issue Jul 3, 2016
Could use some code cleanup, but this works and I want to move on to something else for a bit.
@dsherret dsherret closed this as completed Jul 3, 2016
@dsherret
Copy link
Owner Author

dsherret commented Jul 3, 2016

Forgot some tests for this. Also, need to make sure it doesn't rename stuff in strings.

@dsherret dsherret reopened this Jul 3, 2016
@dsherret dsherret closed this as completed Jul 3, 2016
dsherret added a commit that referenced this issue Jul 8, 2016
@dsherret dsherret changed the title GlobalDefinition / FileDefinition - renameDefinitionAs(def, newName) GlobalDefinition - renameDefinitionAs(def, newName) Jul 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant