This is an experiment to see how well Frege works for developing IntelliJ plugins. The plan is to develop the plugin in Frege and, once it proves feasible, add the new functionality to HaskForce, allowing HaskForce itself to be written in Frege.
Note that there seems to be an existing Frege plugin in the works. Hopefully, if this experiment proves a success, we can merge the two projects together.
The simplest way to build is to run make
from the command line. The Makefile
is just
a temporary convenience to hold us over until we get something like Gradle configured.
Here's the long way -
- Configure the Project SDK.
- Go to File > Project Structure > Project Settings > Project
- Ensure you have an Intellij IDEA SDK configured for Project SDK. If not, choose New and create an Intellij Platform Plugin SDK with JDK 8. You might need to create a JDK 8 if you haven't already.
-
Generate JFlex lexers by running
tools/jflex/generate-sources
-
Download and copy a Frege jar to the
lib/
directory. -
Generate the Frege parser tokens by running
tools/gen-tokens
-
Highlight the following modules and choose Build > Make Selected Modules
- java-lib
- jps-lib
- jps-plugin
-
Compile Frege sources by running
tools/fregec
with the following environment variables -- FREGE_JAR - (optional) path to Frege jar (defaults to
lib/frege*.jar
) - IDEA_HOME - path to IntelliJ installation (defaults to
~/opt/idea
) - JAVA - path to
java
executable - JAVAC - path to
javac
executable
- FREGE_JAR - (optional) path to Frege jar (defaults to
-
Compile the remaining Java sources using the IDE (Build > Make Project)
Open FregeTestCase.java, right-click on the class name, and choose Run 'FregeTestCase'
You can do the same with any of the other test classes.