spek icon indicating copy to clipboard operation
spek copied to clipboard

IDEA Plugin: Support `Structure View`

Open LiYing2010 opened this issue 5 years ago • 3 comments

Tests are written using nested lambdas, and for most case, our tests are nested in many many levels, and get really really long, but Plugin doesn't parse these nested levels and display the whole nested structure in IDEA Structure View so in Structure View, we can only see the Test Class itself, but no Test Cases structure information at all.

It could be very difficult to navigate in test code when it is very long but not Structure View available

especially, we could put some test code in a wrong nest level by accident

LiYing2010 avatar Sep 13 '19 09:09 LiYing2010

Tentatively scheduled for 2.0.9

raniejade avatar Sep 14 '19 06:09 raniejade

Did a bit of looking, the structure view is linked to a particular language (on Spek's case it's Kotlin). I did find LanguageSubstitutor which might be the solution to this, but I need to do some experiments.

raniejade avatar Sep 21 '19 00:09 raniejade

StructuredView is too tied to the language of a file making it hard to extend. Moving forward, I'll just a new tool window that shows the structure of a spek file. https://www.jetbrains.org/intellij/sdk/docs/user_interface_components/tool_windows.html

raniejade avatar Feb 23 '20 04:02 raniejade