I cannot reproduce the problem you describe using our simple test case
(see attached forced_deletion.xml and forced_deletion.css. Originally
this test case has been created to demonstrate the usefulness of
"Edit|Force Deletion".)
The stack trace below seems to show that the bug is triggered by a
specific use of the label() CSS extension. See
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/label.html
Please be kind enough to tell us how to reproduce this bug. You can
either modify the simple test case I've attached to this email or send
us a document and a CSS of your own.
Yves Forkl wrote:
>
> I encountered the following bug which is always reproducible for me (XXE
> 4.6.0
> pro on Ubuntu 8.04).
>
> Steps to reproduce:
>
> - have a DTD that requires somewhere (here: for first children) either
> element
> sequence A1, A2 or element B but does not allow both
>
> - select sequence of instances A1, A2 in document
>
> - apply command Replace to the selected nodes, replacing them with element B
>
> Undesirable effect:
>
> the cursor keeps blinking and is left in the element after B, but XXE's
> document window does not accept any keyboard input any longer, while the
> mouse
> still works (moves the insertion point but not the cursor!); however, Ctrl-Z
> works once and restores sequence A1, A2 but then leaves them selected and no
> key strokes are accepted anymore
>
> Sole remedy: Ctrl-Shift-W (or using the mouse) to close document window
>
>
> Exceptions thrown on terminal:
>
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
> at
> com.xmlmind.xmledit.styledgadget.Paragraph.refreshFromLine(Paragraph.java:832)
> at
> com.xmlmind.xmledit.styledgadget.Paragraph.paintRelayout(Paragraph.java:807)
> at
> com.xmlmind.xmledit.styledgadget.TextLineBox.refresh(TextLineBox.java:38)
> at
> com.xmlmind.xmledit.form.XPathLabelVP.documentChanged(XPathLabelVP.java:89)
> at
> com.xmlmind.xmledit.styledview.CustomViewManager$XPathLabelManager.notifyXPathLabels(CustomViewManager.java:2007)
> at
> com.xmlmind.xmledit.styledview.CustomViewManager$XPathLabelManager.checkMustNotify(CustomViewManager.java:1995)
> at
> com.xmlmind.xmledit.styledview.CustomViewManager.editCompleted(CustomViewManager.java:1304)
> at
> com.xmlmind.xml.doc.Document.notifyDocumentListeners(Document.java:667)
> at com.xmlmind.xml.doc.Document.fireEditSequence(Document.java:742)
> at com.xmlmind.xml.doc.Document.endEdit(Document.java:559)
> at
> com.xmlmind.xmledit.edit.ElementEditor.doReplace(ElementEditor.java:1147)
> at
> com.xmlmind.xmledit.edit.ElementEditor.replace(ElementEditor.java:1090)
> at
> com.xmlmind.xmledit.edit.ElementEditor.replace(ElementEditor.java:1057)
> at com.xmlmind.xmledit.cmd.edit.Replace.doExecute(Replace.java:163)
> at
> com.xmlmind.xmledit.cmd.edit.ChooseFieldCommand.execute(ChooseFieldCommand.java:89)
> at
> com.xmlmind.xmleditapp.kit.part.EditPane.fieldSelected(EditPane.java:188)
> at
> com.xmlmind.xmledit.cmd.edit.FieldChooser.fireFieldSelected(FieldChooser.java:319)
> at
> com.xmlmind.xmledit.cmd.edit.FieldChooser.done(FieldChooser.java:311)
> at
> com.xmlmind.xmledit.cmd.edit.FieldChooser.ok(FieldChooser.java:302)
> at
> com.xmlmind.xmledit.cmd.edit.FieldChooser.actionPerformed(FieldChooser.java:218)
> at javax.swing.JTextField.fireActionPerformed(JTextField.java:492)
> at javax.swing.JTextField.postActionEvent(JTextField.java:705)
> at
> javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:820)
> at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1633)
> at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
> at javax.swing.JComponent.processKeyBindings(JComponent.java:2886)
> at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
> at java.awt.Component.processEvent(Component.java:6040)
> at java.awt.Container.processEvent(Container.java:2041)
> at java.awt.Component.dispatchEventImpl(Component.java:4630)
> at java.awt.Container.dispatchEventImpl(Container.java:2099)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at
> java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850)
> at
> java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712)
> at
> java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990)
> at
> java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855)
> at
> java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676)
> at java.awt.Component.dispatchEventImpl(Component.java:4502)
> at java.awt.Container.dispatchEventImpl(Container.java:2099)
> at java.awt.Window.dispatchEventImpl(Window.java:2478)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>
book,
part,
head,
tail,
body {
display: block;
margin: 0.5ex;
}
part {
border: 2 solid gray;
padding: 0.5ex;
}
body {
background-color: #E0E0FF;
}
tail {
background-color: #E0FFE0;
}
head {
background-color: #FFE0E0;
}
<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type="text/css" href="forced_deletion.css"?>
<!DOCTYPE book [
<!ELEMENT book (part+)>
<!ELEMENT part ((head, tail)| body)>
<!ELEMENT head (#PCDATA)>
<!ELEMENT tail (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<book>
<part>
<head>This is the head.</head>
<tail>This is the tail.</tail>
</part>
<part>
<body>This is the body.</body>
</part>
</book>
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support