CheckboxTree not clickable since Version 2020.1
Answered
I am using a CheckboxTree in a Modal Dialog of a IntelliJ Plugin which is created by a Class extending DialogWrapper.
The dialog is used to display an overview of files in which the user is allowed to check and uncheck some nodes.
I have developed this dialog under IntelliJ Version 2019.3 where it worked flawlessly. But now, since I upgraded to IntelliJ Version 2020.1, I am not able to check or uncheck any of the nodes - the clicks are simply not registered. The same error happens under IntelliJ Version 2020.2. Again, when I open a Sandbox IDE of version 2019.3 for testing my plugin, the dialog works without a problem.
Could you provide any hints on what could be the problem and how to fix it?
Please sign in to leave a comment.
It's hard to guess with no code attached, but probably this one may help you: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009313539/comments/360001902960
Hi Jakub,
thanks for your answer and your provided link. I am not sure, if the situation from the link applies to me, as I am using DialogWrapper for showing my modal dialogue and I can also verify that I can focus on my Modal and interact with most of the Swing Components. So here are some extracts of my code:
First I create a class for my Modal which subclasses DialogWrapper:
In there, there is a CheckBoxTree which should be displayed in a panel and also has a listener that updates a neighbouring CheckBoxList
And finally:
Then I show the dialog with the following code:
This displays the Component as desired but since Version 2020.1 the nodes for my CheckboxTree can not be clicked. The rows are marked in blue as expected when clicking in them however and all other components are clickable too. So it seems to me like an explicit problem with the CheckboxTree when used in a Modal Dialog in IntelliJ 2020.1+.
Thanks in advance for any help you can provide!
Can I ask you to provide a minimal reproducible project so I can debug it locally?
Yes, under the following link you find a small IntelliJ Plugin with my intended functionality: https://megastore.uni-augsburg.de/get/GSksAZMoWV/
Just follow these steps after downloading:
1. Integrate it as Gradle Plugin in your IDE,
2. execute "runIDE" task
3. find "MyProjects" Tool Window on the left of the Sandbox IDE
4. Right Click in Tool Window- > Import Project from Archive
5. Navigate to a suitable zipFile (it should have a depth of at least two with some files so that the filetree becomes interesting
6. The file tree containing the files of you selected zip should show up. Maybe you need to rescale for the panel containing the tree to display correctly
7. Try to click on the Checkboxes of the tree in the left panel. It should not be possible to uncheck any of the Nodes of the tree. All other components should work as expected. Especially you should be able to unfold any of the nodes of the tree and mark them as selected.
Let me know if this works for you and if you have gained any insights. Again, thank you for your time!
Sidenote: upgrade org.jetbrains.intellij to 0.4.21 - currently is outdated
After I picked the checkboxtreetest.zip as an archive, I have some Devgraph missing message and no files tree is presented.
Thanks for your sidenote, very much appreciated!
Ah I see, I forgot to remove this, sorry about that! Just either try to add a file called "devgraph" in your zip or (which is probably more easy) remove the following line from UpdateLocationOnInputChange function:
together with closing bracket in line 216 ofc.
Ok, I made it work, but I couldn't reproduce your issue in 2020.1:
Hi Jakub,
first of all, thanks a lot for checking out my issue!
So this is pretty confusing. Now that we know that it works for you, I think there are only things left, that might cause this issue for me:
- I am using Ubuntu instead of Mac OS (I don't think that is the problem however)
- I am forced to continue using version 0.37 for the intellij plugin as one of the plugins I use as a dependency (https://plugins.jetbrains.com/plugin/10209-lsp-support) is not compatible with version 0.4.21 - at least I get a long stacktrace of errors when I try building with plugin version 0.4.21 and those errors seem to come from this plugin.
What do you think might be the issue? Is it thinkable that the outdated intellij plugin version causes the issue?
Best regards
Christian