import-cost
import-cost copied to clipboard
Exception in plugin in webstorm (1.0.2021) more details has been attached
The problem is if we have a ts
file in our application and if we want to compile it to a js
file (using tsc
command) the following exception occurs.
java.lang.Throwable: Invalid file: file:myFilePath (invalid) at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182) at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:357) at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:155) at com.github.denofevil.importCost.LanguageService.getImportSize(LanguageService.kt:66) at com.github.denofevil.importCost.LinePainter.getLineExtensions(LinePainter.kt:20) at com.intellij.openapi.editor.impl.EditorImpl.processLineExtensions(EditorImpl.java:781) at com.intellij.openapi.editor.impl.view.EditorPainter$Session.collectExtensions(EditorPainter.java:857) at com.intellij.openapi.editor.impl.view.EditorPainter$Session$1.paintAfterLineEnd(EditorPainter.java:443) at com.intellij.openapi.editor.impl.view.EditorPainter$Session.paintLineFragments(EditorPainter.java:1550) at com.intellij.openapi.editor.impl.view.EditorPainter$Session.paintBackground(EditorPainter.java:356) at com.intellij.openapi.editor.impl.view.EditorPainter$Session.paint(EditorPainter.java:184) at com.intellij.openapi.editor.impl.view.EditorPainter.paint(EditorPainter.java:71) at com.intellij.openapi.editor.impl.view.EditorView.paint(EditorView.java:287) at com.intellij.openapi.editor.impl.EditorImpl.paint(EditorImpl.java:1951) at com.intellij.openapi.editor.impl.EditorComponentImpl.paintComponent(EditorComponentImpl.java:255) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1077) at com.intellij.openapi.editor.impl.EditorComponentImpl.paint(EditorComponentImpl.java:126) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JViewport.paint(JViewport.java:737) at com.intellij.ui.components.JBViewport.paint(JBViewport.java:235) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:910) at com.intellij.ui.tabs.impl.JBTabsImpl.paintChildren(JBTabsImpl.java:581) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer$EditorTabs.paintChildren(EditorTabbedContainer.java:724) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1086) at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5263) at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:246) at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1333) at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5211) at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5021) at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:868) at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:851) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:851) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:826) at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:775) at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1901) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:479) 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)