Eclipse: “Refactor - Rename” completely messed up, replacing arbitrary characters in file

前端 未结 3 771
南方客
南方客 2021-01-14 22:36

When refactoring a class name, Eclipse lately shows a very strange behavior. For example, let\'s look at one of our classes:

public class CampaignCSVPanel ex         


        
3条回答
  •  难免孤独
    2021-01-14 23:36

    That's annoying. Obviously the refactoring engine knows that it has to replace something but replaces characters at a wrong position... - no answer but some additional ideas/tests

    1. Looks like you check out complete projects. Try to import sources only to a fresh project to check if the problem still occurs or if its gone.
    2. If project metadata has been checked in (it shouldn't, but we never know), clean the project right after checking the project out.
    3. Check the character encoding of that companies source files. Maybe there's some sort of mismatch which causes the editor to replace on wrong positions. And double check the source files for strange unprintable ascii bytes... again, we never know...

提交回复
热议问题