Community
Participate
Working Groups
I just did a Refactor | Rename on a variable name and testing code (in a plugin fragment) was renamed incorrectly, corrupting the source file. The resulting source file now has methods like: public void test_createPhone_shouldNeverReturnNull() throws Exception { Person person = new Person(); Phone phone =updateOrCreatePhoneateOrCreatePhone(Phone.DAY_PHONE_CODE, "1234"); assertNotNull("phone object should not be null.", phone); } The trouble is that it's not mangled the same way each time. Other examples of source corruption: "PhoupdateOrCreatePhoneone" "PhoneupdateOrCreatePhonerson" String expectedNumber = new String("1234updateOrCreatePhonePhone phone = person.updateOrCreatePhone(expectedCode, expectedNumber); Notice how the string was mangled: lost its closing quote, etc. Marking critical because we lose data whenever this happens. Unfortunately, it doesn't happen all the time, but it's pretty regular and very disconcerting when it happens.
Please provide more detailed steps. It works for me using 3.2 RC7. Anything in .log? Which build?
changing severity to 'major' until we know more.
(In reply to comment #1) > Please provide more detailed steps. It works for me using 3.2 RC7. > Anything in .log? Which build? RC6 is the build. I got the build by downloading Platform and updating through the Callisto update site. I can't reliably reproduce the bug myself so I'm sorry I can't supply more detailed steps to reproduce but I can answer any questions you might have about the configuration. The one thing that is remarkable is that the source corruption always happens when I have two plugin projects where one is a fragment that extends the first. (In my case, the fragment is always a unit test project, but I doubt that this is relevent.) I perform the rename in the main plugin and the corruption always happens in the fragment. Other plugins that reference the main plugin in which I'm working are okay.
Created attachment 43864 [details] Yesterday's log stripped to just the relevent Eclipse session
Do you modify the affected files outside of Eclipse? The log contains a bunch of "ResourceException: Resource is out of sync with the file system", which could explain the corruptions. If so, please make sure you refresh the workspace after doing changes externally (or use the 'Refresh automatically' preference). I could not reproduce the problem. Setting to REMIND, please reopen if you have steps to reproduce.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.