I'm writing a new plugin for IntelliJ IDEs in my spare time. It covers the languages Thislanguage and Thatlanguage. Both have the same syntax and almost the same compilation behavior. Thislanguage compiles to native executables, Thatlanguage to websites. Hence I would want my plugin to be available for any IntelliJ IDE (most importantly WebStorm, PhpStorm, IDEA Community/Ultimate). However I've experienced some generalization problems and I'm unsure about the implementation way I should choose. This is more a subjective thing, so I'd simply like some IntelliJ or plugin developers to give me opinions:
- If you implement the module type it will only be shown in IDEA's create project dialog. I guess I need a custom ProjectType for PhpStorm/WebStorm instead of a custom ModuleType, am I right with this?! How can I distinguish between them and enable only one of these?
- The languages I try to implement need a main source file for compilation. I've created custom module settings for this purpose where I can specify building targets. Should I move this information to a facet instead? However, specifying facet settings without a module doesn't make sense then, since a main source file is always bound to a module, but IDEA enables you to do so.
- The languages do not support incremental building. I implemented a JPS-Plugin for this which treats the modules as always "dirty", however JPS-Plugins aren't supported outside IDEA. Shall I switch over to a completely custom building method with a custom tool window and build action?
- Maybe I should split the plugin apart. If I create a core plugin with the syntax highlighting which references a build plugin, could the build plugin be different depending on the actual platform?
I develop the two most extreme combinations (go full IDEA vs. fully custom integration) in branches right now and my progress is therefore very slow.
Thanks in advance for your opinions.