function getCodeOrDiffEditor(editor) {
        if (editor) {
            var control = editor.getControl();
            if (control) {
                if (editorCommon_1.isCommonCodeEditor(control)) {
                    return {
                        codeEditor: control,
                        diffEditor: null
                    };
                }
                if (editorCommon_1.isCommonDiffEditor(control)) {
                    return {
                        codeEditor: null,
                        diffEditor: control
                    };
                }
            }
        }
        return {
            codeEditor: null,
            diffEditor: null
        };
    }
Uses `editor.getControl()` and returns either a `codeEditor` or a `diffEditor` or nothing.