Want to get started right away? Check out the Quick Start Guide!
Want to contribute code? See the CONTRIBUTING doc for more info.
Follow @HaskForce on Twitter to stay up to date on new releases and work in progress.
Start a discussion on our gitter channel.
Do you IRC? Join #haskforce on freenode!
You will need Scala 2.11.7 on your system. You can use the IvyIDEA plugin to resolve all dependencies, including Scala (see Building with IntelliJ below).
You can configure Scala manually in IntelliJ; however, this is not recommended. Ignoring forewarning, you can download it directly via IntelliJ by going to -
- File > Project Structure > Global Libraries > + > Scala SDK > Download > 2.11.7
Be sure that the SDK is named
scala-sdk-2.11.7
to properly match the module configurations.
Note: We currently target JDK 8 for building the plugin.
- Copy the
build.skeleton.properties
tobuild.properties
and update the paths to the JDK and IntelliJ installation. - Install and enable additional plugins.
- Plugin DevKit
- Scala
- Ant Support
- IvyIDEA (resolve dependencies via Tools > IvyIDEA > Resolve for all modules)
- UI Designer (without this everything compiles but viewing forms throws NPEs, e.g. when creating a new project.)
- PsiViewer 3.28.73 (optional, for viewing parse trees)
- JFlex Support 1.5.1 (optional, for generating lexers)
- Grammar Kit 1.4.1 (optional, for generating parsers)
- Configure SDK and source files.
- Go to File > Project Structure. Add SDKs for JDK and IDEA Plugins.
- For Project SDK choose New > Intellij Platform Plugin SDK.
- Update the Project compiler output, e.g.
path/to/intellij-haskforce/out
- Generate lexers by hovering over the opening the Ant Build tool and choosing generate.sources.
- Alternatively, if you have the
ant
command line tool you can runant generate.sources
from the project root.
- Choose Build > Prepare Plugin Module 'intellij-haskforce' for Deployment.
- Check out the Community Edition source files.
$ git clone https://github.com/JetBrains/intellij-community.git idea
- Check the build version of your IntelliJ installation. There are two ways to do this.
- Look for a
build.txt
file in your IntelliJ installation directory. It's contents should be something likeIU-141.178.9
- Alternatively, you can go to About in the menu and look at the build number. This might not have the minor
number, e.g. instead of
IU-141.178.9
it might just sayIU-141.178
- Look for a
- Check out the appropriate tag for your build number.
$ git fetch --tags && git checkout idea/141.178.9
- Be sure to
git checkout
the new tag each time you upgrade IntelliJ.
- Under File > Project Structure > SDKs find your IntelliJ Platform Plugin SDK.
- Under the Sourcepath tab, add the directory where you cloned the IntelliJ sources.
- 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.
If you simply want to debug the files in src
, running the plugin with Debug is enough. However, to enable breakpoints in jps-shared
or jps-plugin
, follow the instructions from the IntelliJ SDK DevGuide
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.