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.
When the java file is readonly (or a lock cannot be obtained), the behavior is inconsistent. For java properties, they are enabled, then beep when I change. If instead I modify the editor first, it beeps and when I look at the property sheet, they are all disabled. From Svata: >> >As it appears to me, the correct behaviour is either to beep or better >> >show a message box saying something like "The file is read-only". It >> >seems that I have to put those checks in the code generator in Java >> >module instead of relying on EditorSupport's support.
While there's no feedback from the EditorSupport whether the changes really took place, an explicit check has to be made whether the file is writeable or not.
The check is currently made in the code that obtains a write lock on the java hierarchy -- all such uses except updating the hierarchy from reparse will throw SourceException annotated with a message that the doc is r/o The result is that the user gets a dialog saying "The document is read-only"
[1118] Verified
From discussion with Jan Benway on this topic: I don't get a beep, although there might be something up with the sound on my PC. So, with the Java stuff, I never noticed the status message at all. If I heard a beep, maybe I'd look up there, but since I didn't, I didn't look. I had to read your email again to find out about it. We thought an error message was better. Please check and discuss with the UI team.
*** Issue 11823 has been marked as a duplicate of this issue. ***
According to comments, it's an enhancement mostly. Please verify that changes to the document are really disallowed if the file is R/O.
This issue is sort of an enhancement request:change the output from a status bar message to a dialog box. However, there also the bug that many times the properties are not properly disabled when the file is read only. That is issue 11823. 11823 was closed as a duplicate of this one. 11823 *is* a bug but in marking that as a duplicate and changing this to an enhancement, the bug part is lost. Therefore, I would like to re-open 11823 as a bug.
*** This issue has been marked as a duplicate of 11823 ***
Reorganization of java component