Asking for opinions: best method for a specific new language

Hello,

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:

  1. 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?
  2. 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.
  3. 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?
  4. 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.

Kind regards

0

Sorry this got lost. Please comment if any of these questions are still relevant.

0

Sorry for my late response.

I haven't checked if something changed, yet, but I'd still like to get an answer for the following points:

I'd still like to know how to get my custom Module Type into WebStorm for example, where there are no Modules, are there? Do I need a custom Project Type for WebStorm?

I figured out JPS isn't the right way to build for the language I'm writing a plugin for, a custom action and button on the toolbar for building was a better way. The compiler only gets a main file and it always compiles everything, not only dirty files. JPS seemed way too overkill for that purpose. Also the JPS support outside IDEA basically seemed to be nonexistent at the date of my first post, am I right with this?

0

请先登录再写评论。