Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AceJump doesn't show labels in a diff viewer #414

Open
h0tk3y opened this issue Oct 27, 2022 · 5 comments
Open

AceJump doesn't show labels in a diff viewer #414

h0tk3y opened this issue Oct 27, 2022 · 5 comments
Labels

Comments

@h0tk3y
Copy link

h0tk3y commented Oct 27, 2022

Describe the bug
If I try to use one of the AceJump actions in the IntelliJ IDEA Diff Viewer editor, it won't show the jump labels and will throw an exception, not allowing me to complete the jump.

The stack trace of the exception is as follows:

Stack trace
java.util.NoSuchElementException: Collection is empty.
	at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:201)
	at org.acejump.view.TextHighlighter.showSearchNotification(TextHighlighter.kt:96)
	at org.acejump.view.TextHighlighter.render(TextHighlighter.kt:78)
	at org.acejump.session.Session.updateSearch(Session.kt:117)
	at org.acejump.session.Session.updateSearch$default(Session.kt:109)
	at org.acejump.session.Session.startRegexSearch(Session.kt:192)
	at org.acejump.session.Session.startRegexSearch(Session.kt:202)
	at org.acejump.action.AceAction$BaseRegexSearchAction.invoke(AceAction.kt:64)
	at org.acejump.action.AceAction.actionPerformed(AceAction.kt:35)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:323)
	at com.intellij.ide.actions.GotoActionAction.lambda$performActionImpl$4(GotoActionAction.java:91)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:346)
	at com.intellij.ide.actions.GotoActionAction.performActionImpl(GotoActionAction.java:90)
	at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:70)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:429)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:74)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:114)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:36)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
	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:749)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
	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)

To Reproduce
Steps to reproduce the behavior:

  1. Run the IntelliJ IDEA action "Open Blank Diff Window" (through Ctrl/Cmd+Shift+A)
  2. Type something in the diff editor
  3. Run one of the AceJump actions that should allow you to jump
  4. The cursor now changes accordingly to the AceJump actions, but no labels are displayed in the editor when you start typing the search term (nor immediately, if it's a line-based action)

Expected behavior
AceJump works in the Diff Viewer editors

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS
  • IntelliJ IDEA 2022.x
  • AceJump version 3.8.8
@h0tk3y
Copy link
Author

h0tk3y commented Jun 28, 2023

One more editor kind where AceJump can be triggered but does not render hints is the Kotlin REPL.

@h0tk3y
Copy link
Author

h0tk3y commented Jul 13, 2023

One more editor affected by this is the preview editor of the Find in Files... dialogue (⌘⇧F).

@breandan
Copy link
Collaborator

breandan commented Jul 13, 2023

Hi Sergey, thank you for documenting this behavior. I would like to fix it, but as far as I have tried, I have been unsuccessful in finding the API endpoint. Any suggestions are welcome.

@h0tk3y
Copy link
Author

h0tk3y commented Jul 13, 2023

@breandan Thanks for trying! Unfortunately, I don't have IDE plugin development experience and can't help much.
Should we try to ask someone from the IntelliJ Team at JetBrains?

@breandan
Copy link
Collaborator

Oh, I see you moved to Gradle. Congrats man! I just asked on the forums as @karollewandowski suggested, let's see what they say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants