Handle nested classes
Nested classes are not handled properly. For example, the Guava project makes use (or: used to make use) of nested classes heavily, with methods with the same name being present both in the parent class and the nested class. CodeShovel will in these case mismatch methods and overwrite output files.
This has most likely been resolved with a recent commit.
I was thinking it might also be nice to handle this kind of change as a Context change perhaps? Especially in a language like Python or TypeScript where you can have many kinds at the top level of the class, or a function in a function.
I noticed that the parent name is kept, but changes to the parent name are not reported to the user unless the filename is changed.
Yeah that sounds really smart. You can totally go ahead if you think it makes sense for your use case :)
Checked into this again and yes, this is closely related to your question in #52. The commit you mentioned made CodeShovel work for two nested methods in the Oracle. But please feel free to change this. Don't let it block your progress.
okidoki as soon as #51 is merged I'll add in Context Change or Parent Change
OK just some thinking: if a method is moved to another class in the same file, should this be the same or different than the parent getting renamed?
It seems like the same split as a movefromfile vs file rename, just within the file, so maybe we need two change types not just one.
For example if there's just a rename, I don't really care about this change. self and this still refer to the same thing. However pulling the function into another class has a bigger effect as identifiers in the function body refer to different things altogether.
@braxtonhall this sounds like the way to go. If the containing class changes we'd want to know that, even if it happens to stay in the same file. Either way it's an extract method refactoring, so it would be correct to track it.