Unable to set selection properly on EditorComponentImpl in 2024.2

Answered

We have automated UI tests for an IntelliJ plugin. These tests need to be able to set the selection on a Java file editor. In 2024.1 and older versions, we called the select(int, int) method inherited from JTextComponent which worked as expected. However, now that EditorComponentImpl overrides select(int, int), this method call does not set the selection location properly and our tests no longer work. The issue appears related to how multiple carets are handled, and we have no workaround.

Note that the test is built with Ranorex - it cannot call methods directly on the super type, and calls to methods like getAccessibleContext() and setSelectionStart() do not work at all from Ranorex.

0
1 comment

Thanks for reporting the issue, unfortunately there seems to be no clear workaround/solution right now.

Could you please file an issue the IJ Platform tracker https://youtrack.jetbrains.com/issues/IJPL and provide sources or snippets of your testing code? You can set the visibility of the issue to `jetbrains-team` so it won't be public. Thanks a lot!

0

Please sign in to leave a comment.