mirror of
https://github.com/Microsoft/vscode
synced 2024-09-20 02:58:15 +00:00
Remove unused code (#38414)
This commit is contained in:
parent
728c95f56c
commit
9f597f9555
|
@ -187,10 +187,6 @@ export abstract class AbstractScrollbar extends Widget {
|
|||
}
|
||||
}
|
||||
|
||||
public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void {
|
||||
this._sliderMouseDown(e, onDragFinished);
|
||||
}
|
||||
|
||||
private _onMouseDown(e: IMouseEvent): void {
|
||||
let offsetX: number;
|
||||
let offsetY: number;
|
||||
|
|
|
@ -17,7 +17,7 @@ import { Scrollable, ScrollEvent, ScrollbarVisibility, INewScrollDimensions, ISc
|
|||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
import { TimeoutTimer } from 'vs/base/common/async';
|
||||
import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode';
|
||||
import { ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar';
|
||||
import { ScrollbarHost } from 'vs/base/browser/ui/scrollbar/abstractScrollbar';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
|
||||
const HIDE_TIMEOUT = 500;
|
||||
|
@ -250,14 +250,6 @@ export abstract class AbstractScrollableElement extends Widget {
|
|||
this._verticalScrollbar.delegateMouseDown(browserEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delegate a mouse down event to the vertical scrollbar (directly to the slider!).
|
||||
* This is to help with clicking somewhere else and having the scrollbar react.
|
||||
*/
|
||||
public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void {
|
||||
this._verticalScrollbar.delegateSliderMouseDown(e, onDragFinished);
|
||||
}
|
||||
|
||||
public getScrollDimensions(): IScrollDimensions {
|
||||
return this._scrollable.getScrollDimensions();
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ export class SimpleWorkerClient<T> extends Disposable {
|
|||
}
|
||||
|
||||
export interface IRequestHandler {
|
||||
_requestHandlerTrait: any;
|
||||
_requestHandlerBrand: any;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,10 +76,6 @@ export abstract class AbstractCodeEditorService implements ICodeEditorService {
|
|||
return this._onDiffEditorRemove.event;
|
||||
}
|
||||
|
||||
getDiffEditor(editorId: string): IDiffEditor {
|
||||
return this._diffEditors[editorId] || null;
|
||||
}
|
||||
|
||||
listDiffEditors(): IDiffEditor[] {
|
||||
return Object.keys(this._diffEditors).map(id => this._diffEditors[id]);
|
||||
}
|
||||
|
|
|
@ -190,7 +190,6 @@ class BulkEditModel implements IDisposable {
|
|||
|
||||
private _textModelResolverService: ITextModelService;
|
||||
private _numberOfResourcesToModify: number = 0;
|
||||
private _numberOfChanges: number = 0;
|
||||
private _edits: IStringDictionary<IResourceEdit[]> = Object.create(null);
|
||||
private _tasks: EditTask[];
|
||||
private _sourceModel: URI;
|
||||
|
@ -208,21 +207,12 @@ class BulkEditModel implements IDisposable {
|
|||
}
|
||||
}
|
||||
|
||||
public resourcesCount(): number {
|
||||
return this._numberOfResourcesToModify;
|
||||
}
|
||||
|
||||
public changeCount(): number {
|
||||
return this._numberOfChanges;
|
||||
}
|
||||
|
||||
private _addEdit(edit: IResourceEdit): void {
|
||||
let array = this._edits[edit.resource.toString()];
|
||||
if (!array) {
|
||||
this._edits[edit.resource.toString()] = array = [];
|
||||
this._numberOfResourcesToModify += 1;
|
||||
}
|
||||
this._numberOfChanges += 1;
|
||||
array.push(edit);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ export interface ICodeEditorService {
|
|||
|
||||
addDiffEditor(editor: IDiffEditor): void;
|
||||
removeDiffEditor(editor: IDiffEditor): void;
|
||||
getDiffEditor(editorId: string): IDiffEditor;
|
||||
listDiffEditors(): IDiffEditor[];
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,6 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v
|
|||
import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode';
|
||||
import { getThemeTypeSelector } from 'vs/platform/theme/common/themeService';
|
||||
import { IMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar';
|
||||
|
||||
export class EditorScrollbar extends ViewPart {
|
||||
|
||||
|
@ -115,10 +114,6 @@ export class EditorScrollbar extends ViewPart {
|
|||
this.scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);
|
||||
}
|
||||
|
||||
public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void {
|
||||
this.scrollbar.delegateSliderMouseDown(e, onDragFinished);
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
|
|
|
@ -192,10 +192,6 @@ export class ViewCursors extends ViewPart {
|
|||
|
||||
// --- end event handlers
|
||||
|
||||
public getPosition(): Position {
|
||||
return this._primaryCursor.getPosition();
|
||||
}
|
||||
|
||||
// ---- blinking logic
|
||||
|
||||
private _getCursorBlinking(): TextEditorCursorBlinkingStyle {
|
||||
|
@ -365,4 +361,4 @@ registerThemingParticipant((theme, collector) => {
|
|||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -22,10 +22,6 @@ export interface IMyViewZone {
|
|||
marginDomNode: FastDomNode<HTMLElement>;
|
||||
}
|
||||
|
||||
export interface IMyRenderData {
|
||||
data: IViewWhitespaceViewportData[];
|
||||
}
|
||||
|
||||
interface IComputedViewZoneProps {
|
||||
afterViewLineNumber: number;
|
||||
heightInPx: number;
|
||||
|
|
|
@ -31,7 +31,7 @@ export interface ITabFocus {
|
|||
setTabFocusMode(tabFocusMode: boolean): void;
|
||||
}
|
||||
|
||||
export const TabFocus: ITabFocus = new class {
|
||||
export const TabFocus: ITabFocus = new class implements ITabFocus {
|
||||
private _tabFocus: boolean = false;
|
||||
|
||||
private _onDidChangeTabFocus: Emitter<boolean> = new Emitter<boolean>();
|
||||
|
|
|
@ -12,7 +12,7 @@ export interface IEditorZoom {
|
|||
setZoomLevel(zoomLevel: number): void;
|
||||
}
|
||||
|
||||
export const EditorZoom: IEditorZoom = new class {
|
||||
export const EditorZoom: IEditorZoom = new class implements IEditorZoom {
|
||||
|
||||
private _zoomLevel: number = 0;
|
||||
|
||||
|
|
|
@ -335,11 +335,6 @@ export class CursorContext {
|
|||
return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop);
|
||||
}
|
||||
|
||||
public getCompletelyVisibleModelRangeAtScrollTop(scrollTop: number): Range {
|
||||
const viewRange = this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop);
|
||||
return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange);
|
||||
}
|
||||
|
||||
public getVerticalOffsetForViewLine(viewLineNumber: number): number {
|
||||
return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber);
|
||||
}
|
||||
|
|
|
@ -246,13 +246,6 @@ export class Range {
|
|||
return new Position(this.startLineNumber, this.startColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone this range.
|
||||
*/
|
||||
public cloneRange(): Range {
|
||||
return new Range(this.startLineNumber, this.startColumn, this.endLineNumber, this.endColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform to a user presentable string representation.
|
||||
*/
|
||||
|
@ -387,4 +380,3 @@ export class Range {
|
|||
return range.endLineNumber > range.startLineNumber;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,22 +30,13 @@ export class RGBA8 {
|
|||
public readonly a: number;
|
||||
|
||||
constructor(r: number, g: number, b: number, a: number) {
|
||||
this.r = RGBA8._clampInt_0_255(r);
|
||||
this.g = RGBA8._clampInt_0_255(g);
|
||||
this.b = RGBA8._clampInt_0_255(b);
|
||||
this.a = RGBA8._clampInt_0_255(a);
|
||||
this.r = RGBA8._clamp(r);
|
||||
this.g = RGBA8._clamp(g);
|
||||
this.b = RGBA8._clamp(b);
|
||||
this.a = RGBA8._clamp(a);
|
||||
}
|
||||
|
||||
public static equals(a: RGBA8, b: RGBA8): boolean {
|
||||
return (
|
||||
a.r === b.r
|
||||
&& a.g === b.g
|
||||
&& a.b === b.b
|
||||
&& a.a === b.a
|
||||
);
|
||||
}
|
||||
|
||||
private static _clampInt_0_255(c: number): number {
|
||||
private static _clamp(c: number): number {
|
||||
if (c < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { ILineChange } from 'vs/editor/common/editorCommon';
|
||||
|
||||
export class DiffComputer {
|
||||
|
||||
constructor(originalLines: string[], modifiedLines: string[], shouldPostProcessCharChanges: boolean, shouldIgnoreTrimWhitespace: boolean) {
|
||||
}
|
||||
|
||||
public computeDiff(): ILineChange[] {
|
||||
return [];
|
||||
}
|
||||
}
|
|
@ -573,17 +573,6 @@ export class TextModel implements editorCommon.ITextModel {
|
|||
return result + 2;
|
||||
}
|
||||
|
||||
public validateLineNumber(lineNumber: number): number {
|
||||
this._assertNotDisposed();
|
||||
if (lineNumber < 1) {
|
||||
lineNumber = 1;
|
||||
}
|
||||
if (lineNumber > this._lines.length) {
|
||||
lineNumber = this._lines.length;
|
||||
}
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates `range` is within buffer bounds, but allows it to sit in between surrogate pairs, etc.
|
||||
* Will try to not allocate if possible.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
'use strict';
|
||||
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { IMarkdownString, markedStringsEquals } from 'vs/base/common/htmlContent';
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { Range, IRange } from 'vs/editor/common/core/range';
|
||||
|
@ -559,15 +559,6 @@ export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelD
|
|||
this.position = options.position;
|
||||
}
|
||||
}
|
||||
|
||||
public equals(other: ModelDecorationOverviewRulerOptions): boolean {
|
||||
return (
|
||||
this.color === other.color
|
||||
&& this.darkColor === other.darkColor
|
||||
&& this.hcColor === other.hcColor
|
||||
&& this.position === other.position
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let lastStaticId = 0;
|
||||
|
@ -615,28 +606,6 @@ export class ModelDecorationOptions implements editorCommon.IModelDecorationOpti
|
|||
this.beforeContentClassName = options.beforeContentClassName ? cleanClassName(options.beforeContentClassName) : strings.empty;
|
||||
this.afterContentClassName = options.afterContentClassName ? cleanClassName(options.afterContentClassName) : strings.empty;
|
||||
}
|
||||
|
||||
public equals(other: ModelDecorationOptions): boolean {
|
||||
if (this.staticId > 0 || other.staticId > 0) {
|
||||
return this.staticId === other.staticId;
|
||||
}
|
||||
|
||||
return (
|
||||
this.stickiness === other.stickiness
|
||||
&& this.className === other.className
|
||||
&& this.isWholeLine === other.isWholeLine
|
||||
&& this.showIfCollapsed === other.showIfCollapsed
|
||||
&& this.glyphMarginClassName === other.glyphMarginClassName
|
||||
&& this.linesDecorationsClassName === other.linesDecorationsClassName
|
||||
&& this.marginClassName === other.marginClassName
|
||||
&& this.inlineClassName === other.inlineClassName
|
||||
&& this.beforeContentClassName === other.beforeContentClassName
|
||||
&& this.afterContentClassName === other.afterContentClassName
|
||||
&& markedStringsEquals(this.hoverMessage, other.hoverMessage)
|
||||
&& markedStringsEquals(this.glyphMarginHoverMessage, other.glyphMarginHoverMessage)
|
||||
&& this.overviewRuler.equals(other.overviewRuler)
|
||||
);
|
||||
}
|
||||
}
|
||||
ModelDecorationOptions.EMPTY = ModelDecorationOptions.register({});
|
||||
|
||||
|
|
|
@ -916,7 +916,7 @@ export interface ITokenizationRegistry {
|
|||
setColorMap(colorMap: Color[]): void;
|
||||
|
||||
getColorMap(): Color[];
|
||||
getDefaultForeground(): Color;
|
||||
|
||||
getDefaultBackground(): Color;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,10 +71,6 @@ export class ScopedLineTokens {
|
|||
return this._actual.findTokenIndexAtOffset(offset + this.firstCharOffset) - this._firstTokenIndex;
|
||||
}
|
||||
|
||||
public getTokenStartOffset(tokenIndex: number): number {
|
||||
return this._actual.getTokenStartOffset(tokenIndex + this._firstTokenIndex) - this.firstCharOffset;
|
||||
}
|
||||
|
||||
public getStandardTokenType(tokenIndex: number): modes.StandardTokenType {
|
||||
return this._actual.getStandardTokenType(tokenIndex + this._firstTokenIndex);
|
||||
}
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { IndentationRule, IndentAction } from 'vs/editor/common/modes/languageConfiguration';
|
||||
import { IndentationRule } from 'vs/editor/common/modes/languageConfiguration';
|
||||
|
||||
export const enum IndentConsts {
|
||||
INCREASE_MASK = 0b00000001,
|
||||
|
@ -22,30 +21,6 @@ export class IndentRulesSupport {
|
|||
this._indentationRules = indentationRules;
|
||||
}
|
||||
|
||||
public onType(text: string): IndentAction {
|
||||
if (this._indentationRules) {
|
||||
if (this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) {
|
||||
return IndentAction.Outdent;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public containNonWhitespace(text: string): boolean {
|
||||
// the text doesn't contain any non-whitespace character.
|
||||
let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(text);
|
||||
|
||||
if (nonWhitespaceIdx >= 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public shouldIncrease(text: string): boolean {
|
||||
if (this._indentationRules) {
|
||||
if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(text)) {
|
||||
|
@ -99,4 +74,3 @@ export class IndentRulesSupport {
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -280,14 +280,6 @@ export class ThemeTrieElementRule {
|
|||
return new ThemeTrieElementRule(this._fontStyle, this._foreground, this._background);
|
||||
}
|
||||
|
||||
public static cloneArr(arr: ThemeTrieElementRule[]): ThemeTrieElementRule[] {
|
||||
let r: ThemeTrieElementRule[] = [];
|
||||
for (let i = 0, len = arr.length; i < len; i++) {
|
||||
r[i] = arr[i].clone();
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
public acceptOverwrite(fontStyle: FontStyle, foreground: ColorId, background: ColorId): void {
|
||||
if (fontStyle !== FontStyle.NotSet) {
|
||||
this._fontStyle = fontStyle;
|
||||
|
|
|
@ -60,10 +60,6 @@ export class TokenizationRegistryImpl implements ITokenizationRegistry {
|
|||
return this._colorMap;
|
||||
}
|
||||
|
||||
public getDefaultForeground(): Color {
|
||||
return this._colorMap[ColorId.DefaultForeground];
|
||||
}
|
||||
|
||||
public getDefaultBackground(): Color {
|
||||
return this._colorMap[ColorId.DefaultBackground];
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ export abstract class BaseEditorSimpleWorker {
|
|||
* @internal
|
||||
*/
|
||||
export class EditorSimpleWorkerImpl extends BaseEditorSimpleWorker implements IRequestHandler, IDisposable {
|
||||
_requestHandlerTrait: any;
|
||||
_requestHandlerBrand: any;
|
||||
|
||||
private _models: { [uri: string]: MirrorModel; };
|
||||
|
||||
|
|
|
@ -11,11 +11,6 @@ import { IMode, LanguageId, LanguageIdentifier } from 'vs/editor/common/modes';
|
|||
|
||||
export var IModeService = createDecorator<IModeService>('modeService');
|
||||
|
||||
export interface IModeLookupResult {
|
||||
modeId: string;
|
||||
isInstantiated: boolean;
|
||||
}
|
||||
|
||||
export interface ILanguageExtensionPoint {
|
||||
id: string;
|
||||
extensions?: string[];
|
||||
|
@ -58,7 +53,6 @@ export interface IModeService {
|
|||
getConfigurationFiles(modeId: string): string[];
|
||||
|
||||
// --- instantiation
|
||||
lookup(commaSeparatedMimetypesOrCommaSeparatedIds: string): IModeLookupResult[];
|
||||
getMode(commaSeparatedMimetypesOrCommaSeparatedIds: string): IMode;
|
||||
getOrCreateMode(commaSeparatedMimetypesOrCommaSeparatedIds: string): TPromise<IMode>;
|
||||
getOrCreateModeByLanguageName(languageName: string): TPromise<IMode>;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
|||
import { IMode, LanguageId, LanguageIdentifier } from 'vs/editor/common/modes';
|
||||
import { FrankensteinMode } from 'vs/editor/common/modes/abstractMode';
|
||||
import { LanguagesRegistry } from 'vs/editor/common/services/languagesRegistry';
|
||||
import { IModeLookupResult, IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
|
||||
export class ModeServiceImpl implements IModeService {
|
||||
public _serviceBrand: any;
|
||||
|
@ -93,22 +93,6 @@ export class ModeServiceImpl implements IModeService {
|
|||
|
||||
// --- instantiation
|
||||
|
||||
public lookup(commaSeparatedMimetypesOrCommaSeparatedIds: string): IModeLookupResult[] {
|
||||
var r: IModeLookupResult[] = [];
|
||||
var modeIds = this._registry.extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds);
|
||||
|
||||
for (var i = 0; i < modeIds.length; i++) {
|
||||
var modeId = modeIds[i];
|
||||
|
||||
r.push({
|
||||
modeId: modeId,
|
||||
isInstantiated: this._instantiatedModes.hasOwnProperty(modeId)
|
||||
});
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public getMode(commaSeparatedMimetypesOrCommaSeparatedIds: string): IMode {
|
||||
var modeIds = this._registry.extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds);
|
||||
|
||||
|
|
|
@ -56,10 +56,6 @@ class ModelData implements IDisposable {
|
|||
this.model = null;
|
||||
}
|
||||
|
||||
public getModelId(): string {
|
||||
return MODEL_ID(this.model.uri);
|
||||
}
|
||||
|
||||
public acceptMarkerDecorations(newDecorations: editorCommon.IModelDeltaDecoration[]): void {
|
||||
this._markerDecorations = this.model.deltaDecorations(this._markerDecorations, newDecorations);
|
||||
}
|
||||
|
|
|
@ -66,18 +66,6 @@ export class OverviewRulerZone {
|
|||
return this._color;
|
||||
}
|
||||
|
||||
public equals(other: OverviewRulerZone): boolean {
|
||||
return (
|
||||
this.startLineNumber === other.startLineNumber
|
||||
&& this.endLineNumber === other.endLineNumber
|
||||
&& this.position === other.position
|
||||
&& this.forceHeight === other.forceHeight
|
||||
&& this._color === other._color
|
||||
&& this._darkColor === other._darkColor
|
||||
&& this._hcColor === other._hcColor
|
||||
);
|
||||
}
|
||||
|
||||
public compareTo(other: OverviewRulerZone): number {
|
||||
if (this.startLineNumber === other.startLineNumber) {
|
||||
if (this.endLineNumber === other.endLineNumber) {
|
||||
|
|
|
@ -58,13 +58,6 @@ export abstract class RestrictedRenderingContext {
|
|||
return this._viewLayout.getVerticalOffsetForLineNumber(lineNumber);
|
||||
}
|
||||
|
||||
public lineIsVisible(lineNumber: number): boolean {
|
||||
return (
|
||||
this.visibleRange.startLineNumber <= lineNumber
|
||||
&& lineNumber <= this.visibleRange.endLineNumber
|
||||
);
|
||||
}
|
||||
|
||||
public getDecorationsInViewport(): ViewModelDecoration[] {
|
||||
return this.viewportData.getDecorationsInViewport();
|
||||
}
|
||||
|
|
|
@ -48,10 +48,6 @@ export class ViewLayout extends Disposable implements IViewLayout {
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
public getScrollable(): Scrollable {
|
||||
return this.scrollable;
|
||||
}
|
||||
|
||||
public onHeightMaybeChanged(): void {
|
||||
this._updateHeight();
|
||||
}
|
||||
|
|
|
@ -205,10 +205,6 @@ export class PrefixSumComputerWithCache {
|
|||
this._cache = null;
|
||||
}
|
||||
|
||||
public getCount(): number {
|
||||
return this._actual.getCount();
|
||||
}
|
||||
|
||||
public insertValues(insertIndex: number, insertValues: Uint32Array): void {
|
||||
if (this._actual.insertValues(insertIndex, insertValues)) {
|
||||
this._bustCache();
|
||||
|
|
|
@ -12,7 +12,7 @@ import { RunOnceScheduler, Delayer } from 'vs/base/common/async';
|
|||
import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { ScrollType, IModel } from 'vs/editor/common/editorCommon';
|
||||
import { ScrollType, IModel, IEditorContribution } from 'vs/editor/common/editorCommon';
|
||||
import { registerEditorAction, registerEditorContribution, ServicesAccessor, EditorAction, registerInstantiatedEditorAction } from 'vs/editor/browser/editorExtensions';
|
||||
import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser';
|
||||
import { FoldingModel, setCollapseStateAtLevel, CollapseMemento, setCollapseStateLevelsDown, setCollapseStateLevelsUp } from 'vs/editor/contrib/folding/foldingModel';
|
||||
|
@ -27,7 +27,7 @@ import { computeRanges as computeIndentRanges } from 'vs/editor/contrib/folding/
|
|||
|
||||
export const ID = 'editor.contrib.folding';
|
||||
|
||||
export class FoldingController {
|
||||
export class FoldingController implements IEditorContribution {
|
||||
|
||||
static MAX_FOLDING_REGIONS = 5000;
|
||||
|
||||
|
|
|
@ -79,10 +79,6 @@ export class HoverOperation<Result> {
|
|||
this._progressCallback = progress;
|
||||
}
|
||||
|
||||
public getComputer(): IHoverComputer<Result> {
|
||||
return this._computer;
|
||||
}
|
||||
|
||||
private _getHoverTimeMillis(): number {
|
||||
if (this._computer.getHoverTimeMillis) {
|
||||
return this._computer.getHoverTimeMillis();
|
||||
|
@ -186,4 +182,3 @@ export class HoverOperation<Result> {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -203,10 +203,6 @@ class LinkDetector implements editorCommon.IEditorContribution {
|
|||
return LinkDetector.ID;
|
||||
}
|
||||
|
||||
public isComputing(): boolean {
|
||||
return TPromise.is(this.computePromise);
|
||||
}
|
||||
|
||||
private onModelChanged(): void {
|
||||
this.currentOccurrences = {};
|
||||
this.activeLinkDecorationId = null;
|
||||
|
|
|
@ -20,7 +20,7 @@ import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/com
|
|||
import { inputValidationInfoBorder, inputValidationInfoBackground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
|
||||
export class MessageController {
|
||||
export class MessageController implements editorCommon.IEditorContribution {
|
||||
|
||||
private static _id = 'editor.contrib.messageController';
|
||||
|
||||
|
|
|
@ -18,8 +18,9 @@ import { Choice } from 'vs/editor/contrib/snippet/snippetParser';
|
|||
import { repeat } from 'vs/base/common/strings';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { IEditorContribution } from 'vs/editor/common/editorCommon';
|
||||
|
||||
export class SnippetController2 {
|
||||
export class SnippetController2 implements IEditorContribution {
|
||||
|
||||
static get(editor: ICodeEditor): SnippetController2 {
|
||||
return editor.getContribution<SnippetController2>('snippetController2');
|
||||
|
|
|
@ -21,7 +21,6 @@ import { IConfirmation, IMessageService, IConfirmationResult } from 'vs/platform
|
|||
import { IWorkspaceContextService, IWorkspace, WorkbenchState, IWorkspaceFolder, IWorkspaceFoldersChangeEvent, WorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import { ICodeEditor, IDiffEditor, isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { Configuration, DefaultConfigurationModel, ConfigurationModel } from 'vs/platform/configuration/common/configurationModels';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
@ -54,7 +53,6 @@ export class SimpleEditor implements IEditor {
|
|||
|
||||
public getId(): string { return 'editor'; }
|
||||
public getControl(): editorCommon.IEditor { return this._widget; }
|
||||
public getSelection(): Selection { return this._widget.getSelection(); }
|
||||
public focus(): void { this._widget.focus(); }
|
||||
public isVisible(): boolean { return true; }
|
||||
|
||||
|
@ -587,10 +585,6 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService {
|
|||
return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME;
|
||||
}
|
||||
|
||||
public toResource(workspaceRelativePath: string, workspaceFolder: IWorkspaceFolder): URI {
|
||||
return URI.file(workspaceRelativePath);
|
||||
}
|
||||
|
||||
public isCurrentWorkspace(workspaceIdentifier: ISingleFolderWorkspaceIdentifier | IWorkspaceIdentifier): boolean {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -38,13 +38,6 @@ import * as editorOptions from 'vs/editor/common/config/editorOptions';
|
|||
import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents';
|
||||
import { IMessageService } from 'vs/platform/message/common/message';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function setupServices(overrides: IEditorOverrideServices): any {
|
||||
return StaticServices.init(overrides);
|
||||
}
|
||||
|
||||
function withAllStandaloneServices<T extends editorCommon.IEditor>(domElement: HTMLElement, override: IEditorOverrideServices, callback: (services: DynamicStandaloneServices) => T): T {
|
||||
let services = new DynamicStandaloneServices(domElement, override);
|
||||
|
||||
|
|
4
src/vs/monaco.d.ts
vendored
4
src/vs/monaco.d.ts
vendored
|
@ -586,10 +586,6 @@ declare module monaco {
|
|||
* Return the start position (which will be before or equal to the end position)
|
||||
*/
|
||||
getStartPosition(): Position;
|
||||
/**
|
||||
* Clone this range.
|
||||
*/
|
||||
cloneRange(): Range;
|
||||
/**
|
||||
* Transform to a user presentable string representation.
|
||||
*/
|
||||
|
|
|
@ -82,11 +82,6 @@ class KeybindingInputWidget extends Widget {
|
|||
this._chordPart = null;
|
||||
}
|
||||
|
||||
public setAcceptChords(acceptChords: boolean) {
|
||||
this._acceptChords = acceptChords;
|
||||
this._chordPart = null;
|
||||
}
|
||||
|
||||
private _onKeyDown(keyboardEvent: IKeyboardEvent): void {
|
||||
keyboardEvent.preventDefault();
|
||||
keyboardEvent.stopPropagation();
|
||||
|
@ -294,4 +289,4 @@ export class DefineKeybindingOverlayWidget extends Disposable implements IOverla
|
|||
this._widget.layout(new Dimension(layoutInfo.width, layoutInfo.height));
|
||||
return this._widget.define();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import { TPromise, ValueCallback, ErrorCallback } from 'vs/base/common/winjs.base';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
export class LazyPromise {
|
||||
export class LazyPromise implements TPromise<any> {
|
||||
|
||||
private _onCancel: () => void;
|
||||
|
||||
|
|
|
@ -12,22 +12,6 @@ import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
|
|||
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
|
||||
import { ScanCodeBinding, ScanCode, IMMUTABLE_CODE_TO_KEY_CODE } from 'vs/workbench/services/keybinding/common/scanCode';
|
||||
|
||||
export interface IMacLinuxKeyMapping {
|
||||
value: string;
|
||||
withShift: string;
|
||||
withAltGr: string;
|
||||
withShiftAltGr: string;
|
||||
|
||||
valueIsDeadKey?: boolean;
|
||||
withShiftIsDeadKey?: boolean;
|
||||
withAltGrIsDeadKey?: boolean;
|
||||
withShiftAltGrIsDeadKey?: boolean;
|
||||
}
|
||||
|
||||
export interface IMacLinuxKeyboardMapping {
|
||||
[scanCode: string]: IMacLinuxKeyMapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* A keyboard mapper to be used when reading the keymap from the OS fails.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue