You can install the plugin by downloading the latest zip archive from the releases page and loading it in IntelliJ via Preferences > Plugins > Install plugin from disk. Check out the Quick Start Guide for more info!
-
Clone HaskForce.
-
If you haven't already, download and install IntelliJ IDEA and Java JDK.
-
(Optional) Check out the Community Edition source files.
$ git clone https://github.com/JetBrains/intellij-community.git idea
- Check the version of your IntelliJ installation by going to About IntelliJ IDEA and checking the build number.
- Check out the appropriate tag for your build number. For instance, you have Build #IC-135.909, then do
$ git checkout idea/135.909
- Be sure to
git checkout
the new tag each time you upgrade IntelliJ.
- Install and enable additional plugins.
- JFlex Support
- Plugin DevKit (already installed)
- PsiViewer
- Configure SDK and source files.
- Create a new IntelliJ Platform Plugin project from existing sources (pointed to your cloned HaskForce directory).
- Go to File > Project Structure. Add SDKs for JDK and IDEA Plugins. For the IDEA Plugins, add sources from the cloned idea to the Sourcepath, if applicable.
- Set the project SDK to the IDEA SDK.
- Generate lexers using Build > haskforce > generate.sources. Alternatively, if you have the
ant
command line tool you can runant generate.sources
from the project root. - Choose Build > Make Project. If you want to see that something actually happened, you can open the log with View > Tool Windows > Event Log.
- From the menu go to Run > Edit Configurations
- Click on the
+
sign and choose Plugin, name the configuration something evocative like Haskforce, click OK, then run your new configuration. - Intellij will open a copy of itself, with default settings, and the plugin installed.
To run the tests, you'll need to create a run configuration:
- Go to Run > Edit Configurations
- Click on the
+
sign and choose JUnit - In the Class field enter HaskellTestCase, which should auto-complete for you.
- Click OK and run your new test configuration.
To add more tests:
- Edit Haskell*Test.java files to add more tests of the same kind that already exists.
- Edit HaskellTestCase.java if you need to add tests of a different kind.