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: | Save/Save All action disabled while a file is modified | ||
---|---|---|---|
Product: | platform | Reporter: | Jan Peska <JPESKA> |
Component: | Actions | Assignee: | Jan Peska <JPESKA> |
Status: | NEW --- | ||
Severity: | normal | CC: | mgoe, mmetelka |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jan Peska
2014-01-09 09:03:46 UTC
Martin, can you please specify a reproduction scenario. It is not obvious to me from your original comment. It would be very helpful to be able to debug it. Thanks Unfortunately I have not yet found a scenario which allows to reproduce the problem. In order to analyze the problem I would suggest that you overwrite DataObject.setModified(boolean modif) and DataObject.isModified() to check in which thread these methods are called. When I tried to debug the problem I found that setModified() was always called with the correct argument but not from the EDT. Since setModified() also informs the change listeners I think that this causes the problem. In my implementation of the SaveAll action (see attachment of bug #206513) which always was enabled correctly (even when the Netbeans version wasn't) I was able to fix the problem by making sure that changing the enabled state of the Action was done on the EDT. Perhaps the Save action could be fixed in the same way. Best regards, Martin Hi, I just noticed something regarding this bug: While running "Clean and Build" on a maven project (Scala) I got some compilation errors. I clicked on the error in the "Output - Build" windows. This opened the faulty source file as expected, but when I fixed the error the save button remained grayed out (same goes for save under "File"). I then switched to an other source tab and then back again. Save was still grayed out, but as soon as I modified the file again save became available. Having a hard time reproducing the bug, but the fact that switching tabs seems to work around the issue might help to narrow down the problem. Anyone else able to confirm that tab switching helps? (Running NB 7.4 with all updates installed, ArchLinux OpenJDK 7.u51_2.4.6-1-x86_64) |