Merge from vscode e6a45f4242ebddb7aa9a229f85555e8a3bd987e2 (#9253)

* Merge from vscode e6a45f4242ebddb7aa9a229f85555e8a3bd987e2

* skip failing tests

* remove github-authentication extensions

* ignore github compile steps

* ignore github compile steps

* check in compiled files
This commit is contained in:
Anthony Dresser
2020-02-21 12:11:51 -08:00
committed by GitHub
parent c74bac3746
commit 1b78a9b1e0
179 changed files with 3200 additions and 1830 deletions

View File

@@ -22,7 +22,7 @@ import { IFileService, FileSystemProviderCapabilities } from 'vs/platform/files/
import { IPathData } from 'vs/platform/windows/common/windows';
import { coalesce, firstOrDefault } from 'vs/base/common/arrays';
import { ITextFileSaveOptions, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService';
import { isEqual, dirname } from 'vs/base/common/resources';
import { IPanel } from 'vs/workbench/common/panel';
import { IRange } from 'vs/editor/common/core/range';
@@ -345,6 +345,11 @@ export interface IRevertOptions {
readonly soft?: boolean;
}
export interface IMoveResult {
editor: IEditorInput | IResourceEditor;
options?: IEditorOptions;
}
export interface IEditorInput extends IDisposable {
/**
@@ -446,6 +451,16 @@ export interface IEditorInput extends IDisposable {
*/
revert(group: GroupIdentifier, options?: IRevertOptions): Promise<boolean>;
/**
* Called to determine how to handle a resource that is moved that matches
* the editors resource (or is a child of).
*
* Implementors are free to not implement this method to signal no intent
* to participate. If an editor is returned though, it will replace the
* current one with that editor and optional options.
*/
move(group: GroupIdentifier, target: URI): IMoveResult | undefined;
/**
* Returns if the other object matches this input.
*/
@@ -546,6 +561,10 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
return true;
}
move(group: GroupIdentifier, target: URI): IMoveResult | undefined {
return undefined;
}
/**
* Subclasses can set this to false if it does not make sense to split the editor input.
*/
@@ -780,6 +799,11 @@ export interface IFileEditorInput extends IEditorInput, IEncodingSupport, IModeS
* Forces this file input to open as binary instead of text.
*/
setForceOpenAsBinary(): void;
/**
* Figure out if the input has been resolved or not.
*/
isResolved(): boolean;
}
/**
@@ -1209,6 +1233,8 @@ export class TextEditorOptions extends EditorOptions implements ITextEditorOptio
if (this.selectionRevealType === TextEditorSelectionRevealType.NearTop) {
editor.revealRangeNearTop(range, scrollType);
} else if (this.selectionRevealType === TextEditorSelectionRevealType.NearTopIfOutsideViewport) {
editor.revealRangeNearTopIfOutsideViewport(range, scrollType);
} else if (this.selectionRevealType === TextEditorSelectionRevealType.CenterIfOutsideViewport) {
editor.revealRangeInCenterIfOutsideViewport(range, scrollType);
} else {

View File

@@ -18,13 +18,17 @@ import { withNullAsUndefined } from 'vs/base/common/types';
export class ResourceContextKey extends Disposable implements IContextKey<URI> {
// NOTE: DO NOT CHANGE THE DEFAULT VALUE TO ANYTHING BUT
// UNDEFINED! IT IS IMPORTANT THAT DEFAULTS ARE INHERITED
// FROM THE PARENT CONTEXT AND ONLY UNDEFINED DOES THIS
static readonly Scheme = new RawContextKey<string>('resourceScheme', undefined);
static readonly Filename = new RawContextKey<string>('resourceFilename', undefined);
static readonly LangId = new RawContextKey<string>('resourceLangId', undefined);
static readonly Resource = new RawContextKey<URI>('resource', undefined);
static readonly Extension = new RawContextKey<string>('resourceExtname', undefined);
static readonly HasResource = new RawContextKey<boolean>('resourceSet', false);
static readonly IsFileSystemResource = new RawContextKey<boolean>('isFileSystemResource', false);
static readonly HasResource = new RawContextKey<boolean>('resourceSet', undefined);
static readonly IsFileSystemResource = new RawContextKey<boolean>('isFileSystemResource', undefined);
private readonly _resourceKey: IContextKey<URI | null>;
private readonly _schemeKey: IContextKey<string | null>;