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.

Bug 7511 - inconsistent behavior when file is readonly
Summary: inconsistent behavior when file is readonly
Status: RESOLVED DUPLICATE of bug 11823
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@java
URL:
Keywords:
Depends on: 11823
Blocks:
  Show dependency tree
 
Reported: 2000-08-29 02:16 UTC by Rochelle Raccah
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2000-08-29 02:16:18 UTC
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.
Comment 1 Svata Dedic 2000-09-01 07:19:59 UTC
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.
Comment 2 Svata Dedic 2000-09-22 12:46:59 UTC
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"
Comment 3 Jan Becicka 2000-10-09 16:11:59 UTC
[1118] Verified
Comment 4 Rochelle Raccah 2001-04-20 21:20:23 UTC
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.
Comment 5 Jan Becicka 2001-05-03 16:42:22 UTC
*** Issue 11823 has been marked as a duplicate of this issue. ***
Comment 6 Svata Dedic 2001-05-21 12:19:32 UTC
According to comments, it's an enhancement mostly. Please verify that changes 
to the document are really disallowed if the file is R/O.
Comment 7 Jan Benway 2001-05-22 00:46:39 UTC
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.

Comment 8 Jan Becicka 2005-10-12 15:56:41 UTC

*** This issue has been marked as a duplicate of 11823 ***
Comment 9 Quality Engineering 2007-09-20 09:59:14 UTC
Reorganization of java component