The editor does not automatically indent when pressing enter. An example of where this is simply implemented is the Python Mode: https://github.com/jdf/processing.py/blob/1932b4ca71f3befd333cc23d3a1c8fe7617014ff/runtime/src/jycessing/mode/PyInputHandler.java#L48-L120