EclipseWriter: pass an EclipseState to it and use it where possible