How to build¶
Use gradle¶
$ chmod a+x gradlew
$ ./gradlew buildPlugin
It's not recommended to use gradle because it will include unnecessary dependencies and it's slow.
Use Idea build¶
Prerequirements¶
First install required plugins in your IntelliJ IDEA:
- Grammar-Kit
- UI Designer (built-in, just make sure you've enabled it)
- Plugin DevKit (built-in, just make sure you've enabled it)
- Kotlin
I've compiled a Grammar-Kit which supports completing Java codes in the jflex code fragment which can be found here.
For debugging purpose, it's recommended to install a plugin called PsiViewer .
Build¶
Clone this repo:
$ git clone https://github.com/ice1000/julia-intellij.git
Create a plugin project from your cloned source, and use Grammar-Kit to generate the Parser and Lexer.
Then, click File | Settings | Build, Execution, Deployment | Compiler | Kotlin Compiler
,
make sure "Target Kotlin version" is "1.8".
Then, click Build | Prepare Plugin Module 'julia-intellij' for deployment
, and you'll see a jar
appears at the project root.
For more information, see the official doc.
Contributing guidelines¶
You must¶
- Put all Nls into the resource bundle
- Use as much
@NotNull
and@Nullable
as you can in Java codes except local variables
You must not¶
- Break the code style -- use tab indents with spaces aligns (see .editorconfig)
- Open pull requests just to fix code style, or use some syntax sugar (julia-intellij is not SharpLang!)
- Add any kind of generated file into the git repo (including the parser!)
- Violate the open source license
You should¶
- Use Kotlin except UI, but if you only know Java, never mind, we can help you convert
- Name your files like
julia-xxx.kt
- Put all highly related classes into a single file
- Use English, but we also read Chinese so if you only know Chinese just use it
- Write commit message starts with
[ issue id or refactor type ]
You'd better¶
- Read http://www.jetbrains.org/display/IJOS/IntelliJ+Coding+Guidelines
You don't have to¶
- Write comments, except you're using magics. Tell us if you do
- Write tests, because we'll review your codes carefully