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

Plugin UI. UnsupportedOperationException is thrown when new test source root creation is chosen #712

Closed
alisevych opened this issue Aug 11, 2022 · 1 comment · Fixed by #939
Assignees
Labels
comp-ui Improvements of plugin UI appearence and functionality ctg-bug Issue is a bug status-verified Bug fix is verified

Comments

@alisevych
Copy link
Member

alisevych commented Aug 11, 2022

Description

Plugin UI. Test source root dropdown is expanded. Option to create a new test root is selected. But options list is not closed.

To Reproduce

Steps to reproduce the behavior:

  1. IntelliJ IDEA 2022.1.4 is opened with a new version of UTBot plugin installed.
  2. Create a Maven / IntelliJ project
  3. Add a class to it with a public method.
  4. Open UTBot test generation dialog.
  5. Expand Test source root dropdown. Select second option with "utbot_tests" to be created.

Expected behavior

Dropdown options list should be closed.

Actual behavior

Dropdown options list stays expanded - until a click on some other element is performed.
UnsupportedOperationException is thrown

Visual proofs (screenshots, logs, images)

image

java.lang.UnsupportedOperationException: D:/JavaProjects/Aug11Mvn8/src/test/utbot_tests
	at com.intellij.openapi.vfs.newvfs.impl.StubVirtualFile.unsupported(StubVirtualFile.java:217)
	at com.intellij.openapi.vfs.newvfs.impl.StubVirtualFile.isValid(StubVirtualFile.java:94)
	at com.intellij.openapi.roots.impl.RootIndex.getInfoForFile(RootIndex.java:634)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:182)
	at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:96)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getInfoForFileOrDirectory(ProjectFileIndexImpl.java:27)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:100)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:92)
	at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at org.utbot.intellij.plugin.models.GenerateTestsModel.setSourceRootAndFindTestModule(GenerateTestsModel.kt:42)
	at org.utbot.intellij.plugin.ui.GenerateTestsDialogWindow$setListeners$2.actionPerformed(GenerateTestsDialogWindow.kt:867)
	at java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1264)
	at java.desktop/javax.swing.JComboBox.setSelectedItem(JComboBox.java:589)
	at java.desktop/javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
	at java.desktop/javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:907)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:551)
	at java.desktop/java.awt.Component.processEvent(Component.java:6419)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2793)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:743)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
	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.pumpEventsForFilter(EventDispatchThread.java:121)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:702)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:439)
	at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1668)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1626)
	at com.intellij.openapi.ui.DialogWrapper.showAndGet(DialogWrapper.java:1640)
	at org.utbot.intellij.plugin.generator.UtTestsDialogProcessor.createDialogAndGenerateTests(UtTestsDialogProcessor.kt:71)
	at org.utbot.intellij.plugin.ui.actions.GenerateTestsAction.actionPerformed(GenerateTestsAction.kt:29)
	at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:579)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:704)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$11(IdeKeyEventDispatcher.java:704)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:256)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:701)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:590)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:473)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:462)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:227)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:804)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:740)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
	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
New Maven / IntelliJ project with JDK 8 / 11

@alisevych alisevych added ctg-bug Issue is a bug comp-ui Improvements of plugin UI appearence and functionality labels Aug 11, 2022
@korifey korifey moved this to Todo in UTBot Java Aug 11, 2022
@alisevych
Copy link
Member Author

@Vassiliy-Kudryashov reproducing on one of the latest builds in IDEA 2022.1.4 Ultimate

@alisevych alisevych added this to the Release preparation milestone Sep 7, 2022
@JaneEugenia JaneEugenia moved this from Todo to In Progress in UTBot Java Sep 9, 2022
Vassiliy-Kudryashov added a commit that referenced this issue Sep 15, 2022
Vassiliy-Kudryashov added a commit that referenced this issue Sep 16, 2022
Repository owner moved this from In Progress to Done in UTBot Java Sep 16, 2022
@tyuldashev tyuldashev added the status-verified Bug fix is verified label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-ui Improvements of plugin UI appearence and functionality ctg-bug Issue is a bug status-verified Bug fix is verified
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants