Closed igorwojda closed 1 month ago
Here's the stacktrace:
Version:
java.lang.NullPointerException: null cannot be cast to non-null type javax.swing.JComponent
at tabshifter.EditorWindow_AccessToPanel_Hack.panelOf(EditorWindow_AccessToPanel_Hack.kt:9)
at tabshifter.Ide.snapshotWindowLayout(Ide.kt:89)
at tabshifter.Ide.snapshotWindowLayout(Ide.kt:76)
at tabshifter.TabShifterKt.windowLayoutSnapshotWithPositions(TabShifter.kt:108)
at tabshifter.TabShifterKt.access$windowLayoutSnapshotWithPositions(TabShifter.kt:1)
at tabshifter.TabShifter.moveTab(TabShifter.kt:28)
at tabshifter.Actions$ShiftRight.actionPerformed(Actions.kt:31)
at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:333)
at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:47)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:585)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$9(IdeKeyEventDispatcher.java:707)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:707)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:356)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:704)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:648)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:596)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:480)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:469)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:225)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:599)
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:995)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
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)
Please fix 🙏
This issue is null cannot be cast to non-null type javax.swing.JComponent at tabshifter.EditorWindow_AccessToPanel_Hack.panelOf(EditorWindow_AccessToPanel_Hack.kt:9)
Wouldn't it be possible to fix this issue if you modify the panelOf
method's return type to be non-null type?
fun panelOf(editorWindow: EditorWindow): JComponent? =
Apologies for the slow response :(
TLDR please use version 0.33 for IDEs before 2023.3, sorry. Like with other plugins you can download a specific version https://plugins.jetbrains.com/plugin/7475-tab-shifter/versions/stable and install it via Install Plugin from Disk...
action.
Overall, the problem is that version 0.34 was meant to be only compatible with IDEs 2023.3 and above. But the plugin zip I uploaded for some reason says it's compatible with 2023.1 🤦 Marketplace won't let me to re-upload a version without requesting its deletion (not sure how long that takes; IIRC I was able to do that in the past), so I updated version 0.34 compatibility range on the marketplace instead.
@lgm1007 I think making return nullable will only push the problem downstream to https://github.com/dkandalov/tab-shifter/blob/4dea56bff6e6e75bed6adb1f1bc7f997652bdf0a/src/tabshifter/Ide.kt#L88 which expects to find a window.
Works fine with new Android Studio.
Apologies for the slow response :(
TLDR please use version 0.33 for IDEs before 2023.3, sorry. Like with other plugins you can download a specific version https://plugins.jetbrains.com/plugin/7475-tab-shifter/versions/stable and install it via
Install Plugin from Disk...
action.Overall, the problem is that version 0.34 was meant to be only compatible with IDEs 2023.3 and above. But the plugin zip I uploaded for some reason says it's compatible with 2023.1 🤦 Marketplace won't let me to re-upload a version without requesting its deletion (not sure how long that takes; IIRC I was able to do that in the past), so I updated version 0.34 compatibility range on the marketplace instead.
@lgm1007 I think making return nullable will only push the problem downstream to
which expects to find a window.
Worked like a charm! Thank you
Android Studio Hedgehog | 2023.1.1
0.33 - works 0.34 - broken
Using keyboard: Option+Cmd+Right Arrow to Shift Right Option+Cmd+Left Arrow to Shift Left