Make sure editor is set before trying to get code.