vazexqi / CodingSpectator

Watches and analyzes code edits in the Eclipse IDE non-invasively
http://codingspectator.cs.illinois.edu
Other
20 stars 14 forks source link

Warning dialog of move JDT resources is not captured #111

Open reprogrammer opened 13 years ago

reprogrammer commented 13 years ago

If you have two classes p1.C and p2.C, and try to move p1.C to p2, you'll get a dialog with the following message.

C.java exists in the selected destination. Do you want to overwrite?

If you accept this warning the refactoring will be logged as a performed refactoring. But, the warning message won't be logged. I think we miss this warning message because it's not presented through ErrorWizarPage but a regular dialog.

I realized that Eclipse has a bug in this scenario. Eclipse is supposed to perform the refactoring when you accept the warning. Therefore, it overwrites p2.C. But, the original class p1.C is still around. And, the package explorer doesn't show p1.C until you restart Eclipse.