Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1672 Edit Tag at Caret doesn't work properly

None
closed-fixed
Eric Le Lay
XML (11)
5
2014-04-18
2012-11-14
Vít Profant
No

When user is inserting a new tag or editing tag at caret, the modal window "Edit tag" behaves weird. Preview doesn't change nor when the value is entered / chosen neither when the check setbox is checked. If a checkbox is selected, value field and select boxes are not editable, it's even impossible to click OK. If not, there's no change in the buffer after clicking OK.
The problem is in XML Plugin 2.8.3-jedit5.0 run on JEdit 5.0.1.

Discussion

  • Eric Le Lay
    Eric Le Lay
    2012-11-19

    Hi,
    I can't reproduce it.
    What kind of XML/HTML are you editing ?

    Best regards,

     
  • Patrick Eibl
    Patrick Eibl
    2012-11-19

    I am also seeing this issue with the same versions, editing an XML file with an xsd schema.

     
  • Patrick Eibl
    Patrick Eibl
    2012-11-19

    Forgot to add, I get an NPE when this happens:

    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception occurred during event dispatching:
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NullPointerException
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at xml.EditTagDialog.updateTag(EditTagDialog.java:308)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at xml.EditTagDialog.access$100(EditTagDialog.java:35)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at xml.EditTagDialog$AttributeTableModel.setValueAt(EditTagDialog.java:562)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.JTable.setValueAt(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.JTable.editingStopped(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultCellEditor$3.stopCellEditing(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultCellEditor.stopCellEditing(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.processMouseEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.JComponent.processMouseEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.processEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.processEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEventImpl(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.dispatchEventImpl(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.dispatchEventImpl(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Window.dispatchEventImpl(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.access$000(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$1.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$1.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$2.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$2.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog$1.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog$3.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog.show(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.show(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.setVisible(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Window.setVisible(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog.setVisible(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at xml.EditTagDialog.<init>(EditTagDialog.java:155)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at xml.XmlActions.showEditTagDialog(XmlActions.java:263)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at xml.completion.XmlCompletion$1.run(XmlCompletion.java:202)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.access$000(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$1.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$1.run(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEvent(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    4:24:39 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.run(Unknown Source)

     
  • Vít Profant
    Vít Profant
    2012-11-19

    Hey. A DocBook 4.2 documentation. Local DTD, it's a big structure, child files embedded as entities, there are comments at the end of each of them <!--:xml.root=path -->.
    Everything works fine that way except those tag attributes. Those used to work great too with some earlier versions of the plugin as well as jEdit itself.

     
  • Vít Profant
    Vít Profant
    2012-11-20

    Now I did a little experiment: After initial parsing, when trying to edit a tag in a child document, the "Edit tag" dialog acts as I reported.
    However, trying to edit a tag in the root document gives the following error message:

    java.lang.NullPointerException
    at xml.EditTagDialog.updateTag(EditTagDialog.java:308)
    at xml.EditTagDialog.<init>(EditTagDialog.java:143)
    at xml.XmlActions.showEditTagDialog(XmlActions.java:209)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.gjt.sp.jedit.bsh.Reflect.invokeMethod(Reflect.java:134)
    at org.gjt.sp.jedit.bsh.Reflect.invokeStaticMethod(Reflect.java:98)
    at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:871)
    at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
    at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
    at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
    at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
    at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
    at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362)
    at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258)
    at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186)
    at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:225)
    at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:423)
    at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:73)
    at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:342)
    at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3334)
    at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3316)
    at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:212)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

     
  • Eric Le Lay
    Eric Le Lay
    2012-11-21

    Hey,
    This sounds familiar. Can you please try to drop http://kerik-sf.users.sourceforge.net/dropbox/XML.jar in your JEDIT_SETTINGS/jars (with jEdit off) ?
    I think I've fixed the exception in trunk this summer but postponed release.
    This should work for you better !

     
  • Vít Profant
    Vít Profant
    2012-11-22

    Yes, now the things I reported seem to work fine.

    Thanks Eric!

     
  • Eric Le Lay
    Eric Le Lay
    2012-11-22

    thanks for reporting !
    I'll release the new version soon.

     
  • Eric Le Lay
    Eric Le Lay
    2014-04-18

    • status: open --> closed-fixed
    • Group: -->
     
  • Eric Le Lay
    Eric Le Lay
    2014-04-18

    XML 2.8.7 has been released.