Port CMake code from new plugin
Port KTE::Document::{endEditing -> finishEditing}