Switch to Gradle. Demos as separate subproject.
Use InhiBeans to ensure consistency of text and length properties of StyledTextDocument.