CodingSpectator icon indicating copy to clipboard operation
CodingSpectator copied to clipboard

Eclipse fails to correctly record a performed move refactoring

Open reprogrammer opened this issue 13 years ago • 0 comments

Eclipse doesn't log the move instance method refactoring performed in move/T14 and move/T15 and the history dialog at "Refactor -> History..." will remain empty. Please refer to the corresponding comment on issue #146 for more details.

However, if you run a new instance of Eclipse from the CodingSpectator workspace, it generates the following at ${WORKSPACE}/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2011/3/13/refactorings.history" for the performed refactoring.

<session version="1.0">
    <refactoring description="Move Method" id="org.eclipse.ltk.core.refactoring.unknown" stamp="1300851048882"/>
</session>

Note that the "refactoring.history" file is under ".workspace" instead of a project, and that the logged descriptor is wrong.

Also, note that CodingSpectator captures the performed refactoring at "${WORKSPACE}/.metadata/.plugins/edu.illinois.codingspectator.data/1.0.0.qualifier/refactorings/performed/Project_InvalidPerformedMoveInstanceMethodTest/2011/3/13/refactorings.history" correctly.

In short, a single refactoring is being captured in three different ways. So, we need to investigate this problem to find the root cause of the problem. We don't need to fix the Eclipse bug unless it affects CodingSpectator logs. We believe that this problem is just a corner case that Eclipse fails to handle properly, because if you change the test project of InvalidPerformedMoveInstanceMethodTest so that each class is in its own top level compilation unit, Eclipse will log the refactoring correctly.

reprogrammer avatar Mar 23 '11 03:03 reprogrammer