Tinker Plugin shows empty Output and raises Exception
See original GitHub issueBug description
Tinker Plugin does not work inside Phpstorm but in Terminal it does. It seems to be related with TinkerOutputToolwindow.updateView() is not able to fallback to an default value when LABEL.defaultAttributes.foregroundColor
is null
To Reproduce
-
open Tinker Console for laravel 8.0 project
-
add code:
<?PHP //Tinker away! echo 'hello world';
-
run code (with Smart Action or Run Console)
-
Tinker Output is empty & Exception is thrown:
java.lang.NullPointerException: LABEL.defaultAttributes.foregroundColor must not be null at nl.deschepers.laraveltinker.toolwindow.TinkerOutputToolwindow.updateView(TinkerOutputToolwindow.kt:86) at nl.deschepers.laraveltinker.toolwindow.TinkerOutputToolwindow.resetOutput(TinkerOutputToolwindow.kt:58) at nl.deschepers.laraveltinker.util.PhpArtisanTinkerUtil.run(PhpArtisanTinkerUtil.kt:118) at nl.deschepers.laraveltinker.util.TinkerConsoleUtil.runTinkerWithFile(TinkerConsoleUtil.kt:36) at nl.deschepers.laraveltinker.action.SmartAction.actionPerformed(SmartAction.kt:58) at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:563) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$8(IdeKeyEventDispatcher.java:677) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:261) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:670) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:603) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:574) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:457) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:450) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:218) at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:798) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:748) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:441) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:825) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:440) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:794) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Expected behavior ‘hello world’ should be echoed to Tinker’s Console
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
-
IDE & Version: PhpStorm 2021.2.3 Build #PS-212.5457.49, built on October 13, 2021
Runtime version: 11.0.12+7-b1504.40 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.7 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 16 Registry: run.processes.with.pty=TRUE, ide.balloon.shadow.size=0 Non-Bundled Plugins: com.github.leomillon.uuidgenerator (4.5.1), Key Promoter X (2021.3), com.myoutdesk.tailwind_formatter (1.4.2), String Manipulation (8.20.203.000.1), com.intellij.ideolog (203.0.27.0), com.microsoft.vso.idea (1.162.0), com.karateca.jstoolbox (1.10), com.bum.intellij.tailwindcss (2.0.2), com.vladsch.idea.multimarkdown (3.0.202.112), com.sonnk.iterm (0.0.8), org.intellij.plugins.postcss (212.5457.18), HtmlEntity (1.1), com.xiaobing1024.laravel (1.1.1), com.dmarcotte.handlebars (212.5457.62), nl.deschepers.laraveltinker (2.3.0), com.github.shiraji.yaemoji (1.0.7), org.endpointdeps.EndpointDependencies (1.3), de.espend.idea.laravel (0.15.4), com.kalessil.phpStorm.phpInspectionsEA (4.0.6.4), ru.adelf.idea.dotenv (2021.3.0.212), de.espend.idea.php.annotation (8.0.0), fr.adrienbrault.idea.symfony2plugin (0.23.212), com.jetbrains.plugins.jade (212.5080.8), intellij.prettierJS (212.5080.8), tv.twelvetone.intellij.plugins.intellivue (1.1.8)
-
PHP Version: 7.4.24 && 8.0.11
-
OS: macOS 10.15.7
-
Laravel Tinker plugin version : 2.3.0
-
Interpreter Type: Local
-
Laravel Version: v8.54.0 && v8.63.0
-
Tinker version: v2.6.1 && v2.6.2
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top GitHub Comments
Fixed in the next release ^^
I indeed changed this because I removed a title from the screen where I picked the color from. I’ll fix this today 🙂