-
Notifications
You must be signed in to change notification settings - Fork 56
IntelliJ Join Us!
As you can understand most of us do not join/leave the project on a daily basis. This means that this page is doomed to be obsolete. It is always the responsibility of a new joiner to follow the instructions in this page, and if they fail, fix them.
In fact, if you used the page, you should almost always update it.
To join the project, you should first of all clone the project:
git clone https://github.com/SpartanRefactoring/Main.git
Now you should follow the steps described below.
-
Download IntellliJ community edition 2017.1
-
Download and install the latest JDK (1.8.X) fit for your system from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
-
After cloning the project, launch intellij and open the project by clicking import project and choosing the project folder.
-
Choose Import project from external model and mark Gradle:
-
In the next window make sure to mark Use gradle wrapper task configuration:
-
Go on and press finish (no need to change other settings).
Now Gradle will start importing jars needed for the project, it might take a while so don't be alarmed if it's not ready right away.
-
if the next window appears, just press OK:
-
Go to file-> project structure, and under Project SDK hit new->intellij platform plugin SDK:
-
In the opened window select the installation folder of your intelliJ, hit ok:
-
when prompted to choose a JDK, choose the one you have just installed :
-
set your project’s SDK as the newly created sdk:
-
also make sure your project language level is 8 (in the same window).
-
clone the source code of intelliJ community edition to your machine, using the following git command:
git clone --depth 1 https://github.com/JetBrains/intellij-community.git
--depth 1 is super important! You don’t want to be spending two days cloning!
Cloning the source code is needed in order to use the IntelliJ libraries such as PSI.
-
still under the project structure window, choose SDKs, select the newly created SDK, hit the sourcepath tab, and click the + to add sources to the project:
-
Select the folder where you cloned the intelliJ community source code, and in the next window choose all the files:
-
Hit apply and OK.
-
Again, in the project structure window, choose modules, for all the modules under
il.org.spartan.intellij-spartanizer
do the next steps: choose the module, go to the dependencies tab, and make sure the default module sdk is the one we have just created:
All done! You should be able to run the project! When running an intellij plugin project, the result is the spawning of another intellij, containing the plugin!
-
In the view menu press View | Tool Windows | Gradle :
-
Now you will see the Gradle projects menu, to compile the plugin find il.org.spartan.intellij-spartanizer | Tasks | intellij | buildPlugin and double click it:
- When the compilation process is finished double click il.org.spartan.intellij-spartanizer | Tasks | intellij | runIde to run the plugin:
A new instance of intellij will be launched, and this instance will be running the plugin! You will be getting tips while writing your code in this window.