This is a core only version of https://github.com/eclipse/tm4e I've refactored this to use with my own projects, feel free to follow them.