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.
It is hard for new users to recognize that a file is read-only. We should tell the users about it in some better way. Here is a VOC record: --------------%<----------------- At first I was pulling my hair out trying to figure out why I couldn't seem to do anything to the sources, didn't let me edit anything. It didn't tell me anything, just refused to let me edit the source. Finally I realized that the files were read-only. You really need to do a pop-up or something when someone tries to edit a read-only source file, not just be silent about it. And say something like "This file is read-only and cannot be edited". --------------%<-----------------
This needs to be handled in openide/editor. Reassigning.
The editor beeps, which is good enough feedback IMO. Posting a popup is way too intrusive in case I mistakenly type a letter while browsing such a read-only file, so I disagree with this suggestion. Reasonable action would be to post a message to the status bar, and that would have to be handled by the editor library (DefaultKeyTyped)
Petre, the message is already written to the status bar. The IDE doesn't beep for me in read-only files - are you sure about the beep? Other actions do beep for me (like go to declaration of non-existing class). Beeping would solve the issue IMO, although it may not be available on all computers.
The beep() in CloneableEditorSupport:1596 is not triggered as the code does not go into undoAll() at all. Instead it goes through CES:1552. This is likely a regression caused by the recent introducing of the modificationListener. Adding Yarda to cc.
Right, I am sorry. Probably there was no test verifying that Toolkit.beep() is called when document is readonly, so the behaviour was easy to be dropped.
Reassigning to new module owner mslama.
I moved Toolkit.getDefaultToolkit().beep() to CES.notifyModified and tested it is called when document is ro. Still call of beep() has no effect on my Ubuntu 9.04 notebook. Please test if beep works for you. core-main #76b2ca528959
Integrated into 'main-golden', will be available in build *200905080201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/76b2ca528959 User: Marek Slama <mslama@netbeans.org> Log: #58312: Call beep when editing read only document.