This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | After attempting to rename a PHP class using Refactor, I get an error message and then Undo stops working | ||
---|---|---|---|
Product: | php | Reporter: | aatelfer |
Component: | Refactoring | Assignee: | issues@php <issues> |
Status: | NEW --- | ||
Severity: | normal | CC: | rahuijts, tmysik, tzezula |
Priority: | P3 | Keywords: | RANDOM |
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | IDE log |
Description
aatelfer
2017-01-30 06:15:47 UTC
Created attachment 163504 [details]
IDE log
The cause is: The file /disk2/projects/gotham_casting/website/modules/migrate_gotham/src/Plugin/migrate/destination/GothamMemberImageRelationships.php seems no longer valid! BTW there are quite a lot of errors/warnings related to your project files in the attached log - is your project on a local or a network drive? Aren't your project files somehow corrupted? Would it help if you save all your project files before refactoring? Please give it a try and let us know, thanks. @tzezula: Tome, please, don't you know whether PHP support should somehow filter invalid FileObjects or what to do with them? Or should this be done in the common refactoring part? Thanks a lot! Not a P1 IMHO so lowering. Thanks for reporting. I don't think this has anything to do with whether or not I saved my files. I'm a programmer, I shouldn't have problems with my IDE refactoring my files. To answer your question, I don't have my files on a network drive. Btw, I think being unable to undo an action is a serious issue that needs to be handled as a priority 1 issue. Thank you. (In reply to aatelfer from comment #3) > I don't think this has anything to do with whether or not I saved my files. Why do you think so? Invalid FileObject likely means that the file was deleted. So, once more, could you please try to save all files before running refactoring? If it helps, it could help us to fix this issue. > I'm a programmer, I shouldn't have problems with my IDE refactoring my > files. That is why you have reported this issue and we are now trying to solve it. > To answer your question, I don't have my files on a network drive. Thanks. In such a case, it is weird that there are quite many warnings about invalid FileObjects in your IDE log (maybe you are switching branches in your SCM?). > Btw, I think being unable to undo an action is a serious issue that needs to > be handled as a priority 1 issue. It is not I am afraid. Looking at [1], this issue is not even a P2 IMHO. Thanks. [1] http://wiki.netbeans.org/BugPriorityGuidelines I'm done. Do you, bro. It's your reputation. I have the same issue. While refactoring a class name (including the renaming of the file) in php the refactoring stops with the same error message. The result is that the file is actually renamed, but all references to the class name will be left untouched. No text replacement is done anywhere, not in the moved file and also not in other files. (This usually breaks the code, because the class file will not be found) Following this error all undo operations in Netbeans stop working until i restart the IDE. PS: I have my files on a local share (assigned drive letter), but it also happened to me before on local files (Windows 7). Happens to me too, using a local disk only. Another detail to help determine the severity of this bug: when this operation fails, it will also cause the editor tab that had the class file open, to be closed. The file is renamed but the class name is not. In my setup this does not result in any visible problem indication, but it does break my code. The first few times this happened to me, I did not notice the file was actually renamed, because the error message suggested there is no file under that new name and because the file browser will jump away from that file because the editor tab was closed. I can understand that the editor tab is closed when the file is no longer deemed to be available (perhaps a small time-out would help?). It would be nice if the refactoring operation was atomic: if anything fails, the state should be as before the operation. But I have no idea how difficult that would be to implement. Of course it would be even nicer if the operation did not fail. Please let me know how I can help fix it, because I use it a lot and it fails most of the time. |