Image file type no longer shows up in FileTypeRegistry.getRegisteredFileTypes() in 2020.1 under tests
已回答
In Markdown Navigator I use registered file types to resolve links to files based on extension. The tests for image link resolution passed in 2020.1 EAP but latest SNAPSHOT version and 2020.1 Beta are failing because "png" is not part of registered file types.
Manually checking FileTypeRegistry and FileTypeManager shows that there is no Image type registered under tests. Run time works as before.
How do I add Image files to registered file types when running light platform tests?
请先登录再写评论。
Vladimir,
I tried to run your project's tests locally, but with no luck.
Have you considered migrating your plugin's setup to Gradle?
I am in the process of updating the OSS project. In the mean time I will try to create a minimalist project with test to duplicate this. I examined the registry and file type manager manually by setting a break point and looking at the available file types under test.
Did you declare dependency on image plugin explicitly? See "Images module functionality (package
org.intellij.images.*) extracted to plugin" https://www.jetbrains.org/intellij/sdk/docs/reference_guide/api_changes/api_changes_list_2020.htmlFor test environment, such dependency must be declared explicitly
Thank you Yann Cebron, adding <depends>com.intellij.platform.images</depends> to plugin.xml and platform-images.jar to the class path solved the problem.
BTW, the link above results in 404.
https://www.jetbrains.org/intellij/sdk/docs/reference_guide/api_changes/api_changes_list_2020.html