The IntelliJ plugin for StrataCode supports the most important features which make IntelliJ so powerful for Java programmers. These features are supported on all of the major StrataCode language formats: .sc, .scj, .schtml, and sct. IntelliJ plugins are fairly easy to create for Parselets-based languages because features are moved down to the lowest-level possible - i.e. contained in base classes for specific types of nodes which can be shared or customized as needed for each language element.

Installation Instructions

Each directory in the layers directory can contain a layer definition file, or it can be a layer group which is a directory containing other layer groups or layer directories.

Option #1: Installation With StrataCode Source

To build and debug StrataCode itself from source, along with the apps built on it, download the 'sc' source distribution. Inside of it there are three directories - coreRuntime, fullRuntime, and system, each organized in separate IntelliJ modules.

Import three IntelliJ modules into your project: coreRuntime/coreRuntime.iml, fullRuntime/fullRuntime.iml, and system/sc.iml intelliJ modules from the sc source distribution. This will let you debug into the StrataCode source and change StrataCode itself seamlessly when debugging your application code.

In your project, select a Java SDK with version 1.6.

After importing all three modules, click "Ok" on the Project Structure dialog to save those modules before you try to create an SC module. Otherwise, it won't find the 'sc' module and create the dependency on that.

Make the project to compile the StrataCode source (so the StrataCode plugin can find the classes for StrataCode itself).

Now you can create StrataCode module.

One final step - for StrataCode itself, edit the file layers/.stratacode/scSourcePath to point to the 'sc' directory you checked out from git (the one that contains coreRuntime, fullRuntime, and system).

Option #2: Installation Without StrataCode Source

The sc4idea plugin also will usually be bundled with the sc.jar file so you do not need the StrataCode source to use the IDE.

Just create your StrataCode module in the EmptyProject or create a StrataCode project in one step.

In this case, StrataCode will find the sc.jar in the plugin, it will create a library for this jar in the configuration and add a dependency on that library to each StrataCode module.

Manually Adding StrataCode Source Dependency

If you create a module without the StrataCode source and later change your mind, edit the module's dependencies and remove the SCLib library. Create three module's from existing sources - the coreRuntime, fullRuntime and system(sc) modules. Then add a dependency on the sc module in your project.

NOTE: it's important that fullRuntime be ahead of coreRuntime in the dependency list for IntelliJ.

Also add a dependency on the JLine library. If necessary, add the Jline library (version 2.x) from Maven or from the jar file included in the SC distribution.

Creating a StrataCode Module

Checkout the 'layers' git repository and place that directory inside of your module directory. Accept the defaults - including the source path of 'layers'. That name should match the name of the 'layers' directory you put in your module's directory.

Instructions for Debugging the sc4idea plugin:

To deploy the plugin:

NOTE: * If you build from source, note that IntelliJ SDK or someone copies the class files from the intelliJ build directory into some sandbox directory in your home directory (on mac it is:


            cp $BUILDDIR/sc/type/PTypeUtil*.class $PLUGINDIR/sc/type/
            cp $BUILDDIR/sc/type/Type*.class $PLUGINDIR/sc/type/
* There are cases where you need to clean out this directory, like if you rename the module - the one for the old module might still get loaded into the classpath and precede the one you are building. ## Additional settings * In preferences, add "*.dbgidx;*.rdps;*.dep" to the Ignore files and folders in the Editor group's File Types dialog box. * Under Editor, General, Smart Keys, disable "Reformat block on typing '}'"