Rename class adds surplus paren
Renaming
TryRenameMe
inobject TryRenameMe {
object Listings {
case class Info(plausiblePrices: Seq[(String, Double)] = Seq(), unplausiblePrices: Seq[(String, Double)] = Seq())
}
case class RegionInfo(regionName: String, listings: Listings.Info)
case class Listings(
forRegion: RegionInfo,
forSupRegion: Option[RegionInfo] = None,
forNeighbours: Seq[RegionInfo] = Seq())
}
case class TryRenameMe(
sqmPrice: Double,
regionName: String,
listingCategory: String,
listings: TryRenameMe.Listings)
results in a surplus )
to be added at the end of the file, breaking the code.
Leave a comment
Note that this bug can also be reproduced with the following example:
object TryRenameMeToo {
class Listings
}
case class TryRenameMeToo(
buggy: TryRenameMeToo.Listings)
Performing the same refactoring operation on the reformatted codeobject TryRenameMeToo {
class Listings
}
case class TryRenameMeToo(buggy: TryRenameMeToo.Listings)
works fine though.
I've a hack, that I'm not particularly happy with, that fixes this bug: https://github.com/scala-ide/scala-refactoring/pull/127
Skip tree printing for rename refactorings
This commit implements rename refactorings without employing tree printing.
The ASTs from the presentation compiler are only used to find all occurrences
of the symbol that is being renamed. This information is then used to generate
changes directly.
Fix #1002643, Fix #1002622, Fix #1001966
Branch: master
Commit: scala-ide:0d8fab7dff
This commit implements rename refactorings without employing tree printing.
The ASTs from the presentation compiler are only used to find all occurrences
of the symbol that is being renamed. This information is then used to generate
changes directly.
Fix #1002643, Fix #1002622, Fix #1001966
Branch: master
Commit: scala-ide:0d8fab7dff