fileType extension point - not considered in tests?

Answered

After increasing the minimum IDE version to 2019.2 for the CSV plugin and switching from `fileTypeFactory` extension point to `fileType` extension point (https://github.com/SeeSharpSoft/intellij-csv-validator/commit/a7ad42b297637cd44e39395a7172fb28ccf9099d), the majority of the tests fail. The reason is that the .csv test files are not recognized as CSV filetype/language anymore but plain-text (see e.g. https://travis-ci.org/SeeSharpSoft/intellij-csv-validator/jobs/577679124#L460), therefore the tests checking CSV specific functionality do fail.

During manual testing by runIde, everything seems to work as expected: parsing, structure-view, actions, editor, etc. all is working and "*.csv"/".tsv" files are recognized and treated as such. What am I missing?

3 comments
Comment actions Permalink

No, its quite the opposite: While I tried in https://youtrack.jetbrains.com/issue/IDEA-220093 to keep the plugin backward compatible by keep on using fileTypeFactory extension point (but did encounter other issues that require a newer version as well), I threw backward compatibility over board and went all in with minimum v2019.2.* and encountered this issue using fileType extension point (instead of fileTypeFactory) only.

EDIT: After some thoughts I guess the answer to your question could be also somewhat "yes" as the resulting errors in the tests are "the same". However, the unrecognized file-type by using fileType EP in this case seems to occur only in test setup, while (as far as I remember) the problems by using fileTypeFactory EP (linked issue) were also noticable when manually testing in the IDE.

0
Comment actions Permalink

1) fileNamesCaseInsensitive="true" is wrong in each declaration, as it would specify list of hardcoded filenames instead of matching by extension

2) indeed there seems to be a bug, please follow https://youtrack.jetbrains.com/issue/IDEA-221563

 

Thanks for report!

0

Please sign in to leave a comment.