I'm looking at porting an internal intellisense VS Code extension I wrote to IntelliJ for my colleagues. The extension does the following: if the schema association settings don't exist, GET an endpoint, parse and create the payload into a JSON schema and file that contains snippets, and save both to disk as cache. The schema is written to application level settings for 2 yaml filenames, and the snippets are then added to autocomplete settings at runtime. A user command is added to force this process again to update the saved files.
The files I'm associating with have no extensions, I'm not sure if this causes issues as reported here for templates: https://youtrack.jetbrains.com/issue/IDEA-170960
IntelliJ plugins are a fair bit more complex, I haven't touched Java in ages, IntelliJ isn't my IDE of choice, and the docs are kind of sparse, so I have some questions before I dive in.
- Is this still possible? All I'd need to do is hit an endpoint, do some file writing for persistence and then write an application-level setting.
- Can plugins set application-level schema associations for a file name? And where might some docs/examples of this be?
- From the SDK docs, it doesn't seem plugins have their own storage space - how should I go about storing these plugin-written files/schemas? Should I aim to use VFS or just Java IO if some special directory constants exist for determining paths?
- How should I handle templates in this case? If they're being generated programmatically, am I able to create them and store them at application-level with them persisting?
- Perhaps I'm blind, but are there API docs for internal functions and classes for self problem-solving? The SDK docs discuss some structural things, but doesn't list much for code use, or wider scope. For example, this question here (https://intellij-support.jetbrains.com/hc/en-us/community/posts/207357135-How-to-insert-a-dynamically-generated-live-template-) has an answer that refers a class - my question being where can these references be found?