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

GenerateTestAction throws IllegalStateException for not recognized file types #1329

Closed
alisevych opened this issue Nov 8, 2022 · 0 comments
Assignees
Labels
ctg-bug Issue is a bug

Comments

@alisevych
Copy link
Member

alisevych commented Nov 8, 2022

Description

GenerateTestAction throws IllegalStateException not recognized file types:
CSS, TEXT, XML, etc.
Related to multilingual support:

To Reproduce

  1. Install the plugin built from PR Python and JS support #1197 #1199 in IntelliJ Idea
  2. Open/create a Java project
  3. Open .idea folder, right-click on an XML-file

Expected behavior

No exception is supposed to be thrown in IDE.

Actual behavior

java.lang.IllegalStateException: Unknown language id: XML is thrown in IDE

Visual proofs (screenshots, logs, images)

GenerateTestsAction#update@ProjectViewPopup (org.utbot.intellij.plugin.ui.actions.GenerateTestsAction), actionId=org.utbot.intellij.plugin.ui.actions.GenerateTestsAction, text='Generate Tests with UnitTestBot...'

java.lang.IllegalStateException: Unknown language id: XML
	at org.utbot.intellij.plugin.language.agnostic.LanguageAssistantKt.loadWithException(LanguageAssistant.kt:35)
	at org.utbot.intellij.plugin.language.agnostic.LanguageAssistantKt.access$loadWithException(LanguageAssistant.kt:1)
	at org.utbot.intellij.plugin.language.agnostic.LanguageAssistant$Companion.get(LanguageAssistant.kt:18)
	at org.utbot.intellij.plugin.ui.actions.GenerateTestsAction.update(GenerateTestsAction.kt:13)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:150)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:173)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:660)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:128)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$6(ActionUpdater.java:211)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$7(ActionUpdater.java:207)
	at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:513)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	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:918)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
	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)

Environment

Windows 10 Pro
IntelliJ IDEA Ultimate 2022.2.3
IntelliJ Java project, JDK 17

Additional context

Reproducible for different file types: CSS, SCSS, XML, TEXT, ...

@alisevych alisevych added the ctg-bug Issue is a bug label Nov 8, 2022
@alisevych alisevych changed the title GenerateTestAction throws IllegalStateException not recognized file types GenerateTestAction throws IllegalStateException for not recognized file types Nov 8, 2022
@korifey korifey moved this to Todo in UTBot Java Nov 8, 2022
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug
Projects
Archived in project
Development

No branches or pull requests

2 participants