History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3296
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Maxim Shafirov
Reporter: Arik Kfir
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Exception while calling PsiElement.setName

Created: 10 Jul 05 20:41   Updated: 18 Oct 06 13:52
Component/s: XML editing
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Windows XP

Build: 3,394
Severity: Medium


 Description  « Hide
I have a plugin which uses PSI to chane an XmlTag's name (via setName). It usually works very well, but on one occasion (could not reproduce since) I have run into the following exception:

java.lang.NullPointerException
at com.intellij.psi.impl.source.tree.ChangeUtil.copyElement(ChangeUtil.java:232)
at com.intellij.psi.impl.source.xml.XmlTagImpl$2.runInner(XmlTagImpl.java:1)
at com.intellij.pom.impl.PomTransactionBase.run(PomTransactionBase.java:28)
at com.intellij.pom.core.impl.PomModelImpl.runTransaction(PomModelImpl.java:34)
at com.intellij.psi.impl.source.xml.XmlTagImpl.setName(XmlTagImpl.java:66)
at org.mevenide.idea.psi.util.PsiUnnamedPropertyChangeListener$TagRenamerRunnable.run(PsiUnnamedPropertyChangeListener.java:342)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:122)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java)
at org.mevenide.idea.util.IDEUtils$1.run(IDEUtils.java:35)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:168)
at org.mevenide.idea.util.IDEUtils.runCommand(IDEUtils.java:33)
at org.mevenide.idea.psi.util.PsiUnnamedPropertyChangeListener.renameProperty(PsiUnnamedPropertyChangeListener.java:98)
at org.mevenide.idea.psi.support.AbstractPsiUnnamedPropertyObservable.renameProperty(AbstractPsiUnnamedPropertyObservable.java:51)
at org.mevenide.idea.editor.pom.ui.dependencies.DependencyPropertiesTableModel.setValueAt(DependencyPropertiesTableModel.java:38)
at javax.swing.JTable.setValueAt(JTable.java:1875)
at javax.swing.JTable.editingStopped(JTable.java:3333)
at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:329)
at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:214)
at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:3677)
at com.intellij.util.ui.Table.editCellAt(Table.java:110)
at javax.swing.plaf.basic.BasicTableUI$Handler.adjustFocusAndSelection(BasicTableUI.java:922)
at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:889)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
at java.awt.Component.processMouseEvent(Component.java:5485)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:59)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:82)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

See http://www.intellij.net/forums/thread.jsp?forum=22&thread=148666&message=4882142&q=457863657074696f6e207768696c652063616c6c696e6720507369456c656d656e742e7365744e616d65#4882142 for details.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.