THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- If not already installed, install the
Scala
plugin from JetBrains to add SBT and Scala support. - With the Daffodil repository checked out, select
File > New > Project from Existing Sources...
and select the Daffodil repository directory. Note that symlinks seem to cause failures to import, so use a absolute physical path to the daffodil repository directory.
- We want to configure the project to use SBT for configuration and building, so select:
Import project from external model
and selectsbt
. - Set the following settings:
- Download Library sources: Checked
- Download sbt sources: Unchecked
- Use sbt shell for imports: Checked
- Use sbt shell for builds: Checked
- Allow overriding sbt version: Unchecked
- Global sbt settings > Maximum heap size: 6144 MB
- Download Library sources: Checked
- Click Finish.
- Exit IntelliJ and restart it, selecting the Daffodil project.
- An alert will display stating "sbt projects need to be imported". Select
Enable Auto-Import
. - After the sync is complete in the Build tab, ensure that the project builds:
Build > Build Project
- To add a configuration to run all JUnit tests, select:
Run > Edit Configurations > + (plus sign) > JUnit
and apply the following settings:- Name: All Daffodil Tests
- Test Kind: Pattern
- Pattern:
^(?!.*TestCLI.*).*$
- Search for tests: In whole project
- Name: All Daffodil Tests
- Run tests via:
Run > All Daffodil Tests
...
- Go to
File > Settings > Editor > File Types
- In the
Recognized file types
box, scroll down toXML
, select it and under theRegistered patterns
box, click the + sign, and add*.dfdl.xsd
. Repeat for*.tdml
.
To be able to run CLI Tests, you either can try:
- IntelliJ Idea Ultimate ensuring the Working Directory is the project root. You can get a free license
- if you're an apache committer: https://www.jetbrains.com/community/opensource/#partner
- if you're a student/teacher: https://www.jetbrains.com/community/education/#students
- if you're part of an open source project: https://www.jetbrains.com/community/opensource/#support
- IntelliJ Idea Community as described in this comment (works for some, but not all).
The default formatting settings for Scala must be changed to match our code style too. You must explicitly check two options that are disabled by default (File→Settings, Editor Scala, Spaces tab):
- Import braces
- Around '@' in pattern bindings