kisstkondoros / codemetrics

VSCode extension which shows the complexity information for TypeScript class members
Other
404 stars 20 forks source link

NullPointerException in IntelliJ plug-in when text selection is empty #110

Open Kosmo1 opened 1 year ago

Kosmo1 commented 1 year ago

This seems to happen when I double-click just within the left margin of an editor pane in an attempt to select an entire, single line of code. Here's the InteliJ version info and stacktrace:

IntelliJ IDEA 2023.1 (Ultimate Edition) Build #IU-231.8109.175, built on March 28, 2023 Licensed to ** Subscription is active until November 5, 2023. Runtime version: 17.0.6+10-b829.5 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.3.1 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 12 Metal Rendering is ON Registry: debugger.new.tool.window.layout=true ide.experimental.ui=true

Non-Bundled Plugins: com.github.leomillon.uuidgenerator (4.5.1) CFML Support (231.8109.90) com.github.kisstkondoros.codemetrics (1.0.4) com.kevinlinxp.sublimeSnippetsSupport (1.4.0) com.intellij.guice (231.8109.90) CheckStyle-IDEA (5.78.0) com.github.vilinfield.dust (0.4.2) dev.flikas.idea.spring.boot.assistant.plugin (0.14.3) izhangzhihao.rainbow.brackets (2023.2.6) com.intellij.lang.jsgraphql (3.4.0) org.intellij.scala (2023.1.15) uk.co.ben-gibson.remote.repository.mapper (4.3.2) org.sonarlint.idea (8.1.0.65508) com.chuntung.plugin.mybatisbuilder (1.2.4) com.intellij.spring.batch (231.8109.90) com.baomidou.plugin.idea.mybatisx (1.5.5) com.intellij.plugins.html.instantEditing (231.8109.91)

Kotlin: 231-1.8.20-IJ8109.175

java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because the return value of "com.intellij.openapi.editor.event.EditorMouseEvent.getArea()" is null at com.github.kisstkondoros.codemetrics.inlay.InlayHighlighter$2.mouseClicked(InlayHighlighter.java:62) at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.runMouseClickedCommand(EditorImpl.java:3947) at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.mouseReleased(EditorImpl.java:3865) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6656) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385) at java.desktop/java.awt.Component.processEvent(Component.java:6421) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:790) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:763) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:761) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:760) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:666) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:614) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:569) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:994) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:994) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)