提交 37be9a63 编写于 作者: J Johannes Rieken

debt - move rename registry to modes

上级 39038672
......@@ -761,3 +761,5 @@ export interface IRichEditSupport {
// --- feature registries ------
export const ReferenceSearchRegistry = new LanguageFeatureRegistry<IReferenceSupport>('referenceSupport');
export const RenameRegistry = new LanguageFeatureRegistry<IRenameSupport>('renameSupport');
......@@ -20,9 +20,10 @@ import {Behaviour} from 'vs/editor/common/editorActionEnablement';
import {IEditorActionDescriptorData, IRange} from 'vs/editor/common/editorCommon';
import {CommonEditorRegistry, ContextKey, EditorActionDescriptor} from 'vs/editor/common/editorCommonExtensions';
import {isLineToken} from 'vs/editor/common/modes/supports';
import {RenameRegistry} from 'vs/editor/common/modes';
import {BulkEdit, createBulkEdit} from 'vs/editor/common/services/bulkEdit';
import {ICodeEditor} from 'vs/editor/browser/editorBrowser';
import {RenameRegistry, rename} from '../common/rename';
import {rename} from '../common/rename';
import RenameInputField from './renameInputField';
// --- register actions and commands
......
......@@ -11,10 +11,7 @@ import {illegalArgument} from 'vs/base/common/errors';
import {TPromise} from 'vs/base/common/winjs.base';
import {IModel, IPosition} from 'vs/editor/common/editorCommon';
import {CommonEditorRegistry} from 'vs/editor/common/editorCommonExtensions';
import {IRenameResult, IRenameSupport} from 'vs/editor/common/modes';
import LanguageFeatureRegistry from 'vs/editor/common/modes/languageFeatureRegistry';
export const RenameRegistry = new LanguageFeatureRegistry<IRenameSupport>('renameSupport');
import {IRenameResult, RenameRegistry} from 'vs/editor/common/modes';
export function rename(model: IModel, position: IPosition, newName: string): TPromise<IRenameResult> {
......
......@@ -22,7 +22,6 @@ import {OccurrencesRegistry} from 'vs/editor/contrib/wordHighlighter/common/word
import {QuickFixRegistry} from 'vs/editor/contrib/quickFix/common/quickFix';
import {OutlineRegistry, IOutlineEntry, IOutlineSupport} from 'vs/editor/contrib/quickOpen/common/quickOpen';
import {NavigateTypesSupportRegistry, INavigateTypesSupport, ITypeBearing} from 'vs/workbench/parts/search/common/search';
import {RenameRegistry} from 'vs/editor/contrib/rename/common/rename';
import {FormatRegistry, FormatOnTypeRegistry} from 'vs/editor/contrib/format/common/format';
import {CodeLensRegistry} from 'vs/editor/contrib/codelens/common/codelens';
import {ParameterHintsRegistry} from 'vs/editor/contrib/parameterHints/common/parameterHints';
......@@ -1012,7 +1011,7 @@ export class MainThreadLanguageFeatures {
// --- rename
$registerRenameSupport(handle: number, selector: vscode.DocumentSelector): TPromise<any> {
this._registrations[handle] = RenameRegistry.register(selector, <modes.IRenameSupport>{
this._registrations[handle] = modes.RenameRegistry.register(selector, <modes.IRenameSupport>{
rename: (resource: URI, position: IPosition, newName: string): TPromise<modes.IRenameResult> => {
return this._proxy.$rename(handle, resource, position, newName);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册