From 553eae98a7716adea8f76558b940c73af7ef8e7f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 24 Jun 2016 15:04:13 +0200 Subject: [PATCH] Remove deprecated methods --- build/monaco/CHANGELOG.md | 1 + gulpfile.js | 8 +-- src/vs/editor/common/editorCommon.ts | 7 +++ src/vs/monaco.d.ts | 92 ---------------------------- 4 files changed, 12 insertions(+), 96 deletions(-) diff --git a/build/monaco/CHANGELOG.md b/build/monaco/CHANGELOG.md index 0fa3b0c1f64..c1f1294228b 100644 --- a/build/monaco/CHANGELOG.md +++ b/build/monaco/CHANGELOG.md @@ -7,6 +7,7 @@ - the `CodeActionProvider.provideCodeActions` now gets passed in a `CodeActionContext` that contains the markers at the relevant range. - the `hoverMessage` of a decoration is now a `MarkedString | MarkedString[]` - the `contents` of a `Hover` returned by a `HoverProvider` is now a `MarkedString | MarkedString[]` +- removed deprecated `IEditor.onDidChangeModelRawContent`, `IModel.onDidChangeRawContent` ### Notable fixes - Broken configurations (loading from `file://` or misconfigured cross-domain loading) now load the web worker code in the UI thread. This caused a breaking change in the behaviour of `monaco.editor.createWebWorker` diff --git a/gulpfile.js b/gulpfile.js index cbee057d47b..2c1cfd596f7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -129,10 +129,10 @@ function monacodtsTask(out, isWatch) { clearTimeout(timer); timer = -1; } - if (reporter.hasErrors()) { - monacodts.complainErrors(); - return; - } + // if (reporter.hasErrors()) { + // monacodts.complainErrors(); + // return; + // } var result = monacodts.run(out); if (!result.isTheSame) { if (isWatch) { diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 51b19f6a11c..4d9115688d6 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -2085,6 +2085,7 @@ export interface IModel extends IReadOnlyModel, IEditableTextModel, ITextModelWi /** * @deprecated Please use `onDidChangeContent` instead. * An event emitted when the contents of the model have changed. + * @internal */ onDidChangeRawContent(listener: (e:IModelContentChangedEvent)=>void): IDisposable; /** @@ -2273,6 +2274,7 @@ export interface IModelContentChangedEvent2 { } /** * An event describing a change in the text of a model. + * @internal */ export interface IModelContentChangedEvent { /** @@ -2325,6 +2327,7 @@ export interface IRawText { /** * An event describing that a model has been reset to a new value. + * @internal */ export interface IModelContentChangedFlushEvent extends IModelContentChangedEvent { /** @@ -2334,6 +2337,7 @@ export interface IModelContentChangedFlushEvent extends IModelContentChangedEven } /** * An event describing that a line has changed in a model. + * @internal */ export interface IModelContentChangedLineChangedEvent extends IModelContentChangedEvent { /** @@ -2347,6 +2351,7 @@ export interface IModelContentChangedLineChangedEvent extends IModelContentChang } /** * An event describing that line(s) have been deleted in a model. + * @internal */ export interface IModelContentChangedLinesDeletedEvent extends IModelContentChangedEvent { /** @@ -2360,6 +2365,7 @@ export interface IModelContentChangedLinesDeletedEvent extends IModelContentChan } /** * An event describing that line(s) have been inserted in a model. + * @internal */ export interface IModelContentChangedLinesInsertedEvent extends IModelContentChangedEvent { /** @@ -3396,6 +3402,7 @@ export interface IEditor { /** * @deprecated. Please use `onDidChangeModelContent` instead. * An event emitted when the content of the current model has changed. + * @internal */ onDidChangeModelRawContent(listener: (e:IModelContentChangedEvent)=>void): IDisposable; /** diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 023b6896c95..8d530b3d8df 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2098,11 +2098,6 @@ declare module monaco.editor { * A model. */ export interface IModel extends IReadOnlyModel, IEditableTextModel, ITextModelWithMarkers, ITokenizedModel, ITextModelWithTrackedRanges, ITextModelWithDecorations, IEditorModel { - /** - * @deprecated Please use `onDidChangeContent` instead. - * An event emitted when the contents of the model have changed. - */ - onDidChangeRawContent(listener: (e: IModelContentChangedEvent) => void): IDisposable; /** * An event emitted when the contents of the model have changed. */ @@ -2224,32 +2219,6 @@ declare module monaco.editor { isRedoing: boolean; } - /** - * An event describing a change in the text of a model. - */ - export interface IModelContentChangedEvent { - /** - * The event type. It can be used to detect the actual event type: - * EditorCommon.EventType.ModelContentChangedFlush => IModelContentChangedFlushEvent - * EditorCommon.EventType.ModelContentChangedLinesDeleted => IModelContentChangedLineChangedEvent - * EditorCommon.EventType.ModelContentChangedLinesInserted => IModelContentChangedLinesDeletedEvent - * EditorCommon.EventType.ModelContentChangedLineChanged => IModelContentChangedLinesInsertedEvent - */ - changeType: string; - /** - * The new version id the model has transitioned to. - */ - versionId: number; - /** - * Flag that indicates that this event was generated while undoing. - */ - isUndoing: boolean; - /** - * Flag that indicates that this event was generated while redoing. - */ - isRedoing: boolean; - } - /** * The raw text backing a model. */ @@ -2276,62 +2245,6 @@ declare module monaco.editor { options: ITextModelResolvedOptions; } - /** - * An event describing that a model has been reset to a new value. - */ - export interface IModelContentChangedFlushEvent extends IModelContentChangedEvent { - /** - * The new text content of the model. - */ - detail: IRawText; - } - - /** - * An event describing that a line has changed in a model. - */ - export interface IModelContentChangedLineChangedEvent extends IModelContentChangedEvent { - /** - * The line that has changed. - */ - lineNumber: number; - /** - * The new value of the line. - */ - detail: string; - } - - /** - * An event describing that line(s) have been deleted in a model. - */ - export interface IModelContentChangedLinesDeletedEvent extends IModelContentChangedEvent { - /** - * At what line the deletion began (inclusive). - */ - fromLineNumber: number; - /** - * At what line the deletion stopped (inclusive). - */ - toLineNumber: number; - } - - /** - * An event describing that line(s) have been inserted in a model. - */ - export interface IModelContentChangedLinesInsertedEvent extends IModelContentChangedEvent { - /** - * Before what line did the insertion begin - */ - fromLineNumber: number; - /** - * `toLineNumber` - `fromLineNumber` + 1 denotes the number of lines that were inserted - */ - toLineNumber: number; - /** - * The text that was inserted - */ - detail: string; - } - /** * Decoration data associated with a model decorations changed event. */ @@ -2898,11 +2811,6 @@ declare module monaco.editor { * An editor. */ export interface IEditor { - /** - * @deprecated. Please use `onDidChangeModelContent` instead. - * An event emitted when the content of the current model has changed. - */ - onDidChangeModelRawContent(listener: (e: IModelContentChangedEvent) => void): IDisposable; /** * An event emitted when the content of the current model has changed. */