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

NoSuchElementException when attempting to use AceJump #190

Closed
rocketraman opened this issue Sep 14, 2017 · 3 comments
Closed

NoSuchElementException when attempting to use AceJump #190

rocketraman opened this issue Sep 14, 2017 · 3 comments

Comments

@rocketraman
Copy link

When using the AceJump shortcut, the following error occurs:

null
java.lang.ExceptionInInitializerError
	at com.johnlindquist.acejump.control.AceAction.actionPerformed(AceAction.kt:16)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:216)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:233)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:625)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.f(IdeKeyEventDispatcher.java:479)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:621)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.util.NoSuchElementException: Array contains no element matching the predicate.
	at com.johnlindquist.acejump.search.AceUtilKt.getDefaultEditor(AceUtil.kt:237)
	at com.johnlindquist.acejump.view.Model.<init>(Model.kt:25)
	at com.johnlindquist.acejump.view.Model.<clinit>(Model.kt:24)
	... 17 more

Environment:

IntelliJ IDEA 2017.2.4
Build #IU-172.4155.36, built on September 11, 2017
Licensed to Raman Gupta
Subscription is active until May 4, 2018
JRE: 1.8.0_152-release-915-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.12.8-300.fc26.x86_64

AceJump version 3.4.0

@rocketraman rocketraman changed the title Error when attempting to use AceJump NoSuchElementException when attempting to use AceJump Sep 14, 2017
@breandan
Copy link
Collaborator

breandan commented Oct 16, 2017

Somehow, you were able to activate AceJump with no open projects! How is this possible? :)

Your error is caused by this line. When I wrote it I remember thinking, "#190 could never happen":

ProjectManager.getInstance().openProjects[0]

Can you provide any hints for how to reproduce this error? Thanks @rocketraman!

@rocketraman
Copy link
Author

@breandan Now how did I do that?? :-) I just tried to replicate it and no luck -- it is working fine. I'll go ahead and close this for now, and if it happens again I'll keep better notes of what I was doing.

@rocketraman
Copy link
Author

rocketraman commented Oct 16, 2017

@breandan Re-opening! I just reproduced this on the latest version:

null
java.lang.ExceptionInInitializerError
	at com.johnlindquist.acejump.control.AceAction.actionPerformed(AceAction.kt:24)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:216)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:233)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:625)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.e(IdeKeyEventDispatcher.java:479)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:621)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.util.NoSuchElementException: Array contains no element matching the predicate.
	at com.johnlindquist.acejump.search.AceUtilKt.getDefaultEditor(AceUtil.kt:246)
	at com.johnlindquist.acejump.view.Model.<init>(Model.kt:26)
	at com.johnlindquist.acejump.view.Model.<clinit>(Model.kt:25)
	... 17 more

I have an open project but it is a Node.JS project and has no java sources. The active editor contains a json file. I also tried an Asciidoc (.adoc) and some Javascript source (.js). Same error for all.

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

No branches or pull requests

2 participants