Wordy

IntelliJ setup

  • IntelliJ Community Edition will work just fine for this assignment; you do not need the Ultimate Edition.
  • Open the wordy project folder you just cloned in IntelliJ. There are two ways to do this:
    • Option 1: Drag the repository folder onto the IntelliJ app icon.
    • Option 2: Click the “Open” button on IntelliJ’s launch screen.
    • ⚠️ Do not use the “Get from VCS” button in IntelliJ, or you will end up with a second separate clone of the homework running around on your computer, causing yourself much confusion and grief.
  • If you get a prompt about trusting the project, choose Trust project.

At this point, IntelliJ will probably open the project without any trouble. If, however, you get puzzling errors about the Java version or the Java SDK, try the following:

Set the project JDK version in IntelliJ

  • Go to File → Project structure….
  • Choose SDKs from the column on the left.
  • In the second column from the left, look for a Java SDK with version number 17 or newer. (It might just be called “17,” or it might have a name like “openjdk-17” or “temurin-17”.)
  • If you do not see version 17 or newer in the list, then:
    • Press the little + button at the top of the SDK list.
    • Choose Download JDK.
    • Make sure Version says 17 or newer.
    • Choose Eclipse Temurin as the Vendor.
    • Click Download.
    • The new version should now show up in the list.
  • Still in the Project Structure dialog, in the far left column, choose Project (in the “Project Settings” group).
  • Look for the Project SDK setting.
  • In the drop-down menu for that setting, choose that Java SDK with version 17 or newer.
  • Make sure the Java language level is set to 17.
  • Click OK. The project should now be ready to go.

If IntelliJ still won’t open the project after you try that, please post a concise description of the error you are getting in the class Slack channel.

  • To run the Wordy Playground:
    • Inside your project, find src → wordy → demo → Playground.
    • Right-click on the Playground file / class, and choose “Run Playground.main().”
    • You should get a window titled “Wordy IDE.”
      • If you get an “invalid source release” error, you may need to do the steps above about setting the project’s JDK version.
  • To run the tests:
    • In IntelliJ, right click the test folder in your project.
    • Choose Run ‘Tests in wordy.test…’.
    • A test results panel should pop up, showing that WordyParserTest’s tests all passed (green ✔️), and CompilerTest and InterpretedTest are both ignored (grey ⦸).
      • If you do not see all the tests, make sure both the ✔️ and ⦸ icons above the Test Results are selected.
  • Note that there is also a main method you can run in ShaderUI, but it won’t work at all until you have implemented the Wordy interpreter later in this assignment.

If all this worked, you’re ready to go! Proceed to Part 0.

If anything seems broken, or if you found any mistakes in these instructions, please post about it in the class Slack channel. If there’s trouble, it’s probably not just you.