Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test sources root out of project can be selected #1059

Closed
Assignees
Vassiliy-Kudryashov
Labels
comp-uiImprovements of plugin UI appearence and functionalityctg-bugIssue is a bug
@alisevych

Description

@alisevych

Description

Test sources root folder out of project can be selected in Maven and IntelliJ projects.
Error is shown and path to the folder is not displayed as chosen.
However if then a valid test sources root is selected and Generate Tests is pressed, IDEA exception is displayed - that illegal folder is chosen

To Reproduce

  1. Run a Maven/IntelliJ project with JDK 8/11 in IntelliJ Idea 2022.1.4
  2. Use plugin to generate tests:plugin build from unit-test-bot/rc92920022
  3. Open the UnitTestBot generation dialog for a Java class
  4. Click ... button next to Test sources root, select some other project's folder
  5. ClickGenerate Tests
  6. Error thatincorrect folder is chosen is displayed
  7. Select a valid suggestion from the list of Test sources root dropdown
  8. ClickGenerate Tests

Expected behavior

Tests are supposed to be generated in a valid suggested test sources root.

Actual behavior

IDE Internal error is displayed:
java.lang.IllegalStateException: Could not find module for file://<path to the selected project from step#4>

Visual proofs (screenshots, logs, images)

java.lang.IllegalStateException:Couldnotfindmoduleforfile://D:/JavaProjects/guavaatorg.utbot.intellij.plugin.models.GenerateTestsModel.setSourceRootAndFindTestModule(GenerateTestsModel.kt:55)atorg.utbot.intellij.plugin.ui.components.TestFolderComboWithBrowseButton$2.actionPerformed(TestFolderComboWithBrowseButton.kt:74)atjava.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)atjava.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)atjava.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)atjava.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)atjava.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)atjava.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)atjava.desktop/java.awt.Component.processMouseEvent(Component.java:6654)atjava.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)atjava.desktop/java.awt.Component.processEvent(Component.java:6419)atjava.desktop/java.awt.Container.processEvent(Container.java:2263)atjava.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)atjava.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)atjava.desktop/java.awt.Component.dispatchEvent(Component.java:4861)atjava.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)atjava.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)atjava.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)atjava.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)atjava.desktop/java.awt.Window.dispatchEventImpl(Window.java:2793)atjava.desktop/java.awt.Component.dispatchEvent(Component.java:4861)atjava.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)atjava.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)atjava.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)atjava.base/java.security.AccessController.doPrivileged(NativeMethod)atjava.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)atjava.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)atjava.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)atjava.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)atjava.base/java.security.AccessController.doPrivileged(NativeMethod)atjava.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)atjava.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)atcom.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)atcom.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)atcom.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:743)atcom.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)atcom.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)atcom.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)atcom.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)atcom.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)atcom.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)atcom.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)atcom.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)atjava.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)atjava.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)atjava.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121)atjava.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)atjava.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)atjava.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)atjava.base/java.security.AccessController.doPrivileged(NativeMethod)atjava.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)atjava.desktop/java.awt.Dialog.show(Dialog.java:1070)atcom.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:702)atcom.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:439)atcom.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1668)atcom.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1626)atcom.intellij.openapi.ui.DialogWrapper.showAndGet(DialogWrapper.java:1640)atorg.utbot.intellij.plugin.generator.UtTestsDialogProcessor.createDialogAndGenerateTests(UtTestsDialogProcessor.kt:78)atorg.utbot.intellij.plugin.ui.actions.GenerateTestsAction.actionPerformed(GenerateTestsAction.kt:34)atcom.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:235)atcom.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:256)atcom.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:235)atcom.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$performAction$0(ActionMenuItem.java:289)atcom.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:233)atcom.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.performAction(ActionMenuItem.java:281)atcom.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:296)atjava.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)atcom.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$2(ActionMenuItem.java:111)atcom.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)atcom.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)atcom.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)atcom.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:540)atcom.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:570)atjava.desktop/java.awt.Component.processMouseEvent(Component.java:6654)atjava.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)atjava.desktop/java.awt.Component.processEvent(Component.java:6419)atjava.desktop/java.awt.Container.processEvent(Container.java:2263)atjava.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)atjava.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)atjava.desktop/java.awt.Component.dispatchEvent(Component.java:4861)atjava.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)atjava.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)atjava.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)atjava.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)atjava.desktop/java.awt.Window.dispatchEventImpl(Window.java:2793)atjava.desktop/java.awt.Component.dispatchEvent(Component.java:4861)atjava.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)atjava.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)atjava.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)atjava.base/java.security.AccessController.doPrivileged(NativeMethod)atjava.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)atjava.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)atjava.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)atjava.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)atjava.base/java.security.AccessController.doPrivileged(NativeMethod)atjava.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)atjava.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)atcom.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)atcom.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)atcom.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:743)atcom.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)atcom.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)atcom.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)atcom.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)atcom.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)atcom.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)atcom.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)atcom.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)atjava.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)atjava.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)atjava.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)atjava.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)atjava.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)atjava.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Environment

WIndows 10 Pro
IntelliJ IDEA 2022.1.4
Maven / IntelliJ
JDK 8 / 11

Metadata

Metadata

Labels

comp-uiImprovements of plugin UI appearence and functionalityctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp