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 85239 - Design pattern can be applied to a read-only schema
Summary: Design pattern can be applied to a read-only schema
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-19 13:46 UTC by Andrei Chistiakov
Modified: 2006-09-20 11:25 UTC (History)
3 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-09-19 13:46:55 UTC
Reproduced in build 060919 (JDK 1.6 Beta 2).

To reproduce the bug:
- apply Russian Doll design pattern to a read-only LoanApplication schema.

java.lang.AssertionError
	at org.netbeans.modules.xml.xdm.XDMModel.flushDocument(XDMModel.java:764)
	at org.netbeans.modules.xml.xdm.XDMModel.flush(XDMModel.java:115)
	at org.netbeans.modules.xml.xdm.xam.XDMAccess.flush(XDMAccess.java:93)
	at
org.netbeans.modules.xml.xam.AbstractModel.endTransaction(AbstractModel.java:297)
	at
org.netbeans.modules.xml.xam.AbstractModel.endTransaction(AbstractModel.java:285)
	at
org.netbeans.modules.xml.axi.impl.DefaultSchemaGenerator$TransformHelper.execute(DefaultSchemaGenerator.java:681)
	at
org.netbeans.modules.xml.axi.impl.DefaultSchemaGenerator.transformSchema(DefaultSchemaGenerator.java:103)
	at
org.netbeans.modules.xml.axi.impl.SchemaGeneratorFactoryImpl.transformSchema(SchemaGeneratorFactoryImpl.java:167)
	at
org.netbeans.modules.xml.schema.abe.wizard.SchemaTransformWizard$1.run(SchemaTransformWizard.java:149)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 Chris Webster 2006-09-19 17:35:28 UTC
The ADP action should be disabled if the XAMUI.isEditable returns false.
Comment 2 Ayub Khan 2006-09-19 20:09:48 UTC
Fixed for ADP

Files changed:

/cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/actions/Attic/SchemaTransformAction.java,v
 <--  SchemaTransformAction.java
new revision: 1.1.2.9; previous revision: 1.1.2.8


Girish, Design view should disable "Add" action for readonly schema. We have to
check other places too, property sheet.
Comment 3 Ayub Khan 2006-09-19 20:24:36 UTC
Fixed ADP, now uses XAMUtils.isWritable()

/xml/schema/core/src/org/netbeans/modules/xml/schema/core/actions/Attic/SchemaTransformAction.java,
new revision: 1.1.2.10; previous revision: 1.1.2.9


Comment 4 Ayub Khan 2006-09-20 00:33:34 UTC
Fix from Apply design pattern is enough for this bug. There is already a bug
regarding Design view and property allowing to edit components from other schema.
So closing this bug as fixed.
Comment 5 Andrei Chistiakov 2006-09-20 11:25:44 UTC
Verified in build 060919_1.