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 220252 - All editable actions on file and file content should be disabled on read only file.
Summary: All editable actions on file and file content should be disabled on read only...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 232486 (view as bug list)
Depends on: 222212
Blocks:
  Show dependency tree
 
Reported: 2012-10-17 08:35 UTC by hantsy
Modified: 2015-09-17 10:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (4.52 KB, text/plain)
2013-09-13 09:11 UTC, bmramba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hantsy 2012-10-17 08:35:15 UTC
I opened a class file from jar, NetBeans generated a temp read only source file for it.

But I think all editable actions(in Menu, context, editor toolar) should be disabled.

Such as delete, comments/uncomment, refactor, code generating.
Comment 1 Svata Dedic 2013-07-16 06:42:05 UTC
The same for a source from a JAR, i.e. Go To type j.l.String.
Comment 2 Svata Dedic 2013-07-16 11:02:29 UTC
It seems that the action registration lack the ability to declare whether the action should be enabled or not depending on writability. The paste action solved as issue #222935 is handled by a special case in EditorUI.

I think the enhancement described in issue #222212 need to be extended: the action should be able to specify writability constraints. Each of the actions could eventually monitor EditorRegistry and track the focused editor and its caret; this would add a burden to editor action writers.

*** This bug has been marked as a duplicate of bug 222212 ***
Comment 3 Svata Dedic 2013-07-18 06:19:19 UTC
*** Bug 232486 has been marked as a duplicate of this bug. ***
Comment 4 Svata Dedic 2013-07-18 06:20:30 UTC
Reopening; keeping this open and dependent on the API issue is more proper for progress tracking
Comment 5 bmramba 2013-09-13 09:11:58 UTC
Created attachment 140025 [details]
stacktrace

During editing, on pressing TAB key, this error is generated.
Comment 6 Martin Balin 2015-09-17 10:59:46 UTC
Report from old NetBeans version. Due to code changes since it was reported likely to not happen. Feel free to reopen if happens in 8.0.2 or 8.1.