1. In a new project, create a class A in package b
2. Right click on the source in the Package Explorer and Refactor > Rename
3. Name the class B and perform the refactoring
The following errors are reported by the presentation compiler:
Multiple markers at this line
- self constructor arguments cannot reference unconstructed `this`
- constructor B is defined twice conflicting symbols both originated in file '/a/src/a/
B.scala'
And the Error Log contains the following entry:
Last but not least, the refactoring isn't performed (only the file name is changed, but the class definition uses the old name).
EDIT:
The exception in the Error Log is caused by a different issue. See https://www.assembla.com/spaces/scala-ide/tickets/1002006 (it's hard to say if the linked issue is also to blame for the incorrect behavior reported in this ticket)
2. Right click on the source in the Package Explorer and Refactor > Rename
3. Name the class B and perform the refactoring
The following errors are reported by the presentation compiler:
Multiple markers at this line
- self constructor arguments cannot reference unconstructed `this`
- constructor B is defined twice conflicting symbols both originated in file '/a/src/a/
B.scala'
And the Error Log contains the following entry:
- Java Model Exception: Java Model Status [B [in [Working copy] B.scala [in a [in src [in a]]]] does not exist]
Last but not least, the refactoring isn't performed (only the file name is changed, but the class definition uses the old name).
EDIT:
The exception in the Error Log is caused by a different issue. See https://www.assembla.com/spaces/scala-ide/tickets/1002006 (it's hard to say if the linked issue is also to blame for the incorrect behavior reported in this ticket)
Leave a comment
on 2013-12-16 07:12 *
By Mirco Dotta
I'm using v4.0.0.nightly-2_10-201312160616-f60e04e, with scala-refactoring v0.6.2.2_10-201312160606-9a046b3 (and, my installation includes both Scala Search and Scala Worksheet - I'm mentioning this in case the issue can't be easily reproduced)
on 2013-12-16 07:14 *
By Mirco Dotta
Summary changed from After trivial class rename presentation compiler reports errors to Trivial class rename fails and presentation compiler reports errors
on 2013-12-16 07:15 *
By Mirco Dotta
Description changed from 1. In a new project, create... to 1. In a new project, create...
on 2013-12-16 07:20 *
By Mirco Dotta
Description changed from 1. In a new project, create... to 1. In a new project, create...
on 2013-12-16 07:22 *
By Mirco Dotta
Description changed from 1. In a new project, create... to 1. In a new project, create...
on 2013-12-16 07:23 *
By Mirco Dotta
The presentation compiler gets confused in the exact same way if the Rename action is performed on the identifier, inside the source file.
on 2013-12-17 05:25 *
By Mirco Dotta
I'm more and more convinced the problem reported in this ticket may be happening because of #1002006. So, let's not waste time with this until the before mentioned ticket is fixed.
The related ticket was fixed, but the presentation compiler errors still occur (the refactoring is performed correctly, though)
Ticket assignment reverted due to inactivity.
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|