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 77897 - Pasting is allowed for r/o schema and causes exception
Summary: Pasting is allowed for r/o schema and causes exception
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: bhate
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-14 13:08 UTC by Andrei Chistiakov
Modified: 2006-07-25 13:09 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-06-14 13:08:42 UTC
Reproduced in build 060613.

To the bug reproduce:

- open a read-only schema file;
- in schema view copy some component and paste it where applicable within the view.

Exception is thrown as follows:

java.lang.IllegalArgumentException: Model source is read-only.
	at
org.netbeans.modules.xml.xam.AbstractModel.startTransaction(AbstractModel.java:280)
	at
org.netbeans.modules.xml.xam.AbstractModel.startTransaction(AbstractModel.java:265)
	at
org.netbeans.modules.xml.schema.ui.nodes.ComponentPasteType$PasteTypeImpl.paste(ComponentPasteType.java:148)
	at org.openide.actions.PasteAction$ActionPT.actionPerformed(PasteAction.java:773)
	at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:74)
	at org.openide.actions.PasteAction$ActionPT.run(PasteAction.java:797)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Comment 1 bhate 2006-07-24 21:32:44 UTC
no pasting will be allowed in r/o schemas
Comment 2 Andrei Chistiakov 2006-07-25 13:09:45 UTC
Verified in build 060724.