Use Workspace::getActiveTextEditor