The EK9 IDE

The EK9 IDE is a desktop editor for EK9 with the compiler built in. You start it with ek9 -ide.

ek9 -ide

The EK9 IDE with helloworld.ek9 open: two hovers on the right describe stdout and println, and the run dialog shows Success with the output Hello, World!

What you need

ek9 -ide starts the IDE. Like the rest of EK9, it needs Java 25 or later.

A first program

Your first project makes a new project and runs a program in it, step by step, with a picture of each step. To open a directory of .ek9 files you already have, use File > Open Project…, open a source file, and run its program with Run > Run Program…. Here is the program from the introduction:

#!ek9
defines module site.introduction.hello
  defines program

    HelloWorld()
      stdout <- Stdout()
      stdout.println("Hello, World")

The editor indents with two spaces: Tab inserts two spaces and Shift+Tab outdents.

The lessons

The IDE teaches itself in lessons: each one shows you an action step by step, then watches while you do it. Each lesson has a page of its own here, with every step and a picture of the IDE once it is done. To play one in the IDE, choose Help > Lessons and its group, or run ek9 -ide -lesson <name>.

Getting started

Your first project, and finding your way round the IDE.

Finding

Search and replace, in Text or Symbols mode, across one file, a module or the whole project - and the two other ways of finding your way, Find Construct and Find References.

Writing code

New constructs - classes, functions, records - and the fields, methods and operators they hold; the examples of Getting Started with EK9.

Refactoring

Rename, extract, inline, change a signature, move: each previewed before it is applied.

Debugging and the Journal

Breakpoints and stepping, and the Journal: a run recorded and read backwards to its cause.

Understanding a codebase

The Analyse views: what calls what, what depends on what.

Security, packages and Git

Sanitised input, packages and their versions, and Git.

Fixing errors

Every error EK9 reports is explained - in the Help tab, or by ek9 -h and its code - and the explanation ends with "Show me how to fix it": a lesson that opens the error's example and fixes it, step by step. They are listed in the error index.

The menus

Each menu holds one kind of action. Right-click in the editor for everything that applies where the caret is, or use Refactor > Refactor This… (Ctrl+T) for the same menu from the keyboard.

Menu What it holds
File New Project…, Open Project…, Recent Projects, Save, Save All, Settings…
Edit Undo, Redo
Code Code you write or have written for you: New Construct, New Package…, dynamic functions and classes, Localisation, Generate (Implement Methods…, Delegation…, Dispatcher…, Edge-Case Tests), Reformat, Toggle Comment, Organize References
Refactor Code reshaped without changing what it does: Refactor This…, Rename Symbol…, Change Signature…, Safe Delete…, Extract Method…, Extract Variable…, Introduce Parameter…, Inline Variable, Inline Function…, Move Construct…, Organize Constants…
Build Compile Project, dependencies, packaging, signing keys, Versioning
Run What runs: Run Tests, Quality Report, Journal Report, New Journal Investigation…, Run Program…, Configurations…
Analyse Views that explain the code: one construct (Construct, Scope, Effective API, Flow Analysis, Pipeline), how constructs and modules relate (Module Landscape, Dependencies, Service Routes, DI Wiring, Neighbourhood, Type Hierarchy, Call Graph, Dispatcher, Blast Radius) and locks (Lock Catalogue, Deadlocks, Lock Fingerprint)
View The IDE's layout: the AI Control Centre, Bottom Panes, Tool Windows, Toggles
Navigate Go to Definition, Find Construct…, Go to Line…, Find References, Next Error, Previous Error
Git, Window, Help Version control; detached windows; Getting Started, the paradigm, Documentation, Licences

Using VS Code or IntelliJ instead

The EK9 extension for VS Code (vscode-ek9-ls) starts the EK9 language server, ek9 -ls. The server reports the compiler's errors as you type, and answers hover, completion, go to definition and find references.

The EK9 plugin for IntelliJ (intellij-ek9-ls) uses the same language server, and the EK9 debug adapter, ek9 -dap, for breakpoints. It needs the LSP4IJ plugin installed first.

The language

This section covers the IDE. The language itself is in the EK9 language reference, starting with Structure.