pdt
pdt copied to clipboard
Randomly completely messes up imports and class declaration
Since as far as I can remember; when I type very fast lots of code, then hit CTRL+Shift+O to re-organise imports and auto-imports, it randomly removes everything at the top of the file, and leave incomplete and invalid PHP code with partial imports mixed with random code from lower in the file at the top, starting from where was the first modified import (untouched ones above remain, it's not the "you have invalid PHP so I remove all imports" bug).
It happens when I type code, hit CTRL+s then CTRL+Shift+o repeatedly and very close to each other.
How to reproduce ? Can't tell, this is very random, although it happens very often.
It does look like a lot like asynchronous/threaded code walking on each other kind of bug.
Hum, I will copy/paste messed up code when it happens. It's so random, I cannot do it on-demand.
Have you something in logs?
I'll try to reproduce it and report back you once I succeeded.
Which log do I have to watch and copy/paste to you ?
Window -> Show view -> Other -> error log
Exception reported during this operation (if any), this might be NPE :)
I'm not using this feature because not working well with Doctrine plugin, but I'm afraid I'll be forced to rewrite it for new model.
I'm using it a huge lot, I have a few tocs, such as pressing ctrl+s constantly, and I do use ctrl+shift+o a lot because it auto-imports all missing types, it's the feature I use the most I think.