Call validateEditorInputState before altering text

Calling this function will notify Eclipse that a change is imminent. If
the file is not writable but its parent directory is, Eclipse will ask
if you want to make it writable. If you choose "No", Eclipse will mark
the editor as non-editable. Similarly, Perforce listens for this
function so that it can automatically check out a read-only file when a
change is imminent.

Fixes #178.