I get this every time I try to type a > in xml files- well specifically in ant build.xml files. idea 8.1.
2009-04-28 18:39:39,066 [ 585167] ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyText=Unknown keyCode: 0x0,key
java.lang.NullPointerException
at net.jay.plugins.php.lang.PHPTypedHandler.checkAutoPopup(PHPTypedHandler.java:26)
at com.intellij.codeInsight.editorActions.TypedHandler.execute(TypedHandler.java:71)
at com.intellij.codeInsight.lookup.impl.TypedHandler.execute(TypedHandler.java:9)
at com.intellij.codeInsight.template.impl.editorActions.SpaceHandler.execute(SpaceHandler.java:2)
at org.jetbrains.plugins.grails.lang.gsp.editor.actions.GspTypedHandler.execute(GspTypedHandler.java:231)
at com.intellij.openapi.editor.actionSystem.TypedAction$1$1.run(TypedAction.java:109)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:171)
at com.intellij.openapi.editor.actionSystem.TypedAction$1.run(TypedAction.java:104)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:2)
at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:122)
at com.intellij.openapi.editor.impl.EditorImpl.a(EditorImpl.java:165)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:980)
at com.intellij.openapi.editor.impl.EditorImpl$8.keyTyped(EditorImpl.java:4)
at java.awt.AWTEventMulticaster.keyTyped(AWTEventMulticaster.java:222)
at java.awt.Component.processKeyEvent(Component.java:6171)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2799)
Here's a proposed fix:
--- src/net/jay/plugins/php/lang/PHPTypedHandler.java (revision 221)
+++ src/net/jay/plugins/php/lang/PHPTypedHandler.java (working copy)
@@ -23,7 +23,7 @@
int offset = editor.getCaretModel().getOffset();^M
PsiElement psiElement = psiFile.findElementAt(offset - 1);^M
//noinspection ConstantConditions^M
- if (psiElement.getNode().getElementType() == PHPTokenTypes.opMINUS) {^M
+ if (psiElement != null && psiElement.getNode() != null && psiElement.getNode().getElementType() == PHPTokenTypes.opMINUS) {^M
PhpCompletionUtil.showCompletion(editor);^M
}^M
}^M