conflict_resolution
stringlengths
27
16k
<<<<<<< if (!areSameExtensions({ id: e.identifier.value }, extension)) { ======= if (!areSameExtensions(e, extension.identifier)) { >>>>>>> if (!areSameExtensions({ id: e.identifier.value }, extension.identifier)) {
<<<<<<< import { WorkbenchTree } from 'vs/platform/list/browser/listService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; ======= import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { ITreeConfiguration, ITreeOptions } from 'vs/base/parts/tree/browser/tree'; import Event, { Emitter } from 'vs/base/common/event'; >>>>>>> import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { WorkbenchTree, IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { ITreeConfiguration, ITreeOptions } from 'vs/base/parts/tree/browser/tree'; import Event, { Emitter } from 'vs/base/common/event';
<<<<<<< // if (this.remote) { // await this.code.waitForElement('.monaco-workbench .statusbar-item.statusbar-entry a[title="Editing on TestResolver"]'); // } ======= if (this.remote) { await this.code.waitForElement('.monaco-workbench .statusbar-item[title="Editing on TestResolver"]'); } >>>>>>> // if (this.remote) { // await this.code.waitForElement('.monaco-workbench .statusbar-item[title="Editing on TestResolver"]'); // }
<<<<<<< import { NotebookEditorOptions } from 'vs/workbench/contrib/notebook/browser/notebookEditorWidget'; import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor'; import { INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { NotebookRegistry } from 'vs/workbench/contrib/notebook/browser/notebookRegistry'; import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo'; ======= >>>>>>>
<<<<<<< import { Controller, Delete, Get, Patch, Post, Put, Response, Route, Security, SuccessResponse, Tags } from '@tsoa/runtime'; ======= import { Controller, Extension, Delete, Get, Patch, Post, Put, Response, Route, Security, SuccessResponse, Tags } from '../../../src'; >>>>>>> import { Controller, Extension, Delete, Get, Patch, Post, Put, Response, Route, Security, SuccessResponse, Tags } from '@tsoa/runtime';
<<<<<<< ======= basename: string; size?: number; /** * This path is transformed for search purposes. For example, this could be * the `relativePath` with the workspace folder name prepended. This way the * search algorithm would also match against the name of the containing folder. * * If not given, the search algorithm should use `relativePath`. */ searchPath?: string; >>>>>>> /** * This path is transformed for search purposes. For example, this could be * the `relativePath` with the workspace folder name prepended. This way the * search algorithm would also match against the name of the containing folder. * * If not given, the search algorithm should use `relativePath`. */ searchPath?: string;
<<<<<<< class BaseDeleteFileAction extends BaseErrorReportingAction { ======= /* Create New File/Folder (only used internally by explorerViewer) */ export abstract class BaseCreateAction extends BaseRenameAction { public validateFileName(parent: ExplorerItem, name: string): string { if (this.element instanceof NewStatPlaceholder) { return validateFileName(parent, name); } return super.validateFileName(parent, name); } } /* Create New File (only used internally by explorerViewer) */ class CreateFileAction extends BaseCreateAction { public static readonly ID = 'workbench.files.action.createFileFromExplorer'; public static readonly LABEL = nls.localize('createNewFile', "New File"); constructor( element: ExplorerItem, @IFileService fileService: IFileService, @IEditorService private readonly editorService: IEditorService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super(CreateFileAction.ID, CreateFileAction.LABEL, element, fileService, notificationService, textFileService); this._updateEnablement(); } public runAction(fileName: string): Promise<any> { const resource = this.element.parent.resource; return this.fileService.createFile(resources.joinPath(resource, fileName)).then(stat => { return this.editorService.openEditor({ resource: stat.resource, options: { pinned: true } }); }, (error) => { this.onErrorWithRetry(error, () => this.runAction(fileName)); }); } } /* Create New Folder (only used internally by explorerViewer) */ class CreateFolderAction extends BaseCreateAction { public static readonly ID = 'workbench.files.action.createFolderFromExplorer'; public static readonly LABEL = nls.localize('createNewFolder', "New Folder"); constructor( element: ExplorerItem, @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super(CreateFolderAction.ID, CreateFolderAction.LABEL, null, fileService, notificationService, textFileService); this._updateEnablement(); } public runAction(fileName: string): Promise<any> { const resource = this.element.parent.resource; return this.fileService.createFolder(resources.joinPath(resource, fileName)).then(undefined, (error) => { this.onErrorWithRetry(error, () => this.runAction(fileName)); }); } } class BaseDeleteFileAction extends BaseFileAction { >>>>>>> class BaseDeleteFileAction extends BaseErrorReportingAction { <<<<<<< @IFileService private fileService: IFileService, @IEditorService private editorService: IEditorService, @IDialogService private dialogService: IDialogService, ======= @IFileService fileService: IFileService, @IEditorService private readonly editorService: IEditorService, @IDialogService private readonly dialogService: IDialogService, >>>>>>> @IFileService private readonly fileService: IFileService, @IEditorService private readonly editorService: IEditorService, @IDialogService private readonly dialogService: IDialogService, <<<<<<< @IClipboardService private clipboardService: IClipboardService ======= @ITextFileService textFileService: ITextFileService, @IContextKeyService contextKeyService: IContextKeyService, @IClipboardService private readonly clipboardService: IClipboardService >>>>>>> @IClipboardService private readonly clipboardService: IClipboardService <<<<<<< @IEditorService private editorService: IEditorService, @IExplorerService private explorerService: IExplorerService ======= @ITextFileService textFileService: ITextFileService, @IEditorService private readonly editorService: IEditorService >>>>>>> @IEditorService private readonly editorService: IEditorService, @IExplorerService private readonly explorerService: IExplorerService <<<<<<< ======= // Duplicate File/Folder export class DuplicateFileAction extends BaseFileAction { private tree: ITree; private target: ExplorerItem; constructor( tree: ITree, fileToDuplicate: ExplorerItem, target: ExplorerItem, @IFileService fileService: IFileService, @IEditorService private readonly editorService: IEditorService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super('workbench.files.action.duplicateFile', nls.localize('duplicateFile', "Duplicate"), fileService, notificationService, textFileService); this.tree = tree; this.element = fileToDuplicate; this.target = (target && target.isDirectory) ? target : fileToDuplicate.parent; this._updateEnablement(); } public run(): Promise<any> { // Remove highlight if (this.tree) { this.tree.clearHighlight(); } // Copy File const result = this.fileService.copyFile(this.element.resource, findValidPasteFileTarget(this.target, { resource: this.element.resource, isDirectory: this.element.isDirectory })).then(stat => { if (!stat.isDirectory) { return this.editorService.openEditor({ resource: stat.resource, options: { pinned: true } }); } return undefined; }, error => this.onError(error)); return result; } } >>>>>>>
<<<<<<< import { ILocalTerminalService, IOffProcessTerminalService, IShellLaunchConfig, ITerminalLaunchError, ITerminalProfile, ITerminalsLayoutInfo, ITerminalsLayoutInfoById, TerminalShellType, WindowsShellType } from 'vs/platform/terminal/common/terminal'; ======= import { ILocalTerminalService, IOffProcessTerminalService, IShellLaunchConfig, ITerminalLaunchError, ITerminalsLayoutInfo, ITerminalsLayoutInfoById } from 'vs/platform/terminal/common/terminal'; >>>>>>> import { ILocalTerminalService, IOffProcessTerminalService, IShellLaunchConfig, ITerminalLaunchError, ITerminalProfile, ITerminalsLayoutInfo, ITerminalsLayoutInfoById } from 'vs/platform/terminal/common/terminal'; <<<<<<< import { IAvailableProfilesRequest, IRemoteTerminalAttachTarget, IStartExtensionTerminalRequest, ITerminalConfigHelper, ITerminalProcessExtHostProxy, KEYBINDING_CONTEXT_TERMINAL_ALT_BUFFER_ACTIVE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED, KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE, TERMINAL_VIEW_ID, ITerminalProfileObject, ITerminalTypeContribution, KEYBINDING_CONTEXT_TERMINAL_COUNT, TerminalSettingId } from 'vs/workbench/contrib/terminal/common/terminal'; ======= import { IAvailableProfilesRequest, IRemoteTerminalAttachTarget, ITerminalProfile, IStartExtensionTerminalRequest, ITerminalConfigHelper, ITerminalProcessExtHostProxy, KEYBINDING_CONTEXT_TERMINAL_ALT_BUFFER_ACTIVE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED, KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE, TERMINAL_VIEW_ID, ITerminalProfileObject, KEYBINDING_CONTEXT_TERMINAL_COUNT, TerminalSettingId, ITerminalTypeContribution, KEYBINDING_CONTEXT_TERMINAL_TABS_MOUSE } from 'vs/workbench/contrib/terminal/common/terminal'; >>>>>>> import { IAvailableProfilesRequest, IRemoteTerminalAttachTarget, IStartExtensionTerminalRequest, ITerminalConfigHelper, ITerminalProcessExtHostProxy, KEYBINDING_CONTEXT_TERMINAL_ALT_BUFFER_ACTIVE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED, KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE, TERMINAL_VIEW_ID, ITerminalProfileObject, KEYBINDING_CONTEXT_TERMINAL_COUNT, TerminalSettingId, ITerminalTypeContribution, KEYBINDING_CONTEXT_TERMINAL_TABS_MOUSE } from 'vs/workbench/contrib/terminal/common/terminal'; <<<<<<< private _saveState(isRemote?: boolean): void { ======= private _saveState(): void { >>>>>>> private _saveState(): void { <<<<<<< this._getPrimaryOffProcService()?.setTerminalLayoutInfo(state); ======= this._offProcessTerminalService?.setTerminalLayoutInfo(state); >>>>>>> this._offProcessTerminalService?.setTerminalLayoutInfo(state); <<<<<<< this._getPrimaryOffProcService()?.updateTitle(instance.persistentProcessId, instance.title); ======= this._offProcessTerminalService?.updateTitle(instance.persistentProcessId, instance.title); >>>>>>> this._offProcessTerminalService?.updateTitle(instance.persistentProcessId, instance.title); <<<<<<< this._getPrimaryOffProcService()?.updateIcon(instance.persistentProcessId, instance.icon.id); } private _getPrimaryOffProcService(): IOffProcessTerminalService | undefined { const isRemote = !!this._environmentService.remoteAuthority; return isRemote ? this._remoteTerminalService : this._localTerminalService; ======= this._offProcessTerminalService?.updateIcon(instance.persistentProcessId, instance.icon.id); >>>>>>> this._offProcessTerminalService?.updateIcon(instance.persistentProcessId, instance.icon.id);
<<<<<<< return this.backupFileService.hasBackup(this.resource).then(backupExists => { let resolveBackupPromise: TPromise<string | IRawText>; ======= return this.backupFileService.loadBackupResource(this.resource).then(backupResource => { let resolveBackupPromise: TPromise<IRawText>; >>>>>>> return this.backupFileService.loadBackupResource(this.resource).then(backupResource => { let resolveBackupPromise: TPromise<string | IRawText>; <<<<<<< if (backupExists) { const restoreResource = this.backupFileService.getBackupResource(this.resource); resolveBackupPromise = this.textFileService.resolveTextContent(restoreResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => { // The first line of a backup text file is the file name return backup.value.lines.slice(1).join('\n'); }, error => content.value); ======= if (backupResource) { resolveBackupPromise = this.textFileService.resolveTextContent(backupResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => backup.value, error => content.value); >>>>>>> if (backupResource) { resolveBackupPromise = this.textFileService.resolveTextContent(backupResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => { // The first line of a backup text file is the file name return backup.value.lines.slice(1).join('\n'); }, error => content.value);
<<<<<<< import ActionsRenderer = require('vs/base/parts/tree/browser/actionsRenderer'); import Actions = require('vs/base/common/actions'); import {compareAnything} from 'vs/base/common/comparers'; import ActionBar = require('vs/base/browser/ui/actionbar/actionbar'); import TreeDefaults = require('vs/base/parts/tree/browser/treeDefaults'); import HighlightedLabel = require('vs/base/browser/ui/highlightedlabel/highlightedLabel'); import {OcticonLabel} from 'vs/base/browser/ui/octiconLabel/octiconLabel'; ======= import {IActionProvider} from 'vs/base/parts/tree/browser/actionsRenderer'; import {Action, IAction, IActionRunner} from 'vs/base/common/actions'; import {compareAnything, compareByPrefix} from 'vs/base/common/comparers'; import {ActionBar, IActionItem} from 'vs/base/browser/ui/actionbar/actionbar'; import {LegacyRenderer, ILegacyTemplateData} from 'vs/base/parts/tree/browser/treeDefaults'; import {HighlightedLabel} from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; >>>>>>> import {IActionProvider} from 'vs/base/parts/tree/browser/actionsRenderer'; import {Action, IAction, IActionRunner} from 'vs/base/common/actions'; import {compareAnything, compareByPrefix} from 'vs/base/common/comparers'; import {ActionBar, IActionItem} from 'vs/base/browser/ui/actionbar/actionbar'; import {LegacyRenderer, ILegacyTemplateData} from 'vs/base/parts/tree/browser/treeDefaults'; import {HighlightedLabel} from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import {OcticonLabel} from 'vs/base/browser/ui/octiconLabel/octiconLabel'; <<<<<<< label: HighlightedLabel.HighlightedLabel; meta: OcticonLabel; description: HighlightedLabel.HighlightedLabel; actionBar: ActionBar.ActionBar; ======= label: HighlightedLabel; meta: HTMLSpanElement; description: HighlightedLabel; actionBar: ActionBar; >>>>>>> label: HighlightedLabel; meta: OcticonLabel; description: HighlightedLabel; actionBar: ActionBar;
<<<<<<< import { IBackupService } from 'vs/code/electron-main/backup'; ======= import { IEnvironmentService } from 'vs/platform/environment/common/environment'; >>>>>>> import { IBackupService } from 'vs/code/electron-main/backup'; import { IEnvironmentService } from 'vs/platform/environment/common/environment';
<<<<<<< const input = this.instantiationService.createInstance(UntitledEditorInput, resource, hasAssociatedFilePath, modeId, restoreResource); const contentListener = input.onDidModelChangeContent(() => { this._onDidChangeContent.fire(resource); }); ======= const input = this.instantiationService.createInstance(UntitledEditorInput, resource, hasAssociatedFilePath, modeId); if (input.isDirty()) { setTimeout(() => { this._onDidChangeDirty.fire(resource); }, 0 /* prevent race condition between creating input and emitting dirty event */); } >>>>>>> const input = this.instantiationService.createInstance(UntitledEditorInput, resource, hasAssociatedFilePath, modeId, restoreResource); if (input.isDirty()) { setTimeout(() => { this._onDidChangeDirty.fire(resource); }, 0 /* prevent race condition between creating input and emitting dirty event */); } const contentListener = input.onDidModelChangeContent(() => { this._onDidChangeContent.fire(resource); });
<<<<<<< ======= getExtensionsActivationTimes() { return undefined; } getExtensionHostInformation(): IExtensionHostInformation { return undefined; } >>>>>>> getExtensionHostInformation(): IExtensionHostInformation { return undefined; }
<<<<<<< import { Body, BodyProp, Get, Header, Path, Post, Query, Request, Route } from '@tsoa/runtime'; ======= import { Body, BodyProp, Get, Header, Path, Post, Query, Request, Route, Res, TsoaResponse } from '../../../src'; >>>>>>> import { Body, BodyProp, Get, Header, Path, Post, Query, Request, Route, Res, TsoaResponse } from '@tsoa/runtime';
<<<<<<< private async _openResource(model: Model, resource: Resource): Promise<void> { ======= private async _openResource(resource: Resource, preview?: boolean): Promise<void> { >>>>>>> private async _openResource(model: Model, resource: Resource, preview?: boolean): Promise<void> { <<<<<<< @modelCommand('git.openFile') async openFile(model: Model, arg?: Resource | Uri): Promise<void> { let uri: Uri | undefined; ======= @command('git.openFile') async openFile(arg?: Resource | Uri, ...resourceStates: SourceControlResourceState[]): Promise<void> { let uris: Uri[] | undefined; >>>>>>> @modelCommand('git.openFile') async openFile(model: Model, arg?: Resource | Uri, ...resourceStates: SourceControlResourceState[]): Promise<void> { let uris: Uri[] | undefined; <<<<<<< return await this._openResource(model, resource); ======= const preview = resources.length === 1 ? undefined : false; for (const resource of resources) { await this._openResource(resource, preview); } >>>>>>> const preview = resources.length === 1 ? undefined : false; for (const resource of resources) { await this._openResource(model, resource, preview); } <<<<<<< const noStagedChanges = model.indexGroup.resources.length === 0; const noUnstagedChanges = model.workingTreeGroup.resources.length === 0; ======= const enableCommitSigning = config.get<boolean>('enableCommitSigning') === true; const noStagedChanges = this.model.indexGroup.resources.length === 0; const noUnstagedChanges = this.model.workingTreeGroup.resources.length === 0; >>>>>>> const enableCommitSigning = config.get<boolean>('enableCommitSigning') === true; const noStagedChanges = model.indexGroup.resources.length === 0; const noUnstagedChanges = model.workingTreeGroup.resources.length === 0; <<<<<<< @modelCommand('git.commitAll') async commitAll(model: Model): Promise<void> { await this.commitWithAnyInput(model, { all: true }); ======= @command('git.commitStagedAmend') async commitStagedAmend(): Promise<void> { await this.commitWithAnyInput({ all: false, amend: true }); } @command('git.commitAll') async commitAll(): Promise<void> { await this.commitWithAnyInput({ all: true }); >>>>>>> @modelCommand('git.commitStagedAmend') async commitStagedAmend(model: Model): Promise<void> { await this.commitWithAnyInput(model, { all: false, amend: true }); } @modelCommand('git.commitAll') async commitAll(model: Model): Promise<void> { await this.commitWithAnyInput(model, { all: true }); <<<<<<< @modelCommand('git.undoCommit') async undoCommit(model: Model): Promise<void> { const HEAD = model.HEAD; ======= @command('git.commitAllAmend') async commitAllAmend(): Promise<void> { await this.commitWithAnyInput({ all: true, amend: true }); } @command('git.undoCommit') async undoCommit(): Promise<void> { const HEAD = this.model.HEAD; >>>>>>> @modelCommand('git.commitAllAmend') async commitAllAmend(model: Model): Promise<void> { await this.commitWithAnyInput(model, { all: true, amend: true }); } @modelCommand('git.undoCommit') async undoCommit(model: Model): Promise<void> { const HEAD = model.HEAD; <<<<<<< @modelCommand('git.pullFrom') async pullFrom(model: Model): Promise<void> { const remotes = model.remotes; ======= @command('git.createTag') async createTag(): Promise<void> { const inputTagName = await window.showInputBox({ placeHolder: localize('tag name', "Tag name"), prompt: localize('provide tag name', "Please provide a tag name"), ignoreFocusOut: true }); if (!inputTagName) { return; } const inputMessage = await window.showInputBox({ placeHolder: localize('tag message', "Message"), prompt: localize('provide tag message', "Please provide a message to annotate the tag"), ignoreFocusOut: true }); const name = inputTagName.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$/g, '-'); const message = inputMessage || name; await this.model.tag(name, message); } @command('git.pullFrom') async pullFrom(): Promise<void> { const remotes = this.model.remotes; >>>>>>> @modelCommand('git.createTag') async createTag(model: Model): Promise<void> { const inputTagName = await window.showInputBox({ placeHolder: localize('tag name', "Tag name"), prompt: localize('provide tag name', "Please provide a tag name"), ignoreFocusOut: true }); if (!inputTagName) { return; } const inputMessage = await window.showInputBox({ placeHolder: localize('tag message', "Message"), prompt: localize('provide tag message', "Please provide a message to annotate the tag"), ignoreFocusOut: true }); const name = inputTagName.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$/g, '-'); const message = inputMessage || name; await model.tag(name, message); } @modelCommand('git.pullFrom') async pullFrom(model: Model): Promise<void> { const remotes = model.remotes; <<<<<<< @modelCommand('git.pushTo') async pushTo(model: Model): Promise<void> { const remotes = model.remotes; ======= @command('git.pushWithTags') async pushWithTags(): Promise<void> { const remotes = this.model.remotes; if (remotes.length === 0) { window.showWarningMessage(localize('no remotes to push', "Your repository has no remotes configured to push to.")); return; } await this.model.pushTags(); window.showInformationMessage(localize('push with tags success', "Successfully pushed with tags.")); } @command('git.pushTo') async pushTo(): Promise<void> { const remotes = this.model.remotes; >>>>>>> @modelCommand('git.pushWithTags') async pushWithTags(model: Model): Promise<void> { const remotes = model.remotes; if (remotes.length === 0) { window.showWarningMessage(localize('no remotes to push', "Your repository has no remotes configured to push to.")); return; } await model.pushTags(); window.showInformationMessage(localize('push with tags success', "Successfully pushed with tags.")); } @modelCommand('git.pushTo') async pushTo(model: Model): Promise<void> { const remotes = model.remotes;
<<<<<<< import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; ======= import { INavigatorWithKeyboard } from 'vs/workbench/services/keybinding/common/navigatorKeyboard'; >>>>>>> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { INavigatorWithKeyboard } from 'vs/workbench/services/keybinding/common/navigatorKeyboard';
<<<<<<< const navigator: ITreeNavigator<any> = viewer.navigate(element); if (element instanceof BaseFolderMatch) { while (!!navigator.next() && !(navigator.current() instanceof BaseFolderMatch)) { } ======= const navigator: INavigator<any> = viewer.navigate(element); if (element instanceof FolderMatch) { while (!!navigator.next() && !(navigator.current() instanceof FolderMatch)) { } >>>>>>> const navigator: ITreeNavigator<any> = viewer.navigate(element); if (element instanceof FolderMatch) { while (!!navigator.next() && !(navigator.current() instanceof FolderMatch)) { }
<<<<<<< import { EventType, addDisposableListener, addClass, getClientArea, getDomNodePagePosition } from 'vs/base/browser/dom'; ======= import { EventType, addDisposableListener, addClass } from 'vs/base/browser/dom'; >>>>>>> import { EventType, addDisposableListener, addClass, getDomNodePagePosition } from 'vs/base/browser/dom';
<<<<<<< import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; ======= import { MarkdownRenderer } from 'vs/editor/contrib/markdown/browser/markdownRenderer'; >>>>>>> import { MarkdownRenderer } from 'vs/editor/contrib/markdown/browser/markdownRenderer'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; <<<<<<< this._contentWidget = new ModesContentHoverWidget(editor, openerService, modeService, telemetryService); this._glyphWidget = new ModesGlyphHoverWidget(editor, openerService, modeService); ======= const renderer = new MarkdownRenderer(editor, modeService, openerService); this._contentWidget = new ModesContentHoverWidget(editor, renderer); this._glyphWidget = new ModesGlyphHoverWidget(editor, renderer); >>>>>>> const renderer = new MarkdownRenderer(editor, modeService, openerService); this._contentWidget = new ModesContentHoverWidget(editor, renderer, telemetryService); this._glyphWidget = new ModesGlyphHoverWidget(editor, renderer);
<<<<<<< import { ILinkComputerTarget, LinkComputer } from 'vs/editor/common/modes/linkComputer'; import { IRange } from 'vs/editor/common/core/range'; ======= import { Emitter, Event } from 'vs/base/common/event'; import { ILogService } from 'vs/platform/log/common/log'; >>>>>>> import { ILinkComputerTarget, LinkComputer } from 'vs/editor/common/modes/linkComputer'; import { IRange } from 'vs/editor/common/core/range'; import { Emitter, Event } from 'vs/base/common/event'; import { ILogService } from 'vs/platform/log/common/log'; <<<<<<< class TerminalLinkAdapter implements ILinkComputerTarget { constructor( private _xterm: Terminal, private _lineStart: number, private _lineEnd: number ) { } getLineCount(): number { return 1; } getLineContent(lineNumber: number): string { let line = ''; for (let i = this._lineStart; i <= this._lineEnd; i++) { line += this._xterm.buffer.getLine(i)?.translateToString(); } return line; } } export class TerminalLinkHandler { private readonly _hoverDisposables = new DisposableStore(); ======= export class TerminalLinkHandler extends DisposableStore { >>>>>>> class TerminalLinkAdapter implements ILinkComputerTarget { constructor( private _xterm: Terminal, private _lineStart: number, private _lineEnd: number ) { } getLineCount(): number { return 1; } getLineContent(lineNumber: number): string { let line = ''; for (let i = this._lineStart; i <= this._lineEnd; i++) { line += this._xterm.buffer.getLine(i)?.translateToString(); } return line; } } export class TerminalLinkHandler extends DisposableStore { <<<<<<< private _linkMatchers: number[] = []; private _webLinksAddon: ITerminalAddon | undefined; private _linkProvider: IDisposable | undefined; ======= private _hasBeforeHandleLinkListeners = false; protected static _LINK_INTERCEPT_THRESHOLD = LINK_INTERCEPT_THRESHOLD; public static readonly LINK_INTERCEPT_THRESHOLD = TerminalLinkHandler._LINK_INTERCEPT_THRESHOLD; private readonly _onBeforeHandleLink = this.add(new Emitter<ITerminalBeforeHandleLinkEvent>({ onFirstListenerAdd: () => this._hasBeforeHandleLinkListeners = true, onLastListenerRemove: () => this._hasBeforeHandleLinkListeners = false })); /** * Allows intercepting links and handling them outside of the default link handler. When fired * the listener has a set amount of time to handle the link or the default handler will fire. * This was designed to only be handled by a single listener. */ public get onBeforeHandleLink(): Event<ITerminalBeforeHandleLinkEvent> { return this._onBeforeHandleLink.event; } >>>>>>> private _linkMatchers: number[] = []; private _webLinksAddon: ITerminalAddon | undefined; private _linkProvider: IDisposable | undefined; private _hasBeforeHandleLinkListeners = false; protected static _LINK_INTERCEPT_THRESHOLD = LINK_INTERCEPT_THRESHOLD; public static readonly LINK_INTERCEPT_THRESHOLD = TerminalLinkHandler._LINK_INTERCEPT_THRESHOLD; private readonly _onBeforeHandleLink = this.add(new Emitter<ITerminalBeforeHandleLinkEvent>({ onFirstListenerAdd: () => this._hasBeforeHandleLinkListeners = true, onLastListenerRemove: () => this._hasBeforeHandleLinkListeners = false })); /** * Allows intercepting links and handling them outside of the default link handler. When fired * the listener has a set amount of time to handle the link or the default handler will fire. * This was designed to only be handled by a single listener. */ public get onBeforeHandleLink(): Event<ITerminalBeforeHandleLinkEvent> { return this._onBeforeHandleLink.event; }
<<<<<<< import { INotebookEditorContribution, notebooksExtensionPoint, notebookRendererExtensionPoint, notebooksExtensionPoint2 } from 'vs/workbench/contrib/notebook/browser/extensionPoint'; import { NotebookEditorOptions, updateEditorTopPadding } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; ======= import { INotebookEditorContribution, notebookMarkupRendererExtensionPoint, notebooksExtensionPoint, notebookRendererExtensionPoint } from 'vs/workbench/contrib/notebook/browser/extensionPoint'; import { NotebookEditorOptions } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; >>>>>>> import { INotebookEditorContribution, notebooksExtensionPoint, notebookRendererExtensionPoint } from 'vs/workbench/contrib/notebook/browser/extensionPoint'; import { NotebookEditorOptions } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; <<<<<<< ======= import { NotebookMarkupRendererInfo as NotebookMarkupRendererInfo } from 'vs/workbench/contrib/notebook/common/notebookMarkdownRenderer'; import { updateEditorTopPadding } from 'vs/workbench/contrib/notebook/common/notebookOptions'; >>>>>>> import { updateEditorTopPadding } from 'vs/workbench/contrib/notebook/common/notebookOptions';
<<<<<<< this.timeout(1000 * 10); // higher timeout for this test ======= if (process.env['VSCODE_PID']) { return done(); // TODO@Ben find out why test fails when run from within VS Code } >>>>>>> this.timeout(1000 * 10); // higher timeout for this test if (process.env['VSCODE_PID']) { return done(); // TODO@Ben find out why test fails when run from within VS Code }
<<<<<<< if (!isMacintosh && this.getCustomTitleBarStyle()) { this.windowService.isMaximized().then((max) => { console.log(this); this.workbenchLayout.onMaximizeChange(max); this.workbenchLayout.layout(); }); this.windowService.onDidChangeMaximize(this.workbenchLayout.onMaximizeChange, this.workbenchLayout); } this.toDispose.push(this.workbenchLayout); ======= >>>>>>> if (!isMacintosh && this.getCustomTitleBarStyle()) { this.windowService.isMaximized().then((max) => { console.log(this); this.workbenchLayout.onMaximizeChange(max); this.workbenchLayout.layout(); }); this.windowService.onDidChangeMaximize(this.workbenchLayout.onMaximizeChange, this.workbenchLayout); }
<<<<<<< ======= import { Position } from 'vs/platform/editor/common/editor'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; >>>>>>> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
<<<<<<< const onThisWindowMaximize = mapEvent(filterEvent(windowsService.onWindowMaximize, id => id === windowId), _ => true); const onThisWindowUnmaximize = mapEvent(filterEvent(windowsService.onWindowUnmaximize, id => id === windowId), _ => false); this.onDidChangeFocus = any(onThisWindowFocus, onThisWindowBlur); this.onDidChangeMaximize = any(onThisWindowMaximize, onThisWindowUnmaximize); ======= this.onDidChangeFocus = anyEvent(onThisWindowFocus, onThisWindowBlur); >>>>>>> const onThisWindowMaximize = mapEvent(filterEvent(windowsService.onWindowMaximize, id => id === windowId), _ => true); const onThisWindowUnmaximize = mapEvent(filterEvent(windowsService.onWindowUnmaximize, id => id === windowId), _ => false); this.onDidChangeFocus = anyEvent(onThisWindowFocus, onThisWindowBlur); this.onDidChangeMaximize = anyEvent(onThisWindowMaximize, onThisWindowUnmaximize); <<<<<<< isMaximized(): TPromise<boolean> { return this.windowsService.isMaximized(this.windowId); } maximizeWindow(): TPromise<void> { return this.windowsService.maximizeWindow(this.windowId); } unmaximizeWindow(): TPromise<void> { return this.windowsService.unmaximizeWindow(this.windowId); } minimizeWindow(): TPromise<void> { return this.windowsService.minimizeWindow(this.windowId); } ======= >>>>>>> isMaximized(): TPromise<boolean> { return this.windowsService.isMaximized(this.windowId); } maximizeWindow(): TPromise<void> { return this.windowsService.maximizeWindow(this.windowId); } unmaximizeWindow(): TPromise<void> { return this.windowsService.unmaximizeWindow(this.windowId); } minimizeWindow(): TPromise<void> { return this.windowsService.minimizeWindow(this.windowId); }
<<<<<<< private readonly _activateCallback: (event: MouseEvent, uri: string) => void; private readonly _tooltipCallback: (event: MouseEvent, uri: string, location: IViewportRange) => boolean | void; ======= private readonly _tooltipCallback: (event: MouseEvent, uri: string, location: IViewportRange, linkHandler: (url: string) => void) => boolean | void; >>>>>>> private readonly _activateCallback: (uri: string) => void; private readonly _tooltipCallback: (event: MouseEvent, uri: string, location: IViewportRange, linkHandler: (url: string) => void) => boolean | void; <<<<<<< this._activateCallback = (e: MouseEvent, uri: string) => { if (this._isLinkActivationModifierDown(e)) { this._handleHypertextLink(uri); } }; this._tooltipCallback = (e: MouseEvent, uri: string, location: IViewportRange) => { ======= this._tooltipCallback = (e: MouseEvent, uri: string, location: IViewportRange, linkHandler: (url: string) => void) => { >>>>>>> this._activateCallback = (link: string) => { console.log('link provider activate callback', link); this._handleHypertextLink(link); }; this._tooltipCallback = (e: MouseEvent, uri: string, location: IViewportRange, linkHandler: (url: string) => void) => { <<<<<<< this._linkMatchers.push(this._xterm.registerLinkMatcher(this._localLinkRegex, wrappedHandler, { ======= const tooltipCallback = (event: MouseEvent, uri: string, location: IViewportRange) => { this._tooltipCallback(event, uri, location, this._handleLocalLink.bind(this)); }; this._xterm.registerLinkMatcher(this._localLinkRegex, wrappedHandler, { >>>>>>> const tooltipCallback = (event: MouseEvent, uri: string, location: IViewportRange) => { this._tooltipCallback(event, uri, location, this._handleLocalLink.bind(this)); }; this._linkMatchers.push(this._xterm.registerLinkMatcher(this._localLinkRegex, wrappedHandler, {
<<<<<<< public $acceptActiveTerminalChanged(id: number | null): void { ======= public async resolveTerminalRenderer(id: number): Promise<vscode.TerminalRenderer> { // Check to see if the extension host already knows about this terminal. for (const terminalRenderer of this._terminalRenderers) { if (terminalRenderer._id === id) { return terminalRenderer; } } const terminal = this._getTerminalById(id); if (!terminal) { throw new Error(`Cannot resolve terminal renderer for terminal id ${id}`); } const renderer = new ExtHostTerminalRenderer(this._proxy, terminal.name, terminal, terminal._id); this._terminalRenderers.push(renderer); return renderer; } public async $acceptActiveTerminalChanged(id: number | null): Promise<void> { >>>>>>> public async $acceptActiveTerminalChanged(id: number | null): Promise<void> {
<<<<<<< import { Codicon } from 'vs/base/common/codicons'; ======= import { isString } from 'vs/base/common/types'; >>>>>>> import { Codicon } from 'vs/base/common/codicons'; import { isString } from 'vs/base/common/types';
<<<<<<< import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, SIDE_BAR_SECTION_HEADER_BORDER } from 'vs/workbench/common/theme'; import { append, $, trackFocus, toggleClass, EventType, isAncestor, Dimension, addDisposableListener, addClass, removeClass } from 'vs/base/browser/dom'; import { IDisposable, combinedDisposable, dispose, toDisposable, Disposable, MutableDisposable } from 'vs/base/common/lifecycle'; ======= import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, SIDE_BAR_SECTION_HEADER_BORDER, PANEL_BACKGROUND, SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { append, $, trackFocus, toggleClass, EventType, isAncestor, Dimension, addDisposableListener } from 'vs/base/browser/dom'; import { IDisposable, combinedDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; >>>>>>> import { SIDE_BAR_DRAG_AND_DROP_BACKGROUND, SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, SIDE_BAR_SECTION_HEADER_BORDER, PANEL_BACKGROUND, SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { append, $, trackFocus, toggleClass, EventType, isAncestor, Dimension, addDisposableListener, removeClass, addClass } from 'vs/base/browser/dom'; import { IDisposable, combinedDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; <<<<<<< import { Extensions as ViewContainerExtensions, IView, FocusedViewContext, IViewContainersRegistry, IViewDescriptor, ViewContainer, IViewsRegistry } from 'vs/workbench/common/views'; ======= import { Extensions as ViewContainerExtensions, IView, FocusedViewContext, IViewContainersRegistry, IViewDescriptor, ViewContainer, IViewDescriptorService, ViewContainerLocation, IViewPaneContainer } from 'vs/workbench/common/views'; >>>>>>> import { Extensions as ViewContainerExtensions, IView, FocusedViewContext, IViewContainersRegistry, IViewDescriptor, ViewContainer, IViewDescriptorService, ViewContainerLocation, IViewPaneContainer, IViewsRegistry } from 'vs/workbench/common/views'; <<<<<<< protected renderBody(container: HTMLElement): void { this.bodyContainer = container; this.emptyViewContainer = append(container, $('.empty-view', { tabIndex: 0 })); // we should update our empty state whenever const onEmptyViewContentChange = Event.any( // the registry changes Event.map(Event.filter(viewsRegistry.onDidChangeEmptyViewContent, id => id === this.id), () => this.isEmpty()), // or the view's empty state changes Event.latch(Event.map(this.onDidChangeEmptyState, () => this.isEmpty())) ); this._register(onEmptyViewContentChange(this.updateEmptyState, this)); this.updateEmptyState(this.isEmpty()); } ======= protected getProgressLocation(): string { return this.viewDescriptorService.getViewContainer(this.id)!.id; } protected getBackgroundColor(): string { return this.viewDescriptorService.getViewLocation(this.id) === ViewContainerLocation.Panel ? PANEL_BACKGROUND : SIDE_BAR_BACKGROUND; } >>>>>>> protected renderBody(container: HTMLElement): void { this.bodyContainer = container; this.emptyViewContainer = append(container, $('.empty-view', { tabIndex: 0 })); // we should update our empty state whenever const onEmptyViewContentChange = Event.any( // the registry changes Event.map(Event.filter(viewsRegistry.onDidChangeEmptyViewContent, id => id === this.id), () => this.isEmpty()), // or the view's empty state changes Event.latch(Event.map(this.onDidChangeEmptyState, () => this.isEmpty())) ); this._register(onEmptyViewContentChange(this.updateEmptyState, this)); this.updateEmptyState(this.isEmpty()); } protected getProgressLocation(): string { return this.viewDescriptorService.getViewContainer(this.id)!.id; } protected getBackgroundColor(): string { return this.viewDescriptorService.getViewLocation(this.id) === ViewContainerLocation.Panel ? PANEL_BACKGROUND : SIDE_BAR_BACKGROUND; }
<<<<<<< import { compareFileNames, compareFileExtensions, compareFileNamesDefault, compareFileExtensionsDefault, compareFileNamesUpper, compareFileExtensionsUpper, compareFileNamesLower, compareFileExtensionsLower, compareFileNamesUnicode, compareFileExtensionsUnicode, } from 'vs/base/common/comparers'; ======= import { compareFileNames, compareFileExtensions, compareFileNamesDefault, compareFileExtensionsDefault } from 'vs/base/common/comparers'; >>>>>>> import { compareFileNames, compareFileExtensions, compareFileNamesDefault, compareFileExtensionsDefault, compareFileNamesUpper, compareFileExtensionsUpper, compareFileNamesLower, compareFileExtensionsLower, compareFileNamesUnicode, compareFileExtensionsUnicode, } from 'vs/base/common/comparers'; <<<<<<< assert(compareFileNamesDefault('1', '1') === 0, 'numerically equal full names should be equal'); assert(compareFileNamesDefault('abc1.txt', 'abc1.txt') === 0, 'equal filenames with numbers should be equal'); assert(compareFileNamesDefault('abc1.txt', 'abc2.txt') < 0, 'filenames with numbers should be in numerical order, not alphabetical order'); assert(compareFileNamesDefault('abc2.txt', 'abc10.txt') < 0, 'filenames with numbers should be in numerical order even when they are multiple digits long'); assert(compareFileNamesDefault('abc02.txt', 'abc010.txt') < 0, 'filenames with numbers that have leading zeros sort numerically'); assert(compareFileNamesDefault('abc1.10.txt', 'abc1.2.txt') > 0, 'numbers with dots between them are treated as two separate numbers, not one decimal number'); assert(compareFileNamesDefault('a.ext1', 'b.Ext1') < 0, 'if names are different and extensions with numbers are equal except for case, filenames are sorted by name'); assert.deepEqual(['a10.txt', 'A2.txt', 'A100.txt', 'a20.txt'].sort(compareFileNamesDefault), ['A2.txt', 'a10.txt', 'a20.txt', 'A100.txt'], 'filenames with number and case differences compare numerically'); ======= assert(compareFileNamesDefault('1', '1') === 0, 'numerically equal full names should be equal'); assert(compareFileNamesDefault('abc1.txt', 'abc1.txt') === 0, 'equal filenames with numbers should be equal'); assert(compareFileNamesDefault('abc1.txt', 'abc2.txt') < 0, 'filenames with numbers should be in numerical order, not alphabetical order'); assert(compareFileNamesDefault('abc2.txt', 'abc10.txt') < 0, 'filenames with numbers should be in numerical order even when they are multiple digits long'); assert(compareFileNamesDefault('abc02.txt', 'abc010.txt') < 0, 'filenames with numbers that have leading zeros sort numerically'); assert(compareFileNamesDefault('abc1.10.txt', 'abc1.2.txt') > 0, 'numbers with dots between them are treated as two separate numbers, not one decimal number'); >>>>>>> assert(compareFileNamesDefault('1', '1') === 0, 'numerically equal full names should be equal'); assert(compareFileNamesDefault('abc1.txt', 'abc1.txt') === 0, 'equal filenames with numbers should be equal'); assert(compareFileNamesDefault('abc1.txt', 'abc2.txt') < 0, 'filenames with numbers should be in numerical order, not alphabetical order'); assert(compareFileNamesDefault('abc2.txt', 'abc10.txt') < 0, 'filenames with numbers should be in numerical order even when they are multiple digits long'); assert(compareFileNamesDefault('abc02.txt', 'abc010.txt') < 0, 'filenames with numbers that have leading zeros sort numerically'); assert(compareFileNamesDefault('abc1.10.txt', 'abc1.2.txt') > 0, 'numbers with dots between them are treated as two separate numbers, not one decimal number'); assert(compareFileNamesDefault('a.ext1', 'b.Ext1') < 0, 'if names are different and extensions with numbers are equal except for case, filenames are sorted by name'); assert.deepEqual(['a10.txt', 'A2.txt', 'A100.txt', 'a20.txt'].sort(compareFileNamesDefault), ['A2.txt', 'a10.txt', 'a20.txt', 'A100.txt'], 'filenames with number and case differences compare numerically'); <<<<<<< assert(compareFileExtensionsDefault('file.ext', 'file.ext') === 0, 'equal full filenames should be equal'); assert(compareFileExtensionsDefault('a.ext', 'b.ext') < 0, 'if equal extensions, filenames should be compared'); assert(compareFileExtensionsDefault('file.aaa', 'file.bbb') < 0, 'files with equal names should be compared by extensions'); assert(compareFileExtensionsDefault('bbb.aaa', 'aaa.bbb') < 0, 'files should be compared by extension first'); assert(compareFileExtensionsDefault('agg.go', 'aggrepo.go') < 0, 'shorter names sort before longer names'); assert(compareFileExtensionsDefault('agg.go', 'agg_repo.go') < 0, 'shorter names short before longer names even when the longer name contains an underscore'); assert(compareFileExtensionsDefault('a.MD', 'b.md') < 0, 'when extensions are the same except for case, the files sort by name'); ======= assert(compareFileExtensionsDefault('file.ext', 'file.ext') === 0, 'equal full filenames should be equal'); assert(compareFileExtensionsDefault('a.ext', 'b.ext') < 0, 'if equal extensions, filenames should be compared'); assert(compareFileExtensionsDefault('file.aaa', 'file.bbb') < 0, 'files with equal names should be compared by extensions'); assert(compareFileExtensionsDefault('bbb.aaa', 'aaa.bbb') < 0, 'files should be compared by extension first'); assert(compareFileExtensionsDefault('agg.go', 'aggrepo.go') < 0, 'shorter names sort before longer names'); assert(compareFileExtensionsDefault('a.MD', 'b.md') < 0, 'when extensions are the same except for case, the files sort by name'); >>>>>>> assert(compareFileExtensionsDefault('file.ext', 'file.ext') === 0, 'equal full filenames should be equal'); assert(compareFileExtensionsDefault('a.ext', 'b.ext') < 0, 'if equal extensions, filenames should be compared'); assert(compareFileExtensionsDefault('file.aaa', 'file.bbb') < 0, 'files with equal names should be compared by extensions'); assert(compareFileExtensionsDefault('bbb.aaa', 'aaa.bbb') < 0, 'files should be compared by extension first'); assert(compareFileExtensionsDefault('a.MD', 'b.md') < 0, 'when extensions are the same except for case, the files sort by name'); <<<<<<< assert(compareFileExtensionsDefault('1', '1') === 0, 'numerically equal full names should be equal'); assert(compareFileExtensionsDefault('abc1.txt', 'abc1.txt') === 0, 'equal filenames with numbers should be equal'); assert(compareFileExtensionsDefault('abc1.txt', 'abc2.txt') < 0, 'filenames with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('abc2.txt', 'abc10.txt') < 0, 'filenames with numbers should be in numerical order'); assert(compareFileExtensionsDefault('abc02.txt', 'abc010.txt') < 0, 'filenames with numbers that have leading zeros sort numerically'); assert(compareFileExtensionsDefault('abc1.10.txt', 'abc1.2.txt') > 0, 'numbers with dots between them are treated as two separate numbers, not one decimal number'); assert(compareFileExtensionsDefault('abc2.txt2', 'abc1.txt10') < 0, 'extensions with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('txt.abc1', 'txt.abc1') === 0, 'equal extensions with numbers should be equal'); assert(compareFileExtensionsDefault('txt.abc1', 'txt.abc2') < 0, 'extensions with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('txt.abc2', 'txt.abc10') < 0, 'extensions with numbers should be in numerical order even when they are multiple digits long'); assert(compareFileExtensionsDefault('a.ext1', 'b.ext1') < 0, 'if equal extensions with numbers, filenames should be compared'); assert.deepEqual(['a10.txt', 'A2.txt', 'A100.txt', 'a20.txt'].sort(compareFileExtensionsDefault), ['A2.txt', 'a10.txt', 'a20.txt', 'A100.txt'], 'filenames with number and case differences compare numerically'); // Same extension comparison that has the same result as compareFileExtensions, but a different result than compareFileNames // This is an edge case caused by compareFileNames comparing the whole name all at once instead of the name and then the extension. assert(compareFileExtensionsDefault('aggregate.go', 'aggregate_repo.go') < 0, 'when extensions are equal, names sort in dictionary order'); ======= assert(compareFileExtensionsDefault('1', '1') === 0, 'numerically equal full names should be equal'); assert(compareFileExtensionsDefault('abc1.txt', 'abc1.txt') === 0, 'equal filenames with numbers should be equal'); assert(compareFileExtensionsDefault('abc1.txt', 'abc2.txt') < 0, 'filenames with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('abc2.txt', 'abc10.txt') < 0, 'filenames with numbers should be in numerical order'); assert(compareFileExtensionsDefault('abc02.txt', 'abc010.txt') < 0, 'filenames with numbers that have leading zeros sort numerically'); assert(compareFileExtensionsDefault('abc1.10.txt', 'abc1.2.txt') > 0, 'numbers with dots between them are treated as two separate numbers, not one decimal number'); assert(compareFileExtensionsDefault('abc2.txt2', 'abc1.txt10') < 0, 'extensions with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('txt.abc1', 'txt.abc1') === 0, 'equal extensions with numbers should be equal'); assert(compareFileExtensionsDefault('txt.abc1', 'txt.abc2') < 0, 'extensions with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('txt.abc2', 'txt.abc10') < 0, 'extensions with numbers should be in numerical order even when they are multiple digits long'); assert(compareFileExtensionsDefault('a.ext1', 'b.ext1') < 0, 'if equal extensions with numbers, filenames should be compared'); assert(compareFileExtensionsDefault('a10.txt', 'A2.txt') > 0, 'filenames with number and case differences compare numerically'); >>>>>>> assert(compareFileExtensionsDefault('1', '1') === 0, 'numerically equal full names should be equal'); assert(compareFileExtensionsDefault('abc1.txt', 'abc1.txt') === 0, 'equal filenames with numbers should be equal'); assert(compareFileExtensionsDefault('abc1.txt', 'abc2.txt') < 0, 'filenames with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('abc2.txt', 'abc10.txt') < 0, 'filenames with numbers should be in numerical order'); assert(compareFileExtensionsDefault('abc02.txt', 'abc010.txt') < 0, 'filenames with numbers that have leading zeros sort numerically'); assert(compareFileExtensionsDefault('abc1.10.txt', 'abc1.2.txt') > 0, 'numbers with dots between them are treated as two separate numbers, not one decimal number'); assert(compareFileExtensionsDefault('abc2.txt2', 'abc1.txt10') < 0, 'extensions with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('txt.abc1', 'txt.abc1') === 0, 'equal extensions with numbers should be equal'); assert(compareFileExtensionsDefault('txt.abc1', 'txt.abc2') < 0, 'extensions with numbers should be in numerical order, not alphabetical order'); assert(compareFileExtensionsDefault('txt.abc2', 'txt.abc10') < 0, 'extensions with numbers should be in numerical order even when they are multiple digits long'); assert(compareFileExtensionsDefault('a.ext1', 'b.ext1') < 0, 'if equal extensions with numbers, filenames should be compared'); assert.deepEqual(['a10.txt', 'A2.txt', 'A100.txt', 'a20.txt'].sort(compareFileExtensionsDefault), ['A2.txt', 'a10.txt', 'a20.txt', 'A100.txt'], 'filenames with number and case differences compare numerically'); <<<<<<< assert(compareFileExtensionsDefault('a.MD', 'a.md') === compareLocale('MD', 'md'), 'case differences in extensions sort by locale'); assert(compareFileExtensionsDefault('a.md', 'A.md') === compareLocale('a', 'A'), 'case differences in names sort by locale'); ======= assert(compareFileExtensionsDefault('a.MD', 'a.md') === compareLocale('MD', 'md'), 'case differences in extensions sort by locale'); assert(compareFileExtensionsDefault('a.md', 'A.md') === compareLocale('a', 'A'), 'case differences in names sort by locale'); assert(compareFileExtensionsDefault('aggregate.go', 'aggregate_repo.go') > 0, 'names with the same extension sort in full filename locale order'); >>>>>>> assert(compareFileExtensionsDefault('a.MD', 'a.md') === compareLocale('MD', 'md'), 'case differences in extensions sort by locale'); assert(compareFileExtensionsDefault('a.md', 'A.md') === compareLocale('a', 'A'), 'case differences in names sort by locale'); assert(compareFileExtensionsDefault('aggregate.go', 'aggregate_repo.go') > 0, 'names with the same extension sort in full filename locale order'); <<<<<<< assert(compareFileExtensionsDefault('abc.txt01', 'abc.txt1') > 0, 'extensions with equal numbers should be in shortest-first order'); assert(compareFileExtensionsDefault('art01', 'Art01') === compareLocaleNumeric('art01', 'Art01'), 'a numerically equivalent word of a different case compares numerically based on locale'); assert(compareFileExtensionsDefault('abc02.txt', 'abc002.txt') < 0, 'filenames with equivalent numbers and leading zeros sort shortest string first'); assert(compareFileExtensionsDefault('txt.abc01', 'txt.abc1') > 0, 'extensions with equivalent numbers sort shortest extension first'); assert(compareFileExtensionsDefault('a.ext1', 'b.Ext1') === compareLocale('ext1', 'Ext1'), 'if names are different and extensions with numbers are equal except for case, filenames are sorted in extension locale order'); assert(compareFileExtensionsDefault('a.ext1', 'a.Ext1') === compareLocale('ext1', 'Ext1'), 'if names are equal and extensions with numbers are equal except for case, filenames are sorted in extension locale order'); ======= assert(compareFileExtensionsDefault('abc.txt01', 'abc.txt1') > 0, 'extensions with equal numbers should be in shortest-first order'); assert(compareFileExtensionsDefault('art01', 'Art01') === compareLocaleNumeric('art01', 'Art01'), 'a numerically equivalent word of a different case compares numerically based on locale'); assert(compareFileExtensionsDefault('abc02.txt', 'abc002.txt') < 0, 'filenames with equivalent numbers and leading zeros sort shortest string first'); assert(compareFileExtensionsDefault('txt.abc01', 'txt.abc1') > 0, 'extensions with equivalent numbers sort shortest extension first'); >>>>>>> assert(compareFileExtensionsDefault('abc.txt01', 'abc.txt1') > 0, 'extensions with equal numbers should be in shortest-first order'); assert(compareFileExtensionsDefault('art01', 'Art01') === compareLocaleNumeric('art01', 'Art01'), 'a numerically equivalent word of a different case compares numerically based on locale'); assert(compareFileExtensionsDefault('abc02.txt', 'abc002.txt') < 0, 'filenames with equivalent numbers and leading zeros sort shortest string first'); assert(compareFileExtensionsDefault('txt.abc01', 'txt.abc1') > 0, 'extensions with equivalent numbers sort shortest extension first'); assert(compareFileExtensionsDefault('a.ext1', 'b.Ext1') === compareLocale('ext1', 'Ext1'), 'if names are different and extensions with numbers are equal except for case, filenames are sorted in extension locale order'); assert(compareFileExtensionsDefault('a.ext1', 'a.Ext1') === compareLocale('ext1', 'Ext1'), 'if names are equal and extensions with numbers are equal except for case, filenames are sorted in extension locale order');
<<<<<<< await this.exec(args, options); ======= await this.run(args, { cancellationToken: options.cancellationToken, env: { 'GIT_HTTP_USER_AGENT': this.git.userAgent } }); >>>>>>> await this.exec(args, { cancellationToken: options.cancellationToken, env: { 'GIT_HTTP_USER_AGENT': this.git.userAgent } }); <<<<<<< await this.exec(args); ======= await this.run(args, { env: { 'GIT_HTTP_USER_AGENT': this.git.userAgent } }); >>>>>>> await this.exec(args, { env: { 'GIT_HTTP_USER_AGENT': this.git.userAgent } });
<<<<<<< const activeContrastBorderColor = theme.getColor(activeContrastBorder); if (activeContrastBorderColor) { collector.addRule(` .monaco-workbench .search-view .findInFileMatch { border: 1px dashed ${activeContrastBorderColor}; } `); ======= const findMatchHighlightBorder = theme.getColor(editorFindMatchHighlightBorder); if (findMatchHighlightBorder) { collector.addRule(`.monaco-workbench .search-viewlet .findInFileMatch { border: 1px dashed ${findMatchHighlightBorder}; }`); >>>>>>> const findMatchHighlightBorder = theme.getColor(editorFindMatchHighlightBorder); if (findMatchHighlightBorder) { collector.addRule(`.monaco-workbench .search-view .findInFileMatch { border: 1px dashed ${findMatchHighlightBorder}; }`);
<<<<<<< return Promise.resolve(null); ======= this.tree.refresh(stat, false).then(() => { this.tree.setHighlight(stat); const unbind = this.tree.onDidChangeHighlight((e: IHighlightEvent) => { if (!e.highlight) { viewletState.clearEditable(stat); this.tree.refresh(stat); unbind.dispose(); } }); }); return undefined; } } export abstract class BaseRenameAction extends BaseFileAction { constructor( id: string, label: string, element: ExplorerItem, @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super(id, label, fileService, notificationService, textFileService); this.element = element; } _isEnabled(): boolean { return super._isEnabled() && this.element && !this.element.isReadonly; } public run(context?: any): Promise<any> { if (!context) { return Promise.reject(new Error('No context provided to BaseRenameFileAction.')); } let name = <string>context.value; if (!name) { return Promise.reject(new Error('No new name provided to BaseRenameFileAction.')); } // Automatically trim whitespaces and trailing dots to produce nice file names name = getWellFormedFileName(name); const existingName = getWellFormedFileName(this.element.name); // Return early if name is invalid or didn't change if (name === existingName || this.validateFileName(this.element.parent, name)) { return Promise.resolve(null); } // Call function and Emit Event through viewer const promise = this.runAction(name).then(undefined, (error: any) => { this.onError(error); }); return promise; } public validateFileName(parent: ExplorerItem, name: string): string { let source = this.element.name; let target = name; if (!isLinux) { // allow rename of same file also when case differs (e.g. Game.js => game.js) source = source.toLowerCase(); target = target.toLowerCase(); } if (getWellFormedFileName(source) === getWellFormedFileName(target)) { return null; } return validateFileName(parent, name); } public abstract runAction(newName: string): Promise<any>; } class RenameFileAction extends BaseRenameAction { public static readonly ID = 'workbench.files.action.renameFile'; constructor( element: ExplorerItem, @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super(RenameFileAction.ID, nls.localize('rename', "Rename"), element, fileService, notificationService, textFileService); this._updateEnablement(); } public runAction(newName: string): Promise<any> { const parentResource = this.element.parent.resource; const targetResource = resources.joinPath(parentResource, newName); return this.textFileService.move(this.element.resource, targetResource); >>>>>>> return Promise.resolve(null); <<<<<<< class BaseDeleteFileAction extends BaseErrorReportingAction { ======= /* Create New File/Folder (only used internally by explorerViewer) */ export abstract class BaseCreateAction extends BaseRenameAction { public validateFileName(parent: ExplorerItem, name: string): string { if (this.element instanceof NewStatPlaceholder) { return validateFileName(parent, name); } return super.validateFileName(parent, name); } } /* Create New File (only used internally by explorerViewer) */ class CreateFileAction extends BaseCreateAction { public static readonly ID = 'workbench.files.action.createFileFromExplorer'; public static readonly LABEL = nls.localize('createNewFile', "New File"); constructor( element: ExplorerItem, @IFileService fileService: IFileService, @IEditorService private editorService: IEditorService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super(CreateFileAction.ID, CreateFileAction.LABEL, element, fileService, notificationService, textFileService); this._updateEnablement(); } public runAction(fileName: string): Promise<any> { const resource = this.element.parent.resource; return this.fileService.createFile(resources.joinPath(resource, fileName)).then(stat => { return this.editorService.openEditor({ resource: stat.resource, options: { pinned: true } }); }, (error) => { this.onErrorWithRetry(error, () => this.runAction(fileName)); }); } } /* Create New Folder (only used internally by explorerViewer) */ class CreateFolderAction extends BaseCreateAction { public static readonly ID = 'workbench.files.action.createFolderFromExplorer'; public static readonly LABEL = nls.localize('createNewFolder', "New Folder"); constructor( element: ExplorerItem, @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super(CreateFolderAction.ID, CreateFolderAction.LABEL, null, fileService, notificationService, textFileService); this._updateEnablement(); } public runAction(fileName: string): Promise<any> { const resource = this.element.parent.resource; return this.fileService.createFolder(resources.joinPath(resource, fileName)).then(undefined, (error) => { this.onErrorWithRetry(error, () => this.runAction(fileName)); }); } } class BaseDeleteFileAction extends BaseFileAction { >>>>>>> class BaseDeleteFileAction extends BaseErrorReportingAction { <<<<<<< this.skipConfirm = true; return this.run(); } return Promise.resolve(void 0); }); ======= return Promise.resolve(undefined); >>>>>>> this.skipConfirm = true; return this.run(); } return Promise.resolve(undefined); }); <<<<<<< return void 0; ======= return undefined; }, error => this.onError(error)).then(() => { this.tree.domFocus(); >>>>>>> return undefined; <<<<<<< ======= // Duplicate File/Folder export class DuplicateFileAction extends BaseFileAction { private tree: ITree; private target: ExplorerItem; constructor( tree: ITree, fileToDuplicate: ExplorerItem, target: ExplorerItem, @IFileService fileService: IFileService, @IEditorService private editorService: IEditorService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { super('workbench.files.action.duplicateFile', nls.localize('duplicateFile', "Duplicate"), fileService, notificationService, textFileService); this.tree = tree; this.element = fileToDuplicate; this.target = (target && target.isDirectory) ? target : fileToDuplicate.parent; this._updateEnablement(); } public run(): Promise<any> { // Remove highlight if (this.tree) { this.tree.clearHighlight(); } // Copy File const result = this.fileService.copyFile(this.element.resource, findValidPasteFileTarget(this.target, { resource: this.element.resource, isDirectory: this.element.isDirectory })).then(stat => { if (!stat.isDirectory) { return this.editorService.openEditor({ resource: stat.resource, options: { pinned: true } }); } return undefined; }, error => this.onError(error)); return result; } } >>>>>>>
<<<<<<< export class CreateNewTerminalAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.NEW; public static readonly LABEL = localize('workbench.action.terminal.new', "Create New Integrated Terminal"); public static readonly SHORT_LABEL = localize('workbench.action.terminal.new.short', "New Terminal"); constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService, @ICommandService private readonly _commandService: ICommandService, @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService ) { super(id, label, 'terminal-action ' + ThemeIcon.asClassName(newTerminalIcon)); } async run(event?: any) { const folders = this._workspaceContextService.getWorkspace().folders; if (event instanceof MouseEvent && (event.altKey || event.ctrlKey)) { const activeInstance = this._terminalService.getActiveInstance(); if (activeInstance) { const cwd = await getCwdForSplit(this._terminalService.configHelper, activeInstance); this._terminalService.splitInstance(activeInstance, { cwd }); return; } } if (this._terminalService.isProcessSupportRegistered) { let instance: ITerminalInstance | undefined; if (folders.length <= 1) { // Allow terminal service to handle the path when there is only a // single root instance = this._terminalService.createTerminal(undefined); } else { const options: IPickOptions<IQuickPickItem> = { placeHolder: localize('workbench.action.terminal.newWorkspacePlaceholder', "Select current working directory for new terminal") }; const workspace = await this._commandService.executeCommand(PICK_WORKSPACE_FOLDER_COMMAND_ID, [options]); if (!workspace) { // Don't create the instance if the workspace picker was canceled return; } instance = this._terminalService.createTerminal({ cwd: workspace.uri }); } this._terminalService.setActiveInstance(instance); } await this._terminalService.showPanel(true); } } export class SplitTerminalAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.SPLIT; public static readonly LABEL = localize('workbench.action.terminal.split', "Split Terminal"); public static readonly SHORT_LABEL = localize('workbench.action.terminal.split.short', "Split"); public static readonly HORIZONTAL_CLASS = 'terminal-action ' + Codicon.splitHorizontal.classNames; public static readonly VERTICAL_CLASS = 'terminal-action ' + Codicon.splitVertical.classNames; constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService, @ICommandService private readonly _commandService: ICommandService, @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService ) { super(id, label, SplitTerminalAction.HORIZONTAL_CLASS); } public async run(): Promise<any> { await this._terminalService.doWithActiveInstance(async t => { const cwd = await getCwdForSplit(this._terminalService.configHelper, t, this._workspaceContextService.getWorkspace().folders, this._commandService); if (cwd === undefined) { return undefined; } this._terminalService.splitInstance(t, { cwd }); return this._terminalService.showPanel(true); }); } } export class SplitInActiveWorkspaceTerminalAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.SPLIT_IN_ACTIVE_WORKSPACE; public static readonly LABEL = localize('workbench.action.terminal.splitInActiveWorkspace', "Split Terminal (In Active Workspace)"); constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService ) { super(id, label); } async run() { await this._terminalService.doWithActiveInstance(async t => { const cwd = await getCwdForSplit(this._terminalService.configHelper, t); this._terminalService.splitInstance(t, { cwd }); await this._terminalService.showPanel(true); }); } } export class TerminalPasteAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.PASTE; public static readonly LABEL = localize('workbench.action.terminal.paste', "Paste into Active Terminal"); public static readonly SHORT_LABEL = localize('workbench.action.terminal.paste.short', "Paste"); constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService ) { super(id, label); } async run() { this._terminalService.getActiveOrCreateInstance()?.paste(); } } export class TerminalPasteSelectionAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.PASTE_SELECTION; public static readonly LABEL = localize(TerminalPasteSelectionAction.ID, "Paste selection into Active Terminal"); public static readonly SHORT_LABEL = localize(`${TerminalPasteSelectionAction.ID}.short`, "Paste Selection"); constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService ) { super(id, label); } async run() { this._terminalService.getActiveOrCreateInstance()?.pasteSelection(); } } export class SelectDefaultShellWindowsTerminalAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.SELECT_DEFAULT_SHELL; public static readonly LABEL = localize('workbench.action.terminal.selectDefaultShell', "Select Default Shell"); constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService ) { super(id, label); } async run() { this._terminalService.selectDefaultShell(); } } export class ConfigureTerminalSettingsAction extends Action { public static readonly ID = TERMINAL_COMMAND_ID.CONFIGURE_TERMINAL_SETTINGS; public static readonly LABEL = localize('workbench.action.terminal.openSettings', "Configure Terminal Settings"); constructor( id: string, label: string, @IPreferencesService private readonly _preferencesService: IPreferencesService ) { super(id, label); } async run() { this._preferencesService.openSettings(false, '@feature:terminal'); } } ======= >>>>>>>
<<<<<<< stickiness?: TrackedRangeStickiness; backgroundColor?: string; ======= backgroundColor?: string | ThemeColor; >>>>>>> stickiness?: TrackedRangeStickiness; backgroundColor?: string | ThemeColor;
<<<<<<< import {EditorStacksModel, EditorGroup, IEditorIdentifier} from 'vs/workbench/common/editor/editorStacksModel'; ======= import {IDisposable, dispose} from 'vs/base/common/lifecycle'; >>>>>>> import {EditorStacksModel, EditorGroup, IEditorIdentifier} from 'vs/workbench/common/editor/editorStacksModel'; import {IDisposable, dispose} from 'vs/base/common/lifecycle'; <<<<<<< ======= private visibleInputListeners: IDisposable[]; >>>>>>> <<<<<<< private visibleEditorListeners: Function[][]; ======= private visibleEditorListeners: IDisposable[][]; >>>>>>> private visibleEditorListeners: IDisposable[][]; <<<<<<< return instantiateEditorPromise; } ======= // Register as Emitter to Workbench Bus this.visibleEditorListeners[position].push(this.eventService.addEmitter2(this.visibleEditors[position], this.visibleEditors[position].getId())); >>>>>>> return instantiateEditorPromise; } <<<<<<< return lastActiveEditor ? lastActiveEditor.input : null; } public getActiveEditor(): BaseEditor { if (!this.sideBySideControl) { return null; // too early } ======= // Clear Listeners this.visibleEditorListeners[position] = dispose(this.visibleEditorListeners[position]); >>>>>>> return lastActiveEditor ? lastActiveEditor.input : null; } public getActiveEditor(): BaseEditor { if (!this.sideBySideControl) { return null; // too early } <<<<<<< const focusListener = this.sideBySideControl.onGroupFocusChanged(() => this.onGroupFocusChanged()); this.toUnbind.push(() => focusListener.dispose()); const titleClickListener = this.sideBySideControl.onEditorTitleDoubleclick((position) => this.onEditorTitleDoubleclick(position)); this.toUnbind.push(() => titleClickListener.dispose()); ======= this.toUnbind.push(this.sideBySideControl.addListener2(SideBySideEventType.EDITOR_FOCUS_CHANGED, () => { this.onEditorFocusChanged(); })); >>>>>>> this.toUnbind.push(this.sideBySideControl.onGroupFocusChanged(() => this.onGroupFocusChanged())); this.toUnbind.push(this.sideBySideControl.onEditorTitleDoubleclick((position) => this.onEditorTitleDoubleclick(position))); <<<<<<< ======= // Input listeners for (let i = 0; i < this.visibleInputListeners.length; i++) { let listener = this.visibleInputListeners[i]; if (listener) { listener.dispose(); } this.visibleInputListeners = []; } >>>>>>>
<<<<<<< const recentFilesPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inRecentFilesPickerContextKey)); const quickOpenNavigateNextInRecentFilesPickerId = 'workbench.action.quickOpenNavigateNextInRecentFilesPicker'; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: quickOpenNavigateNextInRecentFilesPickerId, weight: KeybindingWeight.WorkbenchContrib + 50, handler: getQuickNavigateHandler(quickOpenNavigateNextInRecentFilesPickerId, true), when: recentFilesPickerContext, primary: KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }); const quickOpenNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker'; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: quickOpenNavigatePreviousInRecentFilesPicker, weight: KeybindingWeight.WorkbenchContrib + 50, handler: getQuickNavigateHandler(quickOpenNavigatePreviousInRecentFilesPicker, false), when: recentFilesPickerContext, primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R } }); MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: REVEAL_IN_OS_COMMAND_ID, title: REVEAL_IN_OS_LABEL }, when: ResourceContextKey.Scheme.isEqualTo(Schemas.file), group: '2_files' }); MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: REVEAL_IN_OS_COMMAND_ID, title: REVEAL_IN_OS_LABEL }, when: ResourceContextKey.Scheme.isEqualTo(Schemas.userData), group: '2_files' }); ======= >>>>>>> MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: REVEAL_IN_OS_COMMAND_ID, title: REVEAL_IN_OS_LABEL }, when: ResourceContextKey.Scheme.isEqualTo(Schemas.file), group: '2_files' }); MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: REVEAL_IN_OS_COMMAND_ID, title: REVEAL_IN_OS_LABEL }, when: ResourceContextKey.Scheme.isEqualTo(Schemas.userData), group: '2_files' });
<<<<<<< readonly onWindowOpen: Event<number> = fromNodeEventEmitter(app, 'browser-window-created', (_, w: Electron.BrowserWindow) => w.id); readonly onWindowFocus: Event<number> = fromNodeEventEmitter(app, 'browser-window-focus', (_, w: Electron.BrowserWindow) => w.id); readonly onWindowBlur: Event<number> = fromNodeEventEmitter(app, 'browser-window-blur', (_, w: Electron.BrowserWindow) => w.id); readonly onWindowMaximize: Event<number> = fromNodeEventEmitter(app, 'browser-window-maximize', (_, w: Electron.BrowserWindow) => w.id); readonly onWindowUnmaximize: Event<number> = fromNodeEventEmitter(app, 'browser-window-unmaximize', (_, w: Electron.BrowserWindow) => w.id); ======= readonly onWindowOpen: Event<number> = filterEvent(fromNodeEventEmitter(app, 'browser-window-created', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)); readonly onWindowFocus: Event<number> = anyEvent( mapEvent(filterEvent(mapEvent(this.windowsMainService.onWindowsCountChanged, () => this.windowsMainService.getLastActiveWindow()), w => !!w), w => w.id), filterEvent(fromNodeEventEmitter(app, 'browser-window-focus', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)) ); readonly onWindowBlur: Event<number> = filterEvent(fromNodeEventEmitter(app, 'browser-window-blur', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)); >>>>>>> readonly onWindowOpen: Event<number> = filterEvent(fromNodeEventEmitter(app, 'browser-window-created', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)); readonly onWindowFocus: Event<number> = anyEvent( mapEvent(filterEvent(mapEvent(this.windowsMainService.onWindowsCountChanged, () => this.windowsMainService.getLastActiveWindow()), w => !!w), w => w.id), filterEvent(fromNodeEventEmitter(app, 'browser-window-focus', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)) ); readonly onWindowBlur: Event<number> = filterEvent(fromNodeEventEmitter(app, 'browser-window-blur', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)); readonly onWindowMaximize: Event<number> = filterEvent(fromNodeEventEmitter(app, 'browser-window-maximize', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id)); readonly onWindowUnmaximize: Event<number> = filterEvent(fromNodeEventEmitter(app, 'browser-window-unmaximize', (_, w: Electron.BrowserWindow) => w.id), id => !!this.windowsMainService.getWindowById(id));
<<<<<<< import { Codicon, CSSIcon, registerIcon } from 'vs/base/common/codicons'; ======= import { Codicon, registerCodicon } from 'vs/base/common/codicons'; >>>>>>> import { Codicon, CSSIcon, registerCodicon } from 'vs/base/common/codicons';
<<<<<<< // #region Sandy - User data synchronization export namespace window { export function registerUserDataProvider(name: string, userDataProvider: UserDataProvider): Disposable; } export class UserDataError extends Error { static VersionExists(): FileSystemError; /** * Creates a new userData error. */ constructor(); } export interface UserDataProvider { read(key: string): Promise<{ version: number, content: string } | null>; write(key: string, version: number, content: string): Promise<void>; } //#endregion ======= //#region Custom editors, mjbvz export interface WebviewEditor extends WebviewPanel { } export interface WebviewEditorProvider { /** * Fills out a `WebviewEditor` for a given resource. * * The provider should take ownership of passed in `editor`. */ resolveWebviewEditor( resource: Uri, editor: WebviewEditor ): Thenable<void>; } namespace window { export function registerWebviewEditorProvider( viewType: string, provider: WebviewEditorProvider, ): Disposable; } //#endregion >>>>>>> //#region Custom editors, mjbvz export interface WebviewEditor extends WebviewPanel { } export interface WebviewEditorProvider { /** * Fills out a `WebviewEditor` for a given resource. * * The provider should take ownership of passed in `editor`. */ resolveWebviewEditor( resource: Uri, editor: WebviewEditor ): Thenable<void>; } namespace window { export function registerWebviewEditorProvider( viewType: string, provider: WebviewEditorProvider, ): Disposable; } //#endregion // #region Sandy - User data synchronization export namespace window { export function registerUserDataProvider(name: string, userDataProvider: UserDataProvider): Disposable; } export class UserDataError extends Error { static VersionExists(): FileSystemError; /** * Creates a new userData error. */ constructor(); } export interface UserDataProvider { read(key: string): Promise<{ version: number, content: string } | null>; write(key: string, version: number, content: string): Promise<void>; } //#endregion
<<<<<<< registerNotebookKernelProvider(extension: IExtensionDescription, selector: vscode.NotebookDocumentFilter, provider: vscode.NotebookKernelProvider) { const handle = ExtHostNotebookController._notebookKernelProviderHandlePool++; const adapter = new ExtHostNotebookKernelProviderAdapter(this._notebookProxy, handle, extension, provider); this._notebookKernelProviders.set(handle, adapter); this._notebookProxy.$registerNotebookKernelProvider({ id: extension.identifier, location: extension.extensionLocation, description: extension.description }, handle, { viewType: selector.viewType, filenamePattern: selector.filenamePattern ? typeConverters.NotebookExclusiveDocumentPattern.from(selector.filenamePattern) : undefined }); return new extHostTypes.Disposable(() => { adapter.dispose(); this._notebookKernelProviders.delete(handle); this._notebookProxy.$unregisterNotebookKernelProvider(handle); }); } registerNotebookCellStatusBarItemProvider(extension: IExtensionDescription, selector: vscode.NotebookSelector, provider: vscode.NotebookCellStatusBarItemProvider) { ======= registerNotebookCellStatusBarItemProvider(extension: IExtensionDescription, selector: vscode.NotebookDocumentFilter, provider: vscode.NotebookCellStatusBarItemProvider) { >>>>>>> registerNotebookCellStatusBarItemProvider(extension: IExtensionDescription, selector: vscode.NotebookSelector, provider: vscode.NotebookCellStatusBarItemProvider) {
<<<<<<< this._styleSheet = dom.createStyleSheet(); this._decorationOptionProviders = Object.create(null); ======= this._styleSheet = styleSheet; this._decorationRenderOptions = Object.create(null); >>>>>>> this._styleSheet = styleSheet; this._decorationOptionProviders = Object.create(null); <<<<<<< contentText: 'content:\'{0}\';', contentIconPath: 'content:url(\'{0}\')', margin: 'margin:{0};', width: 'width:{0};', height: 'height:{0};' ======= gutterIconSize: 'background-size:{0};', >>>>>>> gutterIconSize: 'background-size:{0};', contentText: 'content:\'{0}\';', contentIconPath: 'content:url(\'{0}\')', margin: 'margin:{0};', width: 'width:{0};', height: 'height:{0};'
<<<<<<< import { CancellationToken, Progress, Uri, workspace } from 'vscode'; import { URI } from 'vscode-uri'; ======= import { CancellationToken, Progress, Uri } from 'vscode'; >>>>>>> import { CancellationToken, Progress, Uri, workspace } from 'vscode';
<<<<<<< /** * This is a convenience type so you can check .properties on the items in the Record without having TypeScript throw a compiler error. That's because this Record can't have enums in it. If you want that, then just use the base interface */ export interface RefObjectModels extends TsoaRoute.Models { [refNames: string]: TsoaRoute.RefObjectModelSchema; } export interface RefEnumModelSchema { dataType: 'refEnum'; enums: string[] | number[]; } export interface RefObjectModelSchema { dataType: 'refObject'; properties: { [name: string]: PropertySchema }; ======= export interface ModelSchema { enums?: Array<string | number>; properties?: { [name: string]: PropertySchema }; >>>>>>> /** * This is a convenience type so you can check .properties on the items in the Record without having TypeScript throw a compiler error. That's because this Record can't have enums in it. If you want that, then just use the base interface */ export interface RefObjectModels extends TsoaRoute.Models { [refNames: string]: TsoaRoute.RefObjectModelSchema; } export interface RefEnumModelSchema { dataType: 'refEnum'; enums: Array<string | number>; } export interface RefObjectModelSchema { dataType: 'refObject'; properties: { [name: string]: PropertySchema };
<<<<<<< import {IConfigurationService, getConfigurationValue, IConfigurationValue} from 'vs/platform/configuration/common/configuration'; import {IStorageService, StorageScope} from 'vs/platform/storage/common/storage'; import {IBackupService} from 'vs/platform/backup/common/backup'; import {IQuickOpenService} from 'vs/workbench/services/quickopen/common/quickOpenService'; import {IPartService} from 'vs/workbench/services/part/common/partService'; import {IEditorInput, IEditorOptions, IEditorModel, Position, Direction, IEditor, IResourceInput, ITextEditorModel} from 'vs/platform/editor/common/editor'; import {IEventService} from 'vs/platform/event/common/event'; import {IUntitledEditorService, UntitledEditorService} from 'vs/workbench/services/untitled/common/untitledEditorService'; import {IMessageService, IConfirmation} from 'vs/platform/message/common/message'; import {IWorkspace, IWorkspaceContextService} from 'vs/platform/workspace/common/workspace'; import {ILifecycleService, ShutdownEvent} from 'vs/platform/lifecycle/common/lifecycle'; import {EditorStacksModel} from 'vs/workbench/common/editor/editorStacksModel'; import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection'; import {InstantiationService} from 'vs/platform/instantiation/common/instantiationService'; import {IEditorGroupService, GroupArrangement} from 'vs/workbench/services/group/common/groupService'; import {TextFileService} from 'vs/workbench/services/textfile/browser/textFileService'; import {IFileService, IResolveContentOptions, IFileOperationResult} from 'vs/platform/files/common/files'; import {IModelService} from 'vs/editor/common/services/modelService'; import {ModelServiceImpl} from 'vs/editor/common/services/modelServiceImpl'; import {IRawTextContent, ITextFileService} from 'vs/workbench/services/textfile/common/textfiles'; import {RawText} from 'vs/editor/common/model/textModel'; import {parseArgs} from 'vs/platform/environment/node/argv'; import {EnvironmentService} from 'vs/platform/environment/node/environmentService'; import {IModeService} from 'vs/editor/common/services/modeService'; import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService'; import {IHistoryService} from 'vs/workbench/services/history/common/history'; import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation'; ======= import { IConfigurationService, getConfigurationValue, IConfigurationValue } from 'vs/platform/configuration/common/configuration'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IQuickOpenService } from 'vs/workbench/services/quickopen/common/quickOpenService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorInput, IEditorOptions, IEditorModel, Position, Direction, IEditor, IResourceInput, ITextEditorModel } from 'vs/platform/editor/common/editor'; import { IEventService } from 'vs/platform/event/common/event'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ILifecycleService, ShutdownEvent } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/group/common/groupService'; import { TextFileService } from 'vs/workbench/services/textfile/browser/textFileService'; import { IFileService, IResolveContentOptions, IFileOperationResult } from 'vs/platform/files/common/files'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { IRawTextContent, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { RawText } from 'vs/editor/common/model/textModel'; import { parseArgs } from 'vs/platform/environment/node/argv'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; >>>>>>> import {IBackupService} from 'vs/platform/backup/common/backup'; import { IConfigurationService, getConfigurationValue, IConfigurationValue } from 'vs/platform/configuration/common/configuration'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IQuickOpenService } from 'vs/workbench/services/quickopen/common/quickOpenService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorInput, IEditorOptions, IEditorModel, Position, Direction, IEditor, IResourceInput, ITextEditorModel } from 'vs/platform/editor/common/editor'; import { IEventService } from 'vs/platform/event/common/event'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ILifecycleService, ShutdownEvent } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/group/common/groupService'; import { TextFileService } from 'vs/workbench/services/textfile/browser/textFileService'; import { IFileService, IResolveContentOptions, IFileOperationResult } from 'vs/platform/files/common/files'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { IRawTextContent, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { RawText } from 'vs/editor/common/model/textModel'; import { parseArgs } from 'vs/platform/environment/node/argv'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
<<<<<<< // Spawn shared process after a while const sharedProcessSpawn = this._register(new RunOnceScheduler(() => this.sharedProcess.spawn(), 3000)); sharedProcessSpawn.schedule(); ======= // Start shared process after a while const sharedProcess = new RunOnceScheduler(() => getShellEnvironment().then(userEnv => this.sharedProcess.spawn(userEnv)), 3000); sharedProcess.schedule(); this._register(sharedProcess); >>>>>>> // Spawn shared process after a while const sharedProcess = this._register(new RunOnceScheduler(() => getShellEnvironment().then(userEnv => this.sharedProcess.spawn(userEnv)), 3000)); sharedProcessSpawn.schedule();
<<<<<<< import { CellDiffSideBySideRenderTemplate, CellDiffSingleSideRenderTemplate, CellDiffViewModelLayoutChangeEvent, DIFF_CELL_MARGIN, INotebookTextDiffEditor } from 'vs/workbench/contrib/notebook/browser/diff/common'; import { EDITOR_BOTTOM_PADDING, EDITOR_TOP_PADDING } from 'vs/workbench/contrib/notebook/browser/constants'; ======= import { CellDiffRenderTemplate, CellDiffViewModelLayoutChangeEvent, DIFF_CELL_MARGIN, INotebookTextDiffEditor } from 'vs/workbench/contrib/notebook/browser/diff/common'; import { EDITOR_BOTTOM_PADDING } from 'vs/workbench/contrib/notebook/browser/constants'; >>>>>>> import { CellDiffSideBySideRenderTemplate, CellDiffSingleSideRenderTemplate, CellDiffViewModelLayoutChangeEvent, DIFF_CELL_MARGIN, INotebookTextDiffEditor } from 'vs/workbench/contrib/notebook/browser/diff/common'; import { EDITOR_BOTTOM_PADDING } from 'vs/workbench/contrib/notebook/browser/constants'; <<<<<<< import { Delayer } from 'vs/base/common/async'; ======= import { CodiconActionViewItem } from 'vs/workbench/contrib/notebook/browser/view/renderers/cellActionView'; import { getEditorTopPadding } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { collapsedIcon, expandedIcon } from 'vs/workbench/contrib/notebook/browser/notebookIcons'; import { renderCodicons } from 'vs/base/browser/codicons'; >>>>>>> import { Delayer } from 'vs/base/common/async'; import { CodiconActionViewItem } from 'vs/workbench/contrib/notebook/browser/view/renderers/cellActionView'; import { getEditorTopPadding } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { collapsedIcon, expandedIcon } from 'vs/workbench/contrib/notebook/browser/notebookIcons'; import { renderCodicons } from 'vs/base/browser/codicons'; <<<<<<< ignoreTrimWhitespace: false, automaticLayout: false, dimension: { height: 0, width: 0 } }, {}); ======= ignoreTrimWhitespace: false }); this._register(this._metadataEditor); >>>>>>> ignoreTrimWhitespace: false, automaticLayout: false, dimension: { height: 0, width: 0 } }, {}); this._register(this._metadataEditor); <<<<<<< ignoreTrimWhitespace: false, automaticLayout: false, dimension: { height: 0, width: 0 } }, {}); ======= ignoreTrimWhitespace: false }); this._register(this._outputEditor); >>>>>>> ignoreTrimWhitespace: false, automaticLayout: false, dimension: { height: 0, width: 0 } }, {}); this._register(this._outputEditor); <<<<<<< ======= dispose() { this._isDisposed = true; super.dispose(); } abstract initData(): void; >>>>>>> dispose() { this._isDisposed = true; super.dispose(); } <<<<<<< ======= this._editor = this.instantiationService.createInstance(CodeEditorWidget, editorContainer, { ...fixedEditorOptions, dimension: { width: (this.notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN) / 2 - 18, height: editorHeight }, overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode() }, {}); this._register(this._editor); >>>>>>> <<<<<<< const editorHeight = lineCount * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING; ======= const editorHeight = lineCount * lineHeight + getEditorTopPadding() + EDITOR_BOTTOM_PADDING; const editorContainer = DOM.append(sourceContainer, DOM.$('.editor-container')); >>>>>>> const editorHeight = lineCount * lineHeight + getEditorTopPadding() + EDITOR_BOTTOM_PADDING; <<<<<<< } ); this._editor.updateOptions({ readOnly: false }); ======= }, overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(), readOnly: false }, {}); this._register(this._editor); >>>>>>> } ); this._editor.updateOptions({ readOnly: false }); <<<<<<< const editorHeight = lineCount * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING; this._editorContainer = this.templateData.editorContainer; this._editor = this.templateData.sourceEditor; ======= const editorHeight = lineCount * lineHeight + getEditorTopPadding() + EDITOR_BOTTOM_PADDING; this._editorContainer = DOM.append(sourceContainer, DOM.$('.editor-container')); this._editor = this.instantiationService.createInstance(DiffEditorWidget, this._editorContainer, { ...fixedDiffEditorOptions, overflowWidgetsDomNode: this.notebookEditor.getOverflowContainerDomNode(), originalEditable: false, ignoreTrimWhitespace: false }); this._register(this._editor); >>>>>>> const editorHeight = lineCount * lineHeight + getEditorTopPadding() + EDITOR_BOTTOM_PADDING; this._editorContainer = this.templateData.editorContainer; this._editor = this.templateData.sourceEditor;
<<<<<<< import { ExtHostComments } from './extHostComments'; ======= import { ExtHostSearch } from './extHostSearch'; import { ExtHostUrls } from './extHostUrls'; >>>>>>> import { ExtHostComments } from './extHostComments'; import { ExtHostSearch } from './extHostSearch'; import { ExtHostUrls } from './extHostUrls'; <<<<<<< return extHostFileSystem.registerSearchProvider(scheme, provider); }), registerDocumentCommentProvider: proposedApiFunction(extension, (provider: vscode.DocumentCommentProvider) => { return exthostCommentProviders.registerDocumentCommentProvider(provider); }), registerWorkspaceCommentProvider: proposedApiFunction(extension, (provider: vscode.WorkspaceCommentProvider) => { return exthostCommentProviders.registerWorkspaceCommentProvider(provider); ======= return extHostSearch.registerSearchProvider(scheme, provider); >>>>>>> return extHostFileSystem.registerSearchProvider(scheme, provider); }), registerDocumentCommentProvider: proposedApiFunction(extension, (provider: vscode.DocumentCommentProvider) => { return exthostCommentProviders.registerDocumentCommentProvider(provider); }), registerWorkspaceCommentProvider: proposedApiFunction(extension, (provider: vscode.WorkspaceCommentProvider) => { return exthostCommentProviders.registerWorkspaceCommentProvider(provider); return extHostSearch.registerSearchProvider(scheme, provider); <<<<<<< FoldingRangeType: extHostTypes.FoldingRangeType, CommentThreadCollapsibleState: extHostTypes.CommentThreadCollapsibleState ======= FoldingRangeKind: extHostTypes.FoldingRangeKind >>>>>>> FoldingRangeType: extHostTypes.FoldingRangeType, CommentThreadCollapsibleState: extHostTypes.CommentThreadCollapsibleState, FoldingRangeKind: extHostTypes.FoldingRangeKind
<<<<<<< import { ICommentService, CommentService } from 'vs/workbench/services/comments/electron-browser/commentService'; ======= import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService, GroupDirection, preferredSideBySideGroupDirection, GroupOrientation } from 'vs/workbench/services/group/common/editorGroupsService'; import { EditorService } from 'vs/workbench/services/editor/browser/editorService'; >>>>>>> import { ICommentService, CommentService } from 'vs/workbench/services/comments/electron-browser/commentService'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService, GroupDirection, preferredSideBySideGroupDirection, GroupOrientation } from 'vs/workbench/services/group/common/editorGroupsService'; import { EditorService } from 'vs/workbench/services/editor/browser/editorService';
<<<<<<< templateId: string; row: IRow | null; ======= hasDynamicHeight: boolean; dynamicSizeSnapshotId: number; row: IRow; >>>>>>> hasDynamicHeight: boolean; dynamicSizeSnapshotId: number; <<<<<<< this.setRowLineHeight = getOrDefault2(options, o => o.setRowLineHeight, DefaultOptions.setRowLineHeight); ======= this.setRowLineHeight = getOrDefault(options, o => o.setRowLineHeight, DefaultOptions.setRowLineHeight); this.supportDynamicHeights = getOrDefault(options, o => o.supportDynamicHeights, DefaultOptions.supportDynamicHeights); >>>>>>> this.setRowLineHeight = getOrDefault2(options, o => o.setRowLineHeight, DefaultOptions.setRowLineHeight); this.supportDynamicHeights = getOrDefault2(options, o => o.supportDynamicHeights, DefaultOptions.supportDynamicHeights); <<<<<<< item.row.domNode!.style.height = `${item.size}px`; if (this.setRowLineHeight) { item.row.domNode!.style.lineHeight = `${item.size}px`; } ======= >>>>>>> <<<<<<< item.row!.domNode!.style.top = `${this.elementTop(index)}px`; item.row!.domNode!.setAttribute('data-index', `${index}`); item.row!.domNode!.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false'); item.row!.domNode!.setAttribute('aria-setsize', `${this.length}`); item.row!.domNode!.setAttribute('aria-posinset', `${index + 1}`); ======= item.row.domNode.style.top = `${this.elementTop(index)}px`; item.row.domNode.style.height = `${item.size}px`; if (this.setRowLineHeight) { item.row.domNode.style.lineHeight = `${item.size}px`; } item.row.domNode.setAttribute('data-index', `${index}`); item.row.domNode.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false'); item.row.domNode.setAttribute('aria-setsize', `${this.length}`); item.row.domNode.setAttribute('aria-posinset', `${index + 1}`); >>>>>>> item.row.domNode!.style.top = `${this.elementTop(index)}px`; item.row.domNode!.style.height = `${item.size}px`; if (this.setRowLineHeight) { item.row.domNode!.style.lineHeight = `${item.size}px`; } item.row.domNode!.setAttribute('data-index', `${index}`); item.row.domNode!.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false'); item.row.domNode!.setAttribute('aria-setsize', `${this.length}`); item.row.domNode!.setAttribute('aria-posinset', `${index + 1}`); <<<<<<< if (this._domNode && this._domNode.parentNode) { this._domNode.parentNode.removeChild(this._domNode); ======= if (this.domNode && this.domNode.parentElement) { this.domNode.parentNode.removeChild(this.domNode); >>>>>>> if (this.domNode && this.domNode.parentNode) { this.domNode.parentNode.removeChild(this.domNode);
<<<<<<< }, 'extensions.confirmedUriHandlerExtensionIds': { type: 'array', description: localize('handleUriConfirmedExtensions', "When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."), default: [] ======= }, 'extensions.extensionKind': { type: 'object', description: localize('extensions.extensionKind', "Configure ui or workspace extensions and allow them to run locally or remotely in a remote window."), properties: { 'ui': { type: 'array', items: { type: 'string', pattern: '^([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*)$', } }, 'workspace': { type: 'array', items: { type: 'string', pattern: '^([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*)$', } } }, default: { ui: [], workspace: [] } }, 'extensions.showInstalledExtensionsByDefault': { type: 'boolean', description: localize('extensions.showInstalledExtensionsByDefault', "When enabled, extensions view shows installed extensions view by default."), default: false >>>>>>> }, 'extensions.confirmedUriHandlerExtensionIds': { type: 'array', description: localize('handleUriConfirmedExtensions', "When an extension is listed here, a confirmation prompt will not be shown when that extension handles a URI."), default: [] }, 'extensions.extensionKind': { type: 'object', description: localize('extensions.extensionKind', "Configure ui or workspace extensions and allow them to run locally or remotely in a remote window."), properties: { 'ui': { type: 'array', items: { type: 'string', pattern: '^([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*)$', } }, 'workspace': { type: 'array', items: { type: 'string', pattern: '^([a-z0-9A-Z][a-z0-9\-A-Z]*)\\.([a-z0-9A-Z][a-z0-9\-A-Z]*)$', } } }, default: { ui: [], workspace: [] } }, 'extensions.showInstalledExtensionsByDefault': { type: 'boolean', description: localize('extensions.showInstalledExtensionsByDefault', "When enabled, extensions view shows installed extensions view by default."), default: false
<<<<<<< import { once } from 'vs/base/common/event'; import { domEvent } from 'vs/base/browser/event'; import { append, emmet as $, addClass, removeClass, finalHandler } from 'vs/base/browser/dom'; ======= import { append, $, addClass, removeClass, finalHandler } from 'vs/base/browser/dom'; >>>>>>> import { once } from 'vs/base/common/event'; import { domEvent } from 'vs/base/browser/event'; import { append, $, addClass, removeClass, finalHandler } from 'vs/base/browser/dom';
<<<<<<< function createProxyAgent( extHostWorkspace: ExtHostWorkspaceProvider, ======= function createProxyAgents( extHostWorkspace: ExtHostWorkspace, >>>>>>> function createProxyAgents( extHostWorkspace: ExtHostWorkspaceProvider,
<<<<<<< /** * Class used to execute an extension callback as a task. */ export class ExtensionCallbackExecution { /** * @param callback The callback that will be called when the extension callback task is executed. */ constructor(callback: (terminalRenderer: TerminalRenderer, cancellationToken: CancellationToken, thisArg?: any) => Thenable<void>); /** * The callback used to execute the task. */ callback: (terminalRenderer: TerminalRenderer, cancellationToken: CancellationToken, thisArg?: any) => Thenable<void>; } /** * A task to execute */ export class TaskWithExtensionCallback extends Task { /** * Creates a new task. * * @param definition The task definition as defined in the taskDefinitions extension point. * @param scope Specifies the task's scope. It is either a global or a workspace task or a task for a specific workspace folder. * @param name The task's name. Is presented in the user interface. * @param source The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface. * @param execution The process or shell execution. * @param problemMatchers the names of problem matchers to use, like '$tsc' * or '$eslint'. Problem matchers can be contributed by an extension using * the `problemMatchers` extension point. */ constructor(taskDefinition: TaskDefinition, scope: WorkspaceFolder | TaskScope.Global | TaskScope.Workspace, name: string, source: string, execution?: ProcessExecution | ShellExecution | ExtensionCallbackExecution, problemMatchers?: string | string[]); /** * The task's execution engine */ executionWithExtensionCallback?: ProcessExecution | ShellExecution | ExtensionCallbackExecution; } //#region CodeAction.canAutoApply - mjbvz ======= //#region CodeAction.isPreferred - mjbvz >>>>>>> /** * Class used to execute an extension callback as a task. */ export class ExtensionCallbackExecution { /** * @param callback The callback that will be called when the extension callback task is executed. */ constructor(callback: (terminalRenderer: TerminalRenderer, cancellationToken: CancellationToken, thisArg?: any) => Thenable<void>); /** * The callback used to execute the task. */ callback: (terminalRenderer: TerminalRenderer, cancellationToken: CancellationToken, thisArg?: any) => Thenable<void>; } /** * A task to execute */ export class TaskWithExtensionCallback extends Task { /** * Creates a new task. * * @param definition The task definition as defined in the taskDefinitions extension point. * @param scope Specifies the task's scope. It is either a global or a workspace task or a task for a specific workspace folder. * @param name The task's name. Is presented in the user interface. * @param source The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface. * @param execution The process or shell execution. * @param problemMatchers the names of problem matchers to use, like '$tsc' * or '$eslint'. Problem matchers can be contributed by an extension using * the `problemMatchers` extension point. */ constructor(taskDefinition: TaskDefinition, scope: WorkspaceFolder | TaskScope.Global | TaskScope.Workspace, name: string, source: string, execution?: ProcessExecution | ShellExecution | ExtensionCallbackExecution, problemMatchers?: string | string[]); /** * The task's execution engine */ executionWithExtensionCallback?: ProcessExecution | ShellExecution | ExtensionCallbackExecution; } //#region CodeAction.isPreferred - mjbvz <<<<<<< ======= //#region Autofix - mjbvz export namespace CodeActionKind { /** * Base kind for an auto fix source action: `source.fixAll`. * * Fix all actions automatically fix errors in the code that have a clear fix that does not require user input. * They should not suppress errors or perform unsafe fixes such as generating new types or classes. */ export const SourceFixAll: CodeActionKind; } //#endregion >>>>>>> //#region Autofix - mjbvz export namespace CodeActionKind { /** * Base kind for an auto fix source action: `source.fixAll`. * * Fix all actions automatically fix errors in the code that have a clear fix that does not require user input. * They should not suppress errors or perform unsafe fixes such as generating new types or classes. */ export const SourceFixAll: CodeActionKind; } //#endregion
<<<<<<< import { LinkedMap as Map } from 'vs/base/common/map'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; ======= >>>>>>> import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor'; <<<<<<< import { EditorOptions, EditorInput } from 'vs/workbench/common/editor'; import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor'; ======= import { EditorOptions, asFileEditorInput } from 'vs/workbench/common/editor'; >>>>>>> import { EditorOptions, toResource } from 'vs/workbench/common/editor'; <<<<<<< DEFAULT_EDITOR_COMMAND_COLLAPSE_ALL, DEFAULT_EDITOR_COMMAND_FOCUS_SEARCH ======= DEFAULT_EDITOR_COMMAND_COLLAPSE_ALL, ISettingsEditorModel >>>>>>> DEFAULT_EDITOR_COMMAND_COLLAPSE_ALL, DEFAULT_EDITOR_COMMAND_FOCUS_SEARCH, ISettingsEditorModel <<<<<<< ======= import { IEventService } from 'vs/platform/event/common/event'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; >>>>>>> import { IMessageService, Severity } from 'vs/platform/message/common/message'; <<<<<<< private inputDisposeListener: IDisposable; ======= >>>>>>> <<<<<<< render(): void; dispose(): void; ======= render(); updatePreference(setting: ISetting, value: any): void; dispose(); >>>>>>> render(); updatePreference(setting: ISetting, value: any): void; dispose(); <<<<<<< this.focusNextSettingRenderer.render([]); ======= this.hiddenAreasRenderer.render(); this.filteredSettingsNavigationRenderer.render([]); >>>>>>> this.hiddenAreasRenderer.render(); this.filteredSettingsNavigationRenderer.render([]);
<<<<<<< windowOpen(paths: string[], forceNewWindow?: boolean): TPromise<void> { ======= toggleMenuBar(windowId: number): TPromise<void> { this.windowsMainService.toggleMenuBar(windowId); return TPromise.as(null); } openWindow(paths: string[], options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean }): TPromise<void> { >>>>>>> openWindow(paths: string[], options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean }): TPromise<void> {
<<<<<<< export const EDITOR_TOOLBAR_HEIGHT = 22; export const RUN_BUTTON_WIDTH = 20; ======= export const EDITOR_TOOLBAR_HEIGHT = 22; // Context Keys export const NOTEBOOK_CELL_TYPE_CONTEXT_KEY = 'notebookCellType'; >>>>>>> export const EDITOR_TOOLBAR_HEIGHT = 22; export const RUN_BUTTON_WIDTH = 20; // Context Keys export const NOTEBOOK_CELL_TYPE_CONTEXT_KEY = 'notebookCellType';
<<<<<<< workspaces: (IWorkspaceIdentifier | string | UriComponents)[]; files: (string | UriComponents)[]; ======= workspaces2: (IWorkspaceIdentifier | string)[]; // IWorkspaceIdentifier or URI.toString() files: string[]; >>>>>>> workspaces2: (IWorkspaceIdentifier | string)[]; // IWorkspaceIdentifier or URI.toString() files: string[]; <<<<<<< const storedRecents: ISerializedRecentlyOpened = this.stateService.getItem<ISerializedRecentlyOpened>(HistoryMainService.recentlyOpenedStorageKey) || { workspaces: [], files: [] }; const result: IRecentlyOpened = { workspaces: [], files: [] }; for (const workspace of storedRecents.workspaces) { if (typeof workspace === 'string') { // folder paths were strings <= 1.25 result.workspaces.push(URI.file(workspace)); } else if (isWorkspaceIdentifier(workspace)) { result.workspaces.push(workspace); } else { result.workspaces.push(URI.revive(workspace)); ======= const storedRecents = this.stateService.getItem<ISerializedRecentlyOpened & ILegacySerializedRecentlyOpened>(HistoryMainService.recentlyOpenedStorageKey); const result: IRecentlyOpened = { workspaces: [], files: [] }; if (storedRecents) { if (Array.isArray(storedRecents.workspaces2)) { for (const workspace of storedRecents.workspaces2) { if (isWorkspaceIdentifier(workspace)) { result.workspaces.push(workspace); } else if (typeof workspace === 'string') { result.workspaces.push(URI.parse(workspace)); } } } else if (Array.isArray(storedRecents.workspaces)) { // TODO legacy support can be removed at some point (6 month?) // format of 1.25 and before for (const workspace of storedRecents.workspaces) { if (typeof workspace === 'string') { result.workspaces.push(URI.file(workspace)); } else if (isWorkspaceIdentifier(workspace)) { result.workspaces.push(workspace); } else if (workspace && typeof workspace.path === 'string' && typeof workspace.scheme === 'string') { // added by 1.26-insiders result.workspaces.push(URI.revive(workspace)); } } } if (Array.isArray(storedRecents.files)) { for (const file of storedRecents.files) { if (typeof file === 'string') { result.files.push(file); } } >>>>>>> const storedRecents = this.stateService.getItem<ISerializedRecentlyOpened & ILegacySerializedRecentlyOpened>(HistoryMainService.recentlyOpenedStorageKey); const result: IRecentlyOpened = { workspaces: [], files: [] }; if (storedRecents) { if (Array.isArray(storedRecents.workspaces2)) { for (const workspace of storedRecents.workspaces2) { if (isWorkspaceIdentifier(workspace)) { result.workspaces.push(workspace); } else if (typeof workspace === 'string') { result.workspaces.push(URI.parse(workspace)); } } } else if (Array.isArray(storedRecents.workspaces)) { // TODO legacy support can be removed at some point (6 month?) // format of 1.25 and before for (const workspace of storedRecents.workspaces) { if (typeof workspace === 'string') { result.workspaces.push(URI.file(workspace)); } else if (isWorkspaceIdentifier(workspace)) { result.workspaces.push(workspace); } else if (workspace && typeof workspace.path === 'string' && typeof workspace.scheme === 'string') { // added by 1.26-insiders result.workspaces.push(URI.revive(workspace)); } } } if (Array.isArray(storedRecents.files)) { for (const file of storedRecents.files) { if (typeof file === 'string') { result.files.push(file); } } <<<<<<< const serialized: ISerializedRecentlyOpened = { workspaces: [], files: [] }; ======= const serialized: ISerializedRecentlyOpened = { workspaces2: [], files: recent.files }; >>>>>>> const serialized: ISerializedRecentlyOpened = { workspaces2: [], files: [] }; <<<<<<< for (const file of recent.files) { serialized.workspaces.push(<UriComponents>file.toJSON()); } this.stateService.setItem(HistoryMainService.recentlyOpenedStorageKey, recent); ======= this.stateService.setItem(HistoryMainService.recentlyOpenedStorageKey, serialized); >>>>>>> for (const file of recent.files) { serialized.files.push(file.toString()); } this.stateService.setItem(HistoryMainService.recentlyOpenedStorageKey, serialized);
<<<<<<< import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget } from 'vscode'; import { doesNotThrow, equal, ok } from 'assert'; ======= import { window, Terminal, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget } from 'vscode'; import { doesNotThrow, equal, ok, deepEqual } from 'assert'; >>>>>>> import { window, Pseudoterminal, EventEmitter, TerminalDimensions, workspace, ConfigurationTarget } from 'vscode'; import { doesNotThrow, equal, ok, deepEqual } from 'assert'; <<<<<<< suite('Extension pty terminals', () => { ======= suite('window.onDidWriteTerminalData', () => { test('should listen to all future terminal data events', (done) => { const openEvents: string[] = []; const dataEvents: { name: string, data: string }[] = []; const closeEvents: string[] = []; const reg1 = window.onDidOpenTerminal(e => openEvents.push(e.name)); const reg2 = window.onDidWriteTerminalData(e => dataEvents.push({ name: e.terminal.name, data: e.data })); const reg3 = window.onDidCloseTerminal(e => { closeEvents.push(e.name); if (closeEvents.length === 2) { deepEqual(openEvents, [ 'test1', 'test2' ]); deepEqual(dataEvents, [ { name: 'test1', data: 'write1' }, { name: 'test2', data: 'write2' } ]); deepEqual(closeEvents, [ 'test1', 'test2' ]); reg1.dispose(); reg2.dispose(); reg3.dispose(); done(); } }); const term1Write = new EventEmitter<string>(); const term1Close = new EventEmitter<void>(); window.createTerminal({ name: 'test1', pty: { onDidWrite: term1Write.event, onDidClose: term1Close.event, open: () => { term1Write.fire('write1'); term1Close.fire(); const term2Write = new EventEmitter<string>(); const term2Close = new EventEmitter<void>(); window.createTerminal({ name: 'test2', pty: { onDidWrite: term2Write.event, onDidClose: term2Close.event, open: () => { term2Write.fire('write2'); term2Close.fire(); }, close: () => {} }}); }, close: () => {} }}); }); }); suite('Terminal renderers (deprecated)', () => { test('should fire onDidOpenTerminal and onDidCloseTerminal from createTerminalRenderer terminal', (done) => { const reg1 = window.onDidOpenTerminal(term => { equal(term.name, 'c'); reg1.dispose(); const reg2 = window.onDidCloseTerminal(() => { reg2.dispose(); done(); }); term.dispose(); }); window.createTerminalRenderer('c'); }); test('should get maximum dimensions set when shown', (done) => { let terminal: Terminal; const reg1 = window.onDidOpenTerminal(term => { reg1.dispose(); term.show(); terminal = term; }); const renderer = window.createTerminalRenderer('foo'); const reg2 = renderer.onDidChangeMaximumDimensions(dimensions => { ok(dimensions.columns > 0); ok(dimensions.rows > 0); reg2.dispose(); const reg3 = window.onDidCloseTerminal(() => { reg3.dispose(); done(); }); terminal.dispose(); }); }); test('should fire Terminal.onData on write', (done) => { const reg1 = window.onDidOpenTerminal(terminal => { reg1.dispose(); const reg2 = terminal.onDidWriteData(data => { equal(data, 'bar'); reg2.dispose(); const reg3 = window.onDidCloseTerminal(() => { reg3.dispose(); done(); }); terminal.dispose(); }); renderer.write('bar'); }); const renderer = window.createTerminalRenderer('foo'); }); }); suite('Virtual process terminals', () => { >>>>>>> suite('window.onDidWriteTerminalData', () => { test('should listen to all future terminal data events', (done) => { const openEvents: string[] = []; const dataEvents: { name: string, data: string }[] = []; const closeEvents: string[] = []; const reg1 = window.onDidOpenTerminal(e => openEvents.push(e.name)); const reg2 = window.onDidWriteTerminalData(e => dataEvents.push({ name: e.terminal.name, data: e.data })); const reg3 = window.onDidCloseTerminal(e => { closeEvents.push(e.name); if (closeEvents.length === 2) { deepEqual(openEvents, [ 'test1', 'test2' ]); deepEqual(dataEvents, [ { name: 'test1', data: 'write1' }, { name: 'test2', data: 'write2' } ]); deepEqual(closeEvents, [ 'test1', 'test2' ]); reg1.dispose(); reg2.dispose(); reg3.dispose(); done(); } }); const term1Write = new EventEmitter<string>(); const term1Close = new EventEmitter<void>(); window.createTerminal({ name: 'test1', pty: { onDidWrite: term1Write.event, onDidClose: term1Close.event, open: () => { term1Write.fire('write1'); term1Close.fire(); const term2Write = new EventEmitter<string>(); const term2Close = new EventEmitter<void>(); window.createTerminal({ name: 'test2', pty: { onDidWrite: term2Write.event, onDidClose: term2Close.event, open: () => { term2Write.fire('write2'); term2Close.fire(); }, close: () => {} }}); }, close: () => {} }}); }); }); suite('Extension pty terminals', () => {
<<<<<<< * Checks if the activity bar is currently hidden or not */ isActivityBarHidden(): boolean; /** * Set activity bar hidden or not */ setActivityBarHidden(hidden: boolean): void; /** * Returns iff the titlebar part is currently hidden or not. ======= * Returns iff the custom titlebar part is visible. >>>>>>> * Checks if the activity bar is currently hidden or not */ isActivityBarHidden(): boolean; /** * Set activity bar hidden or not */ setActivityBarHidden(hidden: boolean): void; /** * Returns iff the custom titlebar part is visible.
<<<<<<< return await localTerminalService.createProcess(shellLaunchConfig, initialCwd, cols, rows, env, useConpty, shouldPersist); } private _setupPtyHostListeners(offProcessTerminalService: IOffProcessTerminalService) { this._register(offProcessTerminalService.onPtyHostUnresponsive(() => { ======= // Mark the process as disconnected is the pty host is unresponsive, the responsive event // will fire only when the pty host was already unresponsive this._register(localTerminalService.onPtyHostUnresponsive(() => { >>>>>>> return await localTerminalService.createProcess(shellLaunchConfig, initialCwd, cols, rows, env, useConpty, shouldPersist); } private _setupPtyHostListeners(offProcessTerminalService: IOffProcessTerminalService) { // Mark the process as disconnected is the pty host is unresponsive, the responsive event // will fire only when the pty host was already unresponsive this._register(offProcessTerminalService.onPtyHostUnresponsive(() => { <<<<<<< this._register(offProcessTerminalService.onPtyHostRestart(() => { // When the pty host restarts, reconnect is no longer possible if (!this.isDisconnected) { this.isDisconnected = true; this._onPtyDisconnect.fire(); } ======= // When the pty host restarts, reconnect is no longer possible so dispose the responsive // listener this._register(localTerminalService.onPtyHostRestart(() => { >>>>>>> // When the pty host restarts, reconnect is no longer possible so dispose the responsive // listener this._register(offProcessTerminalService.onPtyHostRestart(() => { // When the pty host restarts, reconnect is no longer possible if (!this.isDisconnected) { this.isDisconnected = true; this._onPtyDisconnect.fire(); }
<<<<<<< import { renderMarkdown } from 'vs/base/browser/markdownRenderer'; ======= import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { insane } from 'vs/base/common/insane/insane'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { Delegate } from 'vs/workbench/contrib/extensions/browser/extensionsList'; >>>>>>> import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { insane } from 'vs/base/common/insane/insane'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { Delegate } from 'vs/workbench/contrib/extensions/browser/extensionsList'; import { renderMarkdown } from 'vs/base/browser/markdownRenderer';
<<<<<<< const extHostSearch = rpcProtocol.set(ExtHostContext.ExtHostSearch, new ExtHostSearch(rpcProtocol, schemeTransformer, extHostLogService, extHostConfiguration)); const extHostTask = rpcProtocol.set(ExtHostContext.ExtHostTask, new ExtHostTask(rpcProtocol, extHostWorkspace, extHostDocumentsAndEditors, extHostConfiguration, extHostTerminalService)); ======= const extHostSearch = rpcProtocol.set(ExtHostContext.ExtHostSearch, new ExtHostSearch(rpcProtocol, schemeTransformer, extHostLogService)); const extHostTask = rpcProtocol.set(ExtHostContext.ExtHostTask, new ExtHostTask(rpcProtocol, extHostWorkspace, extHostDocumentsAndEditors, extHostConfiguration)); >>>>>>> const extHostSearch = rpcProtocol.set(ExtHostContext.ExtHostSearch, new ExtHostSearch(rpcProtocol, schemeTransformer, extHostLogService)); const extHostTask = rpcProtocol.set(ExtHostContext.ExtHostTask, new ExtHostTask(rpcProtocol, extHostWorkspace, extHostDocumentsAndEditors, extHostConfiguration, extHostTerminalService));
<<<<<<< import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; import { IViewDescriptorRef, PersistentContributableViewsModel, IAddedViewDescriptorRef } from 'vs/workbench/browser/parts/views/views'; import { IViewDescriptor, IViewsViewlet, IView } from 'vs/workbench/common/views'; import { IPanelDndController, Panel } from 'vs/base/browser/ui/splitview/panelview'; ======= import { IPartService } from 'vs/workbench/services/part/common/partService'; >>>>>>> import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'; <<<<<<< super(VIEWLET_ID, { showHeaderInTitleWhenSingleView: true, dnd: new SCMPanelDndController() }, configurationService, layoutService, contextMenuService, telemetryService, themeService, storageService); ======= super(VIEWLET_ID, SCMViewlet.STATE_KEY, true, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); >>>>>>> super(VIEWLET_ID, SCMViewlet.STATE_KEY, true, configurationService, layoutService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService);
<<<<<<< import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento } from 'vscode'; import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent } from './util'; ======= import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor } from 'vscode'; import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, ISubmodule } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find } from './util'; >>>>>>> import { Uri, Command, EventEmitter, Event, scm, SourceControl, SourceControlInputBox, SourceControlResourceGroup, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace, WorkspaceEdit, ThemeColor, DecorationData, Memento } from 'vscode'; import { Repository as BaseRepository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash, RefType, GitError, ISubmodule } from './git'; import { anyEvent, filterEvent, eventToPromise, dispose, find, isDescendant, IDisposable, onceEvent, EmptyDisposable, debounceEvent } from './util'; <<<<<<< export interface OperationResult { operation: Operation; error: any; } class ProgressManager { private disposable: IDisposable = EmptyDisposable; constructor(private repository: Repository) { const start = onceEvent(filterEvent(repository.onDidChangeOperations, () => repository.operations.shouldShowProgress())); const end = onceEvent(filterEvent(debounceEvent(repository.onDidChangeOperations, 300), () => !repository.operations.shouldShowProgress())); const setup = () => { this.disposable = start(() => { const promise = eventToPromise(end).then(() => setup()); window.withProgress({ location: ProgressLocation.SourceControl }, () => promise); }); }; setup(); } dispose(): void { this.disposable.dispose(); } } ======= export enum SubmoduleStatus { Uninitialized, Current, Conflict, Modified } export interface Submodule { Root: string; Status: SubmoduleStatus; } >>>>>>> export interface OperationResult { operation: Operation; error: any; } class ProgressManager { private disposable: IDisposable = EmptyDisposable; constructor(private repository: Repository) { const start = onceEvent(filterEvent(repository.onDidChangeOperations, () => repository.operations.shouldShowProgress())); const end = onceEvent(filterEvent(debounceEvent(repository.onDidChangeOperations, 300), () => !repository.operations.shouldShowProgress())); const setup = () => { this.disposable = start(() => { const promise = eventToPromise(end).then(() => setup()); window.withProgress({ location: ProgressLocation.SourceControl }, () => promise); }); }; setup(); } dispose(): void { this.disposable.dispose(); } } export enum SubmoduleStatus { Uninitialized, Current, Conflict, Modified } export interface Submodule { Root: string; Status: SubmoduleStatus; } <<<<<<< async buffer(ref: string, filePath: string): Promise<Buffer> { return await this.run(Operation.Show, async () => { const relativePath = path.relative(this.repository.root, filePath).replace(/\\/g, '/'); const configFiles = workspace.getConfiguration('files', Uri.file(filePath)); const encoding = configFiles.get<string>('encoding'); // TODO@joao: REsource config api return await this.repository.buffer(`${ref}:${relativePath}`); }); } lstree(ref: string, filePath: string): Promise<{ mode: number, object: string, size: number }> { return this.run(Operation.LSTree, () => this.repository.lstree(ref, filePath)); } detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> { return this.run(Operation.Show, () => this.repository.detectObjectType(object)); } ======= async getSubmodules(): Promise<Submodule[]> { const submodules: ISubmodule[] = await this.repository.getSubmodules(); return submodules.map(isub => { var status = SubmoduleStatus.Current; switch (isub.Status) { case '-': { status = SubmoduleStatus.Uninitialized; break; } case '+': { status = SubmoduleStatus.Modified; break; } case 'U': { status = SubmoduleStatus.Conflict; break; } } return { Root: isub.Root, Status: status }; }); } >>>>>>> async buffer(ref: string, filePath: string): Promise<Buffer> { return await this.run(Operation.Show, async () => { const relativePath = path.relative(this.repository.root, filePath).replace(/\\/g, '/'); const configFiles = workspace.getConfiguration('files', Uri.file(filePath)); const encoding = configFiles.get<string>('encoding'); // TODO@joao: REsource config api return await this.repository.buffer(`${ref}:${relativePath}`); }); } lstree(ref: string, filePath: string): Promise<{ mode: number, object: string, size: number }> { return this.run(Operation.LSTree, () => this.repository.lstree(ref, filePath)); } detectObjectType(object: string): Promise<{ mimetype: string, encoding?: string }> { return this.run(Operation.Show, () => this.repository.detectObjectType(object)); } async getSubmodules(): Promise<Submodule[]> { const submodules: ISubmodule[] = await this.repository.getSubmodules(); return submodules.map(isub => { var status = SubmoduleStatus.Current; switch (isub.Status) { case '-': { status = SubmoduleStatus.Uninitialized; break; } case '+': { status = SubmoduleStatus.Modified; break; } case 'U': { status = SubmoduleStatus.Conflict; break; } } return { Root: isub.Root, Status: status }; }); }
<<<<<<< import { ICommandService } from 'vs/platform/commands/common/commands'; ======= import { ILogService } from 'vs/platform/log/common/log'; >>>>>>> import { ICommandService } from 'vs/platform/commands/common/commands'; import { ILogService } from 'vs/platform/log/common/log'; <<<<<<< @IStorageService private readonly _storageService: IStorageService, @ICommandService _commandService: ICommandService ======= @IStorageService private readonly _storageService: IStorageService, @ILogService private readonly _logService: ILogService >>>>>>> @IStorageService private readonly _storageService: IStorageService, @ICommandService _commandService: ICommandService @ILogService private readonly _logService: ILogService
<<<<<<< import { Git, Repository, Ref, Branch, Remote, Commit, GitErrorCodes } from './git'; import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose, find } from './util'; ======= import { Git, Repository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash } from './git'; import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; >>>>>>> import { Git, Repository, Ref, Branch, Remote, Commit, GitErrorCodes, Stash } from './git'; import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose, find } from './util';
<<<<<<< import { CommentRule } from 'vs/editor/common/modes/languageConfiguration'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; var mockConfigService = new TestConfigurationService(); mockConfigService.setUserConfiguration('editor', { 'insertSpaceAfterComment': true }); ======= >>>>>>> import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; var mockConfigService = new TestConfigurationService(); mockConfigService.setUserConfiguration('editor', { 'insertSpaceAfterComment': true });
<<<<<<< //#region Deprecated support export interface CompletionItem { /** * Indicates if this item is deprecated. */ deprecated?: boolean; } export enum DiagnosticTag { /** * Deprecated or obsolete code. * * Diagnostics with this tag are rendered with a strike through. */ Deprecated = 2, } //#endregion ======= >>>>>>> //#region Deprecated support export interface CompletionItem { /** * Indicates if this item is deprecated. */ deprecated?: boolean; } //#endregion
<<<<<<< import {IgnoreFiltersPage} from "./pages/IgnoreFiltersPage"; ======= import {AnnouncementPreviewPage} from "./pages/AnnouncementPreviewPage"; >>>>>>> import {IgnoreFiltersPage} from "./pages/IgnoreFiltersPage"; import {AnnouncementPreviewPage} from "./pages/AnnouncementPreviewPage"; <<<<<<< navigateToIgnoreFilters() { return new IgnoreFiltersPage(); } ======= navigateToAnnouncementPreview(asn: string, prefix: string) { return new AnnouncementPreviewPage(asn, prefix); } >>>>>>> navigateToIgnoreFilters() { return new IgnoreFiltersPage(); } navigateToAnnouncementPreview(asn: string, prefix: string) { return new AnnouncementPreviewPage(asn, prefix); }
<<<<<<< private async handleExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> { if (isWeb) { data.files.forEach(file => { const reader = new FileReader(); reader.readAsArrayBuffer(file); reader.onload = async (event) => { const name = file.name; if (typeof name === 'string' && event.target?.result instanceof ArrayBuffer) { if (target.getChild(name)) { const { confirmed } = await this.dialogService.confirm(fileOverwriteConfirm(name)); if (!confirmed) { return; } } const resource = joinPath(target.resource, name); await this.fileService.writeFile(resource, VSBuffer.wrap(new Uint8Array(event.target?.result))); if (data.files.length === 1) { await this.editorService.openEditor({ resource, options: { pinned: true } }); ======= private async handleWebExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> { data.files.forEach(file => { const reader = new FileReader(); reader.readAsArrayBuffer(file); reader.onload = async (event) => { const name = file.name; if (typeof name === 'string' && event.target?.result instanceof ArrayBuffer) { if (target.getChild(name)) { const { confirmed } = await this.dialogService.confirm(fileOverwriteConfirm); if (!confirmed) { return; >>>>>>> private async handleWebExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> { data.files.forEach(file => { const reader = new FileReader(); reader.readAsArrayBuffer(file); reader.onload = async (event) => { const name = file.name; if (typeof name === 'string' && event.target?.result instanceof ArrayBuffer) { if (target.getChild(name)) { const { confirmed } = await this.dialogService.confirm(fileOverwriteConfirm(name)); if (!confirmed) { return;
<<<<<<< import { IPCClient } from 'vs/base/parts/ipc/common/ipc'; import { registerWindowDriver } from 'vs/platform/driver/electron-browser/driver'; ======= import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { PreferencesService } from 'vs/workbench/services/preferences/browser/preferencesService'; >>>>>>> import { IPCClient } from 'vs/base/parts/ipc/common/ipc'; import { registerWindowDriver } from 'vs/platform/driver/electron-browser/driver'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { PreferencesService } from 'vs/workbench/services/preferences/browser/preferencesService';
<<<<<<< const keybinding = firstPart ? chordPart ? new ChordKeybinding([aSimpleKeybinding(firstPart), aSimpleKeybinding(chordPart)]) : aSimpleKeybinding(firstPart) : null; return new ResolvedKeybindingItem(keybinding ? new USLayoutResolvedKeybinding(keybinding, OS) : null, command || 'some command', null, when ? ContextKeyExpr.deserialize(when) : null, isDefault === void 0 ? true : isDefault); ======= const keybinding = firstPart ? chordPart ? new ChordKeybinding(aSimpleKeybinding(firstPart), aSimpleKeybinding(chordPart)) : aSimpleKeybinding(firstPart) : null; return new ResolvedKeybindingItem(keybinding ? new USLayoutResolvedKeybinding(keybinding, OS) : null, command || 'some command', null, when ? ContextKeyExpr.deserialize(when) : null, isDefault === undefined ? true : isDefault); >>>>>>> const keybinding = firstPart ? chordPart ? new ChordKeybinding([aSimpleKeybinding(firstPart), aSimpleKeybinding(chordPart)]) : aSimpleKeybinding(firstPart) : null; return new ResolvedKeybindingItem(keybinding ? new USLayoutResolvedKeybinding(keybinding, OS) : null, command || 'some command', null, when ? ContextKeyExpr.deserialize(when) : null, isDefault === undefined ? true : isDefault);
<<<<<<< terminal: { external: { linuxExec: string, windowsExec: string } ======= externalTerminal: { linuxExec: string, macExec: string, windowsExec: string >>>>>>> terminal: { external: { linuxExec: string, macExec: string, windowsExec: string }
<<<<<<< doNotUseTrash?: boolean; ======= maxSize?: number; >>>>>>> doNotUseTrash?: boolean; maxSize?: number;
<<<<<<< import { DisposableStore, dispose, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; ======= import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle'; >>>>>>> import { DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; <<<<<<< this._cellStateListeners = this._viewModel.viewCells.map(cell => cell.onDidChangeLayout(e => { if (e.totalHeight !== undefined || e.outerWidth) { this._layoutCell(cell, cell.layoutInfo.totalHeight); } })); ======= >>>>>>> <<<<<<< // update resize listener e.splices.reverse().forEach(splice => { const [start, deleted, newCells] = splice; const deletedCells = this._cellStateListeners.splice(start, deleted, ...newCells.map(cell => cell.onDidChangeLayout(e => { if (e.totalHeight !== undefined || e.outerWidth) { this._layoutCell(cell, cell.layoutInfo.totalHeight); } }))); dispose(deletedCells); }); ======= >>>>>>>
<<<<<<< import { ITreeNode, ITreeFilter, TreeVisibility, TreeFilterResult, IAsyncDataSource } from 'vs/base/browser/ui/tree/tree'; ======= import { ITreeRenderer, ITreeNode, ITreeFilter, TreeVisibility, TreeFilterResult, ITreeElement } from 'vs/base/browser/ui/tree/tree'; >>>>>>> import { ITreeNode, ITreeFilter, TreeVisibility, TreeFilterResult, ITreeElement } from 'vs/base/browser/ui/tree/tree'; <<<<<<< import { TreeResourceNavigator2, WorkbenchCompressibleAsyncDataTree } from 'vs/platform/list/browser/listService'; ======= import { TreeResourceNavigator2, WorkbenchObjectTree } from 'vs/platform/list/browser/listService'; >>>>>>> import { TreeResourceNavigator2, WorkbenchCompressibleObjectTree } from 'vs/platform/list/browser/listService'; <<<<<<< constructor(private _debugModel: IDebugModel, private _environmentService: IEnvironmentService, private _contextService: IWorkspaceContextService, private _labelService: ILabelService) { super(undefined, 'Root', true); this._debugModel.getSessions().forEach(session => { this.add(session); }); ======= constructor(private _environmentService: IEnvironmentService, private _contextService: IWorkspaceContextService, private _labelService: ILabelService) { super(undefined, 'Root'); >>>>>>> constructor(private _environmentService: IEnvironmentService, private _contextService: IWorkspaceContextService, private _labelService: ILabelService) { super(undefined, 'Root'); <<<<<<< private tree!: WorkbenchCompressibleAsyncDataTree<LoadedScriptsItem | LoadedScriptsItem[], LoadedScriptsItem, FuzzyScore>; ======= private tree!: WorkbenchObjectTree<LoadedScriptsItem, FuzzyScore>; >>>>>>> private tree!: WorkbenchCompressibleObjectTree<LoadedScriptsItem, FuzzyScore>; <<<<<<< this.tree = this.instantiationService.createInstance<typeof WorkbenchCompressibleAsyncDataTree, WorkbenchCompressibleAsyncDataTree<LoadedScriptsItem, LoadedScriptsItem, FuzzyScore>>( WorkbenchCompressibleAsyncDataTree, 'LoadedScriptsView', this.treeContainer, new LoadedScriptsDelegate(), { isIncompressible: (element: BaseTreeItem): boolean => element.isIncompressible }, ======= this.tree = this.instantiationService.createInstance(WorkbenchObjectTree, 'LoadedScriptsView', this.treeContainer, new LoadedScriptsDelegate(), >>>>>>> this.tree = this.instantiationService.createInstance(WorkbenchCompressibleObjectTree, 'LoadedScriptsView', this.treeContainer, new LoadedScriptsDelegate(), <<<<<<< compressionEnabled: NEW_STYLE_COMPRESS, autoExpandSingleChildren: NEW_STYLE_COMPRESS, ======= collapseByDefault: true, >>>>>>> compressionEnabled: NEW_STYLE_COMPRESS, collapseByDefault: true,
<<<<<<< import { addDisposableListener, EventType } from 'vs/base/browser/dom'; ======= import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { pathsToEditors } from 'vs/workbench/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; >>>>>>> import { addDisposableListener, EventType } from 'vs/base/browser/dom'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { pathsToEditors } from 'vs/workbench/common/editor'; import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; <<<<<<< constructor() { super(); this._register(addDisposableListener(document, EventType.FULLSCREEN_CHANGE, () => { if (document.fullscreenElement || (<any>document).webkitFullscreenElement) { browser.setFullscreen(true); } else { browser.setFullscreen(false); } })); } ======= constructor( @IEditorService private readonly editorService: IEditorService, @IFileService private readonly fileService: IFileService, @IConfigurationService private readonly configurationService: IConfigurationService ) { } >>>>>>> constructor( @IEditorService private readonly editorService: IEditorService, @IFileService private readonly fileService: IFileService, @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); this._register(addDisposableListener(document, EventType.FULLSCREEN_CHANGE, () => { if (document.fullscreenElement || (<any>document).webkitFullscreenElement) { browser.setFullscreen(true); } else { browser.setFullscreen(false); } })); }
<<<<<<< import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn } from 'vscode'; import { Ref, RefType, Git, GitErrorCodes, Branch } from './git'; ======= import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState } from 'vscode'; import { Ref, RefType, Git, GitErrorCodes, PushOptions } from './git'; >>>>>>> import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn } from 'vscode'; import { Ref, RefType, Git, GitErrorCodes, Branch } from './git'; <<<<<<< @command('git.deleteBranch') async deleteBranch(name: string, force?: boolean): Promise<void> { let run: (force?: boolean) => Promise<void>; if (typeof name === 'string') { run = force => this.model.deleteBranch(name, force); } else { const currentHead = this.model.HEAD && this.model.HEAD.name; const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) .map(ref => new BranchDeleteItem(ref)); const placeHolder = localize('select branch to delete', 'Select a branch to delete'); const choice = await window.showQuickPick<BranchDeleteItem>(heads, { placeHolder }); if (!choice || !choice.branchName) { return; } name = choice.branchName; run = force => choice.run(this.model, force); } try { await run(force); } catch (err) { if (err.gitErrorCode !== GitErrorCodes.BranchNotFullyMerged) { throw err; } const message = localize('confirm force delete branch', "The branch '{0}' is not fully merged. Delete anyway?", name); const yes = localize('delete branch', "Delete Branch"); const pick = await window.showWarningMessage(message, yes); if (pick === yes) { await run(true); } } } @command('git.merge') async merge(): Promise<void> { const config = workspace.getConfiguration('git'); const checkoutType = config.get<string>('checkoutType') || 'all'; const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; const heads = this.model.refs.filter(ref => ref.type === RefType.Head) .filter(ref => ref.name || ref.commit) .map(ref => new MergeItem(ref as Branch)); const remoteHeads = (includeRemotes ? this.model.refs.filter(ref => ref.type === RefType.RemoteHead) : []) .filter(ref => ref.name || ref.commit) .map(ref => new MergeItem(ref as Branch)); const picks = [...heads, ...remoteHeads]; const placeHolder = localize('select a branch to merge from', 'Select a branch to merge from'); const choice = await window.showQuickPick<MergeItem>(picks, { placeHolder }); if (!choice) { return; } try { await choice.run(this.model); } catch (err) { if (err.gitErrorCode !== GitErrorCodes.Conflict) { throw err; } const message = localize('merge conflicts', "There are merge conflicts. Resolve them before committing."); await window.showWarningMessage(message); } } @command('git.pullFrom') async pullFrom(): Promise<void> { const remotes = this.model.remotes; if (remotes.length === 0) { window.showWarningMessage(localize('no remotes to pull', "Your repository has no remotes configured to pull from.")); return; } const picks = remotes.map(r => ({ label: r.name, description: r.url })); const placeHolder = localize('pick remote pull repo', "Pick a remote to pull the branch from"); const pick = await window.showQuickPick(picks, { placeHolder }); if (!pick) { return; } const branchName = await window.showInputBox({ placeHolder: localize('branch name', "Branch name"), prompt: localize('provide branch name', "Please provide a branch name"), ignoreFocusOut: true }); if (!branchName) { return; } this.model.pull(false, pick.label, branchName); } ======= @command('git.showTags') async showTags(): Promise<void> { const tags = this.model.refs .filter(x => x.type === RefType.Tag) .map(tag => new ShowTag(tag)); const placeHolder = 'Select a tag'; var choice = await window.showQuickPick<ShowTag>(tags, { placeHolder }); if (!choice) { return; } await choice.run(this.model); } @command('git.createTag') async createTag(): Promise<void> { const inputTagName = await window.showInputBox({ placeHolder: localize('tag name', "Tag name"), prompt: localize('provide tag name', "Please provide a tag name"), ignoreFocusOut: true }); if (!inputTagName) { return; } const inputMessage = await window.showInputBox({ placeHolder: localize('tag message', "Message"), prompt: localize('provide tag message', "Please provide a message"), ignoreFocusOut: true }); const name = inputTagName.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$/g, '-'); const message = inputMessage || name; await this.model.tag(name, message); window.showInformationMessage(localize('tag creation success', "Successfully created tag.")); } >>>>>>> @command('git.deleteBranch') async deleteBranch(name: string, force?: boolean): Promise<void> { let run: (force?: boolean) => Promise<void>; if (typeof name === 'string') { run = force => this.model.deleteBranch(name, force); } else { const currentHead = this.model.HEAD && this.model.HEAD.name; const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) .map(ref => new BranchDeleteItem(ref)); const placeHolder = localize('select branch to delete', 'Select a branch to delete'); const choice = await window.showQuickPick<BranchDeleteItem>(heads, { placeHolder }); if (!choice || !choice.branchName) { return; } name = choice.branchName; run = force => choice.run(this.model, force); } try { await run(force); } catch (err) { if (err.gitErrorCode !== GitErrorCodes.BranchNotFullyMerged) { throw err; } const message = localize('confirm force delete branch', "The branch '{0}' is not fully merged. Delete anyway?", name); const yes = localize('delete branch', "Delete Branch"); const pick = await window.showWarningMessage(message, yes); if (pick === yes) { await run(true); } } } @command('git.merge') async merge(): Promise<void> { const config = workspace.getConfiguration('git'); const checkoutType = config.get<string>('checkoutType') || 'all'; const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; const heads = this.model.refs.filter(ref => ref.type === RefType.Head) .filter(ref => ref.name || ref.commit) .map(ref => new MergeItem(ref as Branch)); const remoteHeads = (includeRemotes ? this.model.refs.filter(ref => ref.type === RefType.RemoteHead) : []) .filter(ref => ref.name || ref.commit) .map(ref => new MergeItem(ref as Branch)); const picks = [...heads, ...remoteHeads]; const placeHolder = localize('select a branch to merge from', 'Select a branch to merge from'); const choice = await window.showQuickPick<MergeItem>(picks, { placeHolder }); if (!choice) { return; } try { await choice.run(this.model); } catch (err) { if (err.gitErrorCode !== GitErrorCodes.Conflict) { throw err; } const message = localize('merge conflicts', "There are merge conflicts. Resolve them before committing."); await window.showWarningMessage(message); } } @command('git.createTag') async createTag(): Promise<void> { const inputTagName = await window.showInputBox({ placeHolder: localize('tag name', "Tag name"), prompt: localize('provide tag name', "Please provide a tag name"), ignoreFocusOut: true }); if (!inputTagName) { return; } const inputMessage = await window.showInputBox({ placeHolder: localize('tag message', "Message"), prompt: localize('provide tag message', "Please provide a message"), ignoreFocusOut: true }); const name = inputTagName.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$/g, '-'); const message = inputMessage || name; await this.model.tag(name, message); window.showInformationMessage(localize('tag creation success', "Successfully created tag.")); } @command('git.pullFrom') async pullFrom(): Promise<void> { const remotes = this.model.remotes; if (remotes.length === 0) { window.showWarningMessage(localize('no remotes to pull', "Your repository has no remotes configured to pull from.")); return; } const picks = remotes.map(r => ({ label: r.name, description: r.url })); const placeHolder = localize('pick remote pull repo', "Pick a remote to pull the branch from"); const pick = await window.showQuickPick(picks, { placeHolder }); if (!pick) { return; } const branchName = await window.showInputBox({ placeHolder: localize('branch name', "Branch name"), prompt: localize('provide branch name', "Please provide a branch name"), ignoreFocusOut: true }); if (!branchName) { return; } this.model.pull(false, pick.label, branchName); }
<<<<<<< <location filename="../__main__.py" line="472"/> ======= <location filename="__main__.py" line="468"/> >>>>>>> <location filename="../__main__.py" line="337"/> <source>Frequency hops: {} | Sweep time: {:.2f} s | FPS: {:.2f}</source> <translation type="unfinished"></translation> </message> <message> <location filename="../__main__.py" line="337"/> <source>N/A</source> <translation type="unfinished"></translation> </message> <message> <location filename="../__main__.py" line="504"/> <source>About - QSpectrumAnalyzer</source> <translation type="unfinished"></translation> </message> <message> <location filename="../__main__.py" line="504"/> <<<<<<< <location filename="../__main__.py" line="472"/> ======= <location filename="__main__.py" line="468"/> >>>>>>> <location filename="../__main__.py" line="504"/> <<<<<<< <location filename="../ui_qspectrumanalyzer_settings.py" line="111"/> ======= <location filename="ui_qspectrumanalyzer_settings.py" line="114"/> >>>>>>> <location filename="../__main__.py" line="50"/> <source>Select executable - QSpectrumAnalyzer</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="107"/> <source>Settings - QSpectrumAnalyzer</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="108"/> <source>&amp;Backend:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="115"/> <source>soapy_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="110"/> <source>rx_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="111"/> <source>rtl_power_fftw</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="112"/> <<<<<<< <location filename="../ui_qspectrumanalyzer_settings.py" line="112"/> ======= <location filename="ui_qspectrumanalyzer_settings.py" line="113"/> >>>>>>> <location filename="../ui_qspectrumanalyzer_settings.py" line="115"/> <source>soapy_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="110"/> <source>rx_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="111"/> <source>rtl_power_fftw</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="112"/> <source>rtl_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="113"/> <source>hackrf_sweep</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="114"/> <<<<<<< <location filename="../ui_qspectrumanalyzer_settings.py" line="117"/> ======= <location filename="ui_qspectrumanalyzer_settings.py" line="116"/> >>>>>>> <location filename="../ui_qspectrumanalyzer_settings.py" line="116"/> <source>...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="117"/> <source>Device:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="118"/> <source>Sa&amp;mple rate:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="119"/> <<<<<<< <location filename="../ui_qspectrumanalyzer_settings.py" line="116"/> ======= <location filename="ui_qspectrumanalyzer_settings.py" line="118"/> >>>>>>> <location filename="../ui_qspectrumanalyzer.py" line="326"/> <source>Interval [s]:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="327"/> <source>Gain [dB]:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="329"/> <source>Corr. [ppm]:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="330"/> <source>Crop [%]:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="331"/> <source>Main curve</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="332"/> <source>Colors...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="333"/> <source>Max. hold</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="334"/> <source>Min. hold</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="335"/> <source>Average</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="336"/> <source>Smoothing</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="339"/> <source>...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="338"/> <source>Persistence</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="341"/> <source>&amp;Settings...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="342"/> <source>&amp;Quit</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="343"/> <source>Ctrl+Q</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer.py" line="344"/> <source>&amp;About</source> <translation type="unfinished"></translation> </message> </context> <context> <name>QSpectrumAnalyzerPersistence</name> <message> <location filename="../ui_qspectrumanalyzer_persistence.py" line="68"/> <source>Persistence - QSpectrumAnalyzer</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_persistence.py" line="69"/> <source>Decay function:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_persistence.py" line="70"/> <source>linear</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_persistence.py" line="71"/> <source>exponential</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_persistence.py" line="72"/> <source>Persistence length:</source> <translation type="unfinished"></translation> </message> </context> <context> <name>QSpectrumAnalyzerSettings</name> <message> <location filename="../__main__.py" line="50"/> <source>Select executable - QSpectrumAnalyzer</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="107"/> <source>Settings - QSpectrumAnalyzer</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="108"/> <source>&amp;Backend:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="115"/> <source>soapy_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="110"/> <source>rx_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="111"/> <source>rtl_power_fftw</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="112"/> <source>rtl_power</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="113"/> <source>hackrf_sweep</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="114"/> <source>E&amp;xecutable:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="116"/> <source>...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="117"/> <source>Device:</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ui_qspectrumanalyzer_settings.py" line="118"/> <<<<<<< <location filename="../ui_qspectrumanalyzer_settings.py" line="106"/> ======= <location filename="ui_qspectrumanalyzer_settings.py" line="108"/> >>>>>>> <location filename="../ui_qspectrumanalyzer_settings.py" line="107"/>
<<<<<<< widget.console.inject( args['code'] as string, args['metadata'] as JSONObject ); ======= void widget.console.inject(args['code'] as string); >>>>>>> void widget.console.inject( args['code'] as string, args['metadata'] as JSONObject );
<<<<<<< this._currentChanged.emit(variable); const newScope = this.scopes.map(scope => { const findIndex = scope.variables.findIndex( ele => ele.variablesReference === variable.variablesReference ); scope.variables[findIndex] = variable; return { ...scope }; }); this.scopes = [...newScope]; ======= this._currentVariableChanged.emit(variable); >>>>>>> this._currentChanged.emit(variable); const newScope = this.scopes.map(scope => { const findIndex = scope.variables.findIndex( ele => ele.variablesReference === variable.variablesReference ); scope.variables[findIndex] = variable; return { ...scope }; }); this.scopes = [...newScope]; this._currentVariableChanged.emit(variable); <<<<<<< this._changed.emit(); } get variableExpanded(): ISignal<this, IVariable> { return this._variableExpanded; ======= this._changed.emit(); >>>>>>> this._changed.emit(); } get variableExpanded(): ISignal<this, IVariable> { return this._variableExpanded; <<<<<<< private _currentChanged = new Signal<this, IVariable>(this); private _variableExpanded = new Signal<this, IVariable>(this); private _changed = new Signal<this, void>(this); ======= private _changed = new Signal<this, void>(this); private _currentVariableChanged = new Signal<this, IVariable>(this); >>>>>>> private _currentChanged = new Signal<this, IVariable>(this); private _variableExpanded = new Signal<this, IVariable>(this); private _changed = new Signal<this, void>(this); private _currentVariableChanged = new Signal<this, IVariable>(this);
<<<<<<< await Promise.all([ipySession.initialize(), session.initialize()]); await Promise.all([ipySession.kernel!.ready, session.kernel!.ready]); ======= >>>>>>> <<<<<<< await ipySession.kernel!.restart(); ======= await ipySessionContext.session.kernel.restart(); >>>>>>> await ipySessionContext.session!.kernel!.restart(); <<<<<<< widget.activeCell!.model.value.text = ERROR_INPUT; const result = await NotebookActions.run(widget, ipySession); ======= widget.activeCell.model.value.text = ERROR_INPUT; const result = await NotebookActions.run(widget, ipySessionContext); >>>>>>> widget.activeCell!.model.value.text = ERROR_INPUT; const result = await NotebookActions.run(widget, ipySessionContext); <<<<<<< await ipySession.kernel!.restart(); }).timeout(60000); // Allow for slower CI ======= await ipySessionContext.session.kernel.restart(); }).timeout(120000); // Allow for slower CI >>>>>>> await ipySessionContext.session!.kernel!.restart(); }).timeout(120000); // Allow for slower CI <<<<<<< await ipySession.kernel!.restart(); ======= await ipySessionContext.session.kernel.restart(); >>>>>>> await ipySessionContext.session!.kernel!.restart(); <<<<<<< await ipySession.kernel!.restart(); ======= await ipySessionContext.session.kernel.restart(); >>>>>>> await ipySessionContext.session!.kernel!.restart(); <<<<<<< await ipySession.kernel!.restart(); }).timeout(60000); // Allow for slower CI ======= await ipySessionContext.session.kernel.restart(); }).timeout(120000); // Allow for slower CI >>>>>>> await ipySessionContext.session!.kernel!.restart(); }).timeout(120000); // Allow for slower CI <<<<<<< await ipySession.kernel!.restart(); ======= await ipySessionContext.session.kernel.restart(); >>>>>>> await ipySessionContext.session!.kernel!.restart(); <<<<<<< await ipySession.kernel!.restart(); }).timeout(60000); // Allow for slower CI ======= await ipySessionContext.session.kernel.restart(); }).timeout(120000); // Allow for slower CI >>>>>>> await ipySessionContext.session!.kernel!.restart(); }).timeout(120000); // Allow for slower CI <<<<<<< widget.activeCell!.model.value.text = ERROR_INPUT; const cell = widget.model!.contentFactory.createCodeCell({}); widget.model!.cells.push(cell); const result = await NotebookActions.runAll(widget, ipySession); ======= widget.activeCell.model.value.text = ERROR_INPUT; const cell = widget.model.contentFactory.createCodeCell({}); widget.model.cells.push(cell); const result = await NotebookActions.runAll(widget, ipySessionContext); >>>>>>> widget.activeCell!.model.value.text = ERROR_INPUT; const cell = widget.model!.contentFactory.createCodeCell({}); widget.model!.cells.push(cell); const result = await NotebookActions.runAll(widget, ipySessionContext); <<<<<<< await ipySession.kernel!.restart(); ======= await ipySessionContext.session.kernel.restart(); >>>>>>> await ipySessionContext.session!.kernel!.restart(); <<<<<<< await ipySession.kernel!.restart(); }).timeout(60000); // Allow for slower CI ======= await ipySessionContext.session.kernel.restart(); }).timeout(120000); // Allow for slower CI >>>>>>> await ipySessionContext.session!.kernel!.restart(); }).timeout(120000); // Allow for slower CI
<<<<<<< args: panel => ({ path: panel.console.sessionContext.session?.path, name: panel.console.sessionContext.session?.name, ======= args: widget => ({ path: widget.content.console.session.path, name: widget.content.console.session.name, >>>>>>> args: widget => ({ path: widget.content.console.sessionContext.session?.path, name: widget.content.console.sessionContext.session?.name, <<<<<<< name: panel.console.sessionContext.kernelPreference.name, language: panel.console.sessionContext.kernelPreference.language ======= name: widget.content.console.session.kernelPreference.name, language: widget.content.console.session.kernelPreference.language >>>>>>> name: widget.content.console.sessionContext.kernelPreference.name, language: widget.content.console.sessionContext.kernelPreference.language <<<<<<< name: panel => panel.console.sessionContext.session?.path, ======= name: widget => widget.content.console.session.path, >>>>>>> name: widget => widget.content.console.sessionContext.session?.path, <<<<<<< await tracker.add(panel); panel.sessionContext.propertyChanged.connect(() => tracker.save(panel)); ======= await tracker.add(widget); panel.session.propertyChanged.connect(() => tracker.save(widget)); >>>>>>> await tracker.add(widget); panel.sessionContext.propertyChanged.connect(() => tracker.save(widget)); <<<<<<< return value.console.sessionContext.session?.path === path; ======= return value.content.console.session.path === path; >>>>>>> return value.content.console.sessionContext.session?.path === path; <<<<<<< if (widget.console.sessionContext.session?.path === path) { ======= if (widget.content.console.session.path === path) { >>>>>>> if (widget.content.console.sessionContext.session?.path === path) { <<<<<<< return current.console.sessionContext.shutdown().then(() => { ======= return current.content.console.session.shutdown().then(() => { >>>>>>> return current.content.console.sessionContext.shutdown().then(() => { <<<<<<< let kernel = current.console.sessionContext.session?.kernel; ======= let kernel = current.content.console.session.kernel; >>>>>>> let kernel = current.content.console.sessionContext.session?.kernel; <<<<<<< restartKernel: current => current.console.sessionContext.restart(), ======= restartKernel: current => current.content.console.session.restart(), >>>>>>> restartKernel: current => current.content.console.sessionContext.restart(), <<<<<<< return current.console.sessionContext.restart().then(restarted => { ======= return current.content.console.session.restart().then(restarted => { >>>>>>> return current.content.console.sessionContext .restart() .then(restarted => { <<<<<<< getKernel: current => current.sessionContext.session?.kernel } as IHelpMenu.IKernelUser<ConsolePanel>); ======= getKernel: current => current.content.session.kernel } as IHelpMenu.IKernelUser<MainAreaWidget<ConsolePanel>>); >>>>>>> getKernel: current => current.content.sessionContext.session?.kernel } as IHelpMenu.IKernelUser<ConsolePanel>);
<<<<<<< this.toggleClass('jp-mod-light', theme === 'light'); ======= >>>>>>> <<<<<<< ======= void value.ready.then(() => { if (this.isDisposed || value !== this._session) { return; } value.messageReceived.connect(this._onMessage, this); this.title.label = `Terminal ${value.name}`; this._setSessionSize(); if (this._options.initialCommand) { this._session.send({ type: 'stdin', content: [this._options.initialCommand + '\r'] }); } }); >>>>>>> void value.ready.then(() => { if (this.isDisposed || value !== this._session) { return; } value.messageReceived.connect(this._onMessage, this); this.title.label = `Terminal ${value.name}`; this._setSessionSize(); if (this._options.initialCommand) { this._session.send({ type: 'stdin', content: [this._options.initialCommand + '\r'] }); } }); <<<<<<< switch (option) { case 'initialCommand': return; case 'theme': this.toggleClass('jp-mod-light', value === 'light'); this._term.setOption( 'theme', value === 'light' ? Private.lightTheme : Private.darkTheme ); break; default: this._term.setOption(option, value); this._needsResize = true; break; ======= if (option === 'theme') { this._term.setOption( 'theme', Private.getXTermTheme(value as Terminal.ITheme) ); } else { this._term.setOption(option, value); >>>>>>> switch (option) { case 'theme': this._term.setOption( 'theme', Private.getXTermTheme(value as Terminal.ITheme) ); break; default: this._term.setOption(option, value); break; <<<<<<< private _options: ITerminal.IOptions; ======= private _options: Terminal.IOptions; } /** * The namespace for `Terminal` class statics. */ export namespace Terminal { /** * Options for the terminal widget. */ export interface IOptions { /** * The font family used to render text. */ fontFamily: string | null; /** * The font size of the terminal in pixels. */ fontSize: number; /** * The line height used to render text. */ lineHeight: number | null; /** * The theme of the terminal. */ theme: ITheme; /** * The amount of buffer scrollback to be used * with the terminal */ scrollback: number | null; /** * Whether to blink the cursor. Can only be set at startup. */ cursorBlink: boolean; /** * An optional command to run when the session starts. */ initialCommand: string; } /** * The default options used for creating terminals. */ export const defaultOptions: IOptions = { theme: 'inherit', fontFamily: 'courier-new, courier, monospace', fontSize: 13, lineHeight: 1.0, scrollback: 1000, cursorBlink: true, initialCommand: '' }; /** * A type for the terminal theme. */ export type ITheme = 'light' | 'dark' | 'inherit'; /** * A type for the terminal theme. */ export interface IThemeObject { foreground: string; background: string; cursor: string; cursorAccent: string; selection: string; } >>>>>>> private _options: Terminal.IOptions; } /** * The namespace for `Terminal` class statics. */ export namespace Terminal { /** * Options for the terminal widget. */ export interface IOptions { /** * The font family used to render text. */ fontFamily: string | null; /** * The font size of the terminal in pixels. */ fontSize: number; /** * The line height used to render text. */ lineHeight: number | null; /** * The theme of the terminal. */ theme: ITheme; /** * The amount of buffer scrollback to be used * with the terminal */ scrollback: number | null; /** * Whether to blink the cursor. Can only be set at startup. */ cursorBlink: boolean; /** * An optional command to run when the session starts. */ initialCommand: string; } /** * The default options used for creating terminals. */ export const defaultOptions: IOptions = { theme: 'inherit', fontFamily: 'courier-new, courier, monospace', fontSize: 13, lineHeight: 1.0, scrollback: 1000, cursorBlink: true, initialCommand: '' }; /** * A type for the terminal theme. */ export type ITheme = 'light' | 'dark' | 'inherit'; /** * A type for the terminal theme. */ export interface IThemeObject { foreground: string; background: string; cursor: string; cursorAccent: string; selection: string; }
<<<<<<< sanitizer: ISanitizer, needNumbering = true, ======= sanitizer: ISanitizer >>>>>>> sanitizer: ISanitizer, needNumbering = true, <<<<<<< let numberingDict: { [level: number]: number } = { }; each(panel.notebook.widgets, cell => { ======= each(panel.content.widgets, cell => { >>>>>>> let numberingDict: { [level: number]: number } = { }; each(panel.content.widgets, cell => { <<<<<<< sanitizer, numberingDict ), ======= sanitizer ) >>>>>>> sanitizer, numberingDict ) <<<<<<< sanitizer, numberingDict ), ======= sanitizer ) >>>>>>> sanitizer, numberingDict ) <<<<<<< Private.getMarkdownHeadings(model.value.text, onClickFactory, numberingDict), ======= Private.getMarkdownHeadings(model.value.text, onClickFactory) >>>>>>> Private.getMarkdownHeadings(model.value.text, onClickFactory, numberingDict) <<<<<<< return Private.getMarkdownHeadings(model.value.text, onClickFactory, null); ======= return Private.getMarkdownHeadings(model.value.text, onClickFactory); } }; } /** * Create a TOC generator for rendered markdown files. * * @param tracker: A file editor tracker. * * @returns A TOC generator that can parse markdown files. */ export function createRenderedMarkdownGenerator( tracker: IInstanceTracker<MimeDocument>, sanitizer: ISanitizer ): TableOfContentsRegistry.IGenerator<MimeDocument> { return { tracker, usesLatex: true, isEnabled: widget => { // Only enable this if the editor mimetype matches // one of a few markdown variants. return Private.isMarkdown(widget.content.mimeType); >>>>>>> return Private.getMarkdownHeadings(model.value.text, onClickFactory, null); } }; } /** * Create a TOC generator for rendered markdown files. * * @param tracker: A file editor tracker. * * @returns A TOC generator that can parse markdown files. */ export function createRenderedMarkdownGenerator( tracker: IInstanceTracker<MimeDocument>, sanitizer: ISanitizer ): TableOfContentsRegistry.IGenerator<MimeDocument> { return { tracker, usesLatex: true, isEnabled: widget => { // Only enable this if the editor mimetype matches // one of a few markdown variants. return Private.isMarkdown(widget.content.mimeType); <<<<<<< onClickFactory: (line: number) => (() => void), numberingDict: any ======= onClickFactory: (line: number) => (() => void) >>>>>>> onClickFactory: (line: number) => (() => void), numberingDict: any <<<<<<< let numbering = Private.generateNumbering(numberingDict, level); headings.push({text, level, numbering, onClick}); ======= headings.push({ text, level, onClick }); >>>>>>> let numbering = Private.generateNumbering(numberingDict, level); headings.push({text, level, numbering, onClick}); <<<<<<< let numbering = Private.generateNumbering(numberingDict, level); headings.push({text, level, numbering, onClick}); ======= headings.push({ text, level, onClick }); >>>>>>> let numbering = Private.generateNumbering(numberingDict, level); headings.push({text, level, numbering, onClick}); <<<<<<< let numbering = Private.generateNumbering(numberingDict, level); headings.push({text, level, numbering, onClick}); ======= headings.push({ text, level, onClick }); >>>>>>> let numbering = Private.generateNumbering(numberingDict, level); headings.push({text, level, numbering, onClick}); <<<<<<< sanitizer: ISanitizer, numberingDict: any ======= sanitizer: ISanitizer >>>>>>> sanitizer: ISanitizer, numberingDict: any <<<<<<< const level = parseInt(heading.tagName[1]); const text = heading.textContent; if (heading.getElementsByClassName('numbering-entry').length > 0) { heading.removeChild((heading.getElementsByClassName('numbering-entry')[0])); } ======= const level = parseInt(heading.tagName[1], 10); const text = heading.textContent || ''; >>>>>>> const level = parseInt(heading.tagName[1]); const text = heading.textContent; if (heading.getElementsByClassName('numbering-entry').length > 0) { heading.removeChild((heading.getElementsByClassName('numbering-entry')[0])); } <<<<<<< let numbering = Private.generateNumbering(numberingDict, level); heading.innerHTML = '<span class="numbering-entry">' + numbering + '</span>' + html; headings.push({level, text, numbering, html, onClick}); ======= headings.push({ level, text, html, onClick }); >>>>>>> let numbering = Private.generateNumbering(numberingDict, level); heading.innerHTML = '<span class="numbering-entry">' + numbering + '</span>' + html; headings.push({level, text, numbering, html, onClick});
<<<<<<< import { mergeTypeDefs } from '@graphql-tools/merge' ======= import { GraphQLSchema, GraphQLFieldMap } from 'graphql' >>>>>>> import { mergeTypeDefs } from '@graphql-tools/merge' import { GraphQLSchema, GraphQLFieldMap } from 'graphql'
<<<<<<< editor.setGutterMarker( lineNumber, 'breakpoints', isRemoveGutter ? null : Private.createMarkerNode() ); setTimeout(this.setHover); ======= >>>>>>> <<<<<<< export function createHoverNode() { let hoverGutterElement = document.createElement('div'); hoverGutterElement.innerHTML = '●'; hoverGutterElement.className = GUTTER_HOVER_CLASS; hoverGutterElement.hidden = true; return hoverGutterElement; } ======= export function createBreakpoint( session: string, type: string, line: number ) { return { line, active: true, verified: true, source: { name: session } }; } >>>>>>> export function createHoverNode() { let hoverGutterElement = document.createElement('div'); hoverGutterElement.innerHTML = '●'; hoverGutterElement.className = GUTTER_HOVER_CLASS; hoverGutterElement.hidden = true; return hoverGutterElement; } export function createBreakpoint( session: string, type: string, line: number ) { return { line, active: true, verified: true, source: { name: session } }; }
<<<<<<< private _session: IDebugger.ISession | null; private _sessionChanged = new Signal<this, void>(this); private _service = new DebugService(null, this); private _currentLineChanged = new Signal<this, number>(this); ======= >>>>>>> private _currentLineChanged = new Signal<this, number>(this);
<<<<<<< if (args['isLauncher'] && args['kernelName'] && services.specs) { return services.specs.kernelspecs[kernelName].display_name; ======= if (args['isLauncher'] && args['kernelName']) { return services.kernelspecs.specs.kernelspecs[kernelName].display_name; >>>>>>> if (args['isLauncher'] && args['kernelName'] && services.kernelspecs) { return ( services.kernelspecs.specs?.kernelspecs[kernelName]?.display_name ?? '' ); <<<<<<< let reply = await current.context.session.kernel?.requestIsComplete({ // ipython needs an empty line at the end to correctly identify completeness of indented code code: code + '\n\n' }); if (reply?.content.status === 'complete') { ======= let reply = await current.context.sessionContext.session?.kernel?.requestIsComplete( { // ipython needs an empty line at the end to correctly identify completeness of indented code code: code + '\n\n' } ); if (reply.content.status === 'complete') { >>>>>>> let reply = await current.context.sessionContext.session?.kernel?.requestIsComplete( { // ipython needs an empty line at the end to correctly identify completeness of indented code code: code + '\n\n' } ); if (reply?.content.status === 'complete') {
<<<<<<< map.set(source, breakpoints); ======= map.set( source, breakpoints.map(point => ({ ...point, verified: true, active: true })) ); >>>>>>> map.set( source, breakpoints.map(point => ({ ...point, verified: true })) );
<<<<<<< import { azureActiveDirectory } from './azureActiveDirectory' ======= import { netlify } from './netlify' import { supabase } from './supabase' >>>>>>> import { azureActiveDirectory } from './azureActiveDirectory' import { netlify } from './netlify' import { supabase } from './supabase'
<<<<<<< import { shapeFromPly } from 'mol-model/shape/formarts/ply/plyData_to_shape'; ======= import { PluginStateObject as SO, PluginStateTransform } from '../objects'; import { trajectoryFromGRO } from 'mol-model-formats/structure/gro'; import { parseGRO } from 'mol-io/reader/gro/parser'; import { parseMolScript } from 'mol-script/language/parser'; import { transpileMolScript } from 'mol-script/script/mol-script/symbols'; export { TrajectoryFromBlob }; export { TrajectoryFromMmCif }; export { TrajectoryFromPDB }; export { TrajectoryFromGRO }; export { ModelFromTrajectory }; export { StructureFromModel }; export { StructureAssemblyFromModel }; export { StructureSymmetryFromModel }; export { StructureSelection }; export { UserStructureSelection }; export { StructureComplexElement }; export { CustomModelProperties }; type TrajectoryFromBlob = typeof TrajectoryFromBlob const TrajectoryFromBlob = PluginStateTransform.BuiltIn({ name: 'trajectory-from-blob', display: { name: 'Parse Blob', description: 'Parse format blob into a single trajectory.' }, from: SO.Format.Blob, to: SO.Molecule.Trajectory })({ apply({ a }) { return Task.create('Parse Format Blob', async ctx => { const models: Model[] = []; for (const e of a.data) { if (e.kind !== 'cif') continue; const block = e.data.blocks[0]; const xs = await trajectoryFromMmCIF(block).runInContext(ctx); if (xs.length === 0) throw new Error('No models found.'); for (const x of xs) models.push(x); } const props = { label: `Trajectory`, description: `${models.length} model${models.length === 1 ? '' : 's'}` }; return new SO.Molecule.Trajectory(models, props); }); } }); >>>>>>> import { shapeFromPly } from 'mol-model/shape/formarts/ply/plyData_to_shape'; import { PluginStateObject as SO, PluginStateTransform } from '../objects'; import { trajectoryFromGRO } from 'mol-model-formats/structure/gro'; import { parseGRO } from 'mol-io/reader/gro/parser'; import { parseMolScript } from 'mol-script/language/parser'; import { transpileMolScript } from 'mol-script/script/mol-script/symbols'; export { TrajectoryFromBlob }; export { TrajectoryFromMmCif }; export { TrajectoryFromPDB }; export { TrajectoryFromGRO }; export { ModelFromTrajectory }; export { StructureFromModel }; export { StructureAssemblyFromModel }; export { StructureSymmetryFromModel }; export { StructureSelection }; export { UserStructureSelection }; export { StructureComplexElement }; export { CustomModelProperties }; type TrajectoryFromBlob = typeof TrajectoryFromBlob const TrajectoryFromBlob = PluginStateTransform.BuiltIn({ name: 'trajectory-from-blob', display: { name: 'Parse Blob', description: 'Parse format blob into a single trajectory.' }, from: SO.Format.Blob, to: SO.Molecule.Trajectory })({ apply({ a }) { return Task.create('Parse Format Blob', async ctx => { const models: Model[] = []; for (const e of a.data) { if (e.kind !== 'cif') continue; const block = e.data.blocks[0]; const xs = await trajectoryFromMmCIF(block).runInContext(ctx); if (xs.length === 0) throw new Error('No models found.'); for (const x of xs) models.push(x); } const props = { label: `Trajectory`, description: `${models.length} model${models.length === 1 ? '' : 's'}` }; return new SO.Molecule.Trajectory(models, props); }); } });
<<<<<<< import { Color } from '../../mol-util/color'; ======= import { CustomPropertyDescriptor } from '../../mol-model/custom-property'; >>>>>>> import { Color } from '../../mol-util/color'; import { CustomPropertyDescriptor } from '../../mol-model/custom-property';
<<<<<<< import { PrismaClient } from '@prisma/client' ======= /* eslint-disable @typescript-eslint/ban-ts-comment */ import type { GlobalContext } from 'src/globalContext' const { prismaVersion } = require('@prisma/client') import gql from 'graphql-tag' >>>>>>> /* eslint-disable @typescript-eslint/ban-ts-comment */ <<<<<<< version: apiPackageJson.version as string, // cast because TS will forget prismaVersion: () => PrismaClient.prismaVersion, ======= version: apiPackageJson.version, prismaVersion: () => prismaVersion.client, >>>>>>> version: apiPackageJson.version as string, prismaVersion: () => prismaVersion.client,
<<<<<<< if (this.wboit?.supported) { ======= ValueCell.update(this.copyFboTarget.values.uTexSize, Vec2.set(this.copyFboTarget.values.uTexSize.ref.value, width, height)); ValueCell.update(this.copyFboPostprocessing.values.uTexSize, Vec2.set(this.copyFboPostprocessing.values.uTexSize.ref.value, width, height)); if (this.wboit?.enabled) { >>>>>>> ValueCell.update(this.copyFboTarget.values.uTexSize, Vec2.set(this.copyFboTarget.values.uTexSize.ref.value, width, height)); ValueCell.update(this.copyFboPostprocessing.values.uTexSize, Vec2.set(this.copyFboPostprocessing.values.uTexSize.ref.value, width, height)); if (this.wboit?.supported) { <<<<<<< private _renderWboit(renderer: Renderer, camera: ICamera, scene: Scene, toDrawingBuffer: boolean) { if (!this.wboit?.supported) throw new Error('expected wboit to be enabled'); ======= private _renderWboit(renderer: Renderer, camera: ICamera, scene: Scene, backgroundColor: Color, postprocessingProps: PostprocessingProps) { if (!this.wboit?.enabled) throw new Error('expected wboit to be enabled'); >>>>>>> private _renderWboit(renderer: Renderer, camera: ICamera, scene: Scene, backgroundColor: Color, postprocessingProps: PostprocessingProps) { if (!this.wboit?.supported) throw new Error('expected wboit to be supported');
<<<<<<< const residues = [start as Element], chains = [start as Element]; ======= const residues = [start as ElementIndex], chains = [start as ElementIndex], polymers = [start as ElementIndex]; >>>>>>> const residues = [start as ElementIndex], chains = [start as ElementIndex]; <<<<<<< if (newResidue) residues[residues.length] = i as Element; if (newChain) chains[chains.length] = i as Element; ======= if (newResidue) residues[residues.length] = i; if (newPolymer) polymers[polymers.length] = i; if (newChain) chains[chains.length] = i; >>>>>>> if (newResidue) residues[residues.length] = i as ElementIndex; if (newChain) chains[chains.length] = i as ElementIndex; <<<<<<< residueSegments: Segmentation.ofOffsets(hierarchyOffsets.residues, Interval.ofBounds(0, atom_site._rowCount)), chainSegments: Segmentation.ofOffsets(hierarchyOffsets.chains, Interval.ofBounds(0, atom_site._rowCount)), ======= residueAtomSegments: Segmentation.ofOffsets(hierarchyOffsets.residues, Interval.ofBounds(0, atom_site._rowCount)), chainAtomSegments: Segmentation.ofOffsets(hierarchyOffsets.chains, Interval.ofBounds(0, atom_site._rowCount)), polymerAtomSegments: Segmentation.ofOffsets(hierarchyOffsets.polymers, Interval.ofBounds(0, atom_site._rowCount)), >>>>>>> residueAtomSegments: Segmentation.ofOffsets(hierarchyOffsets.residues, Interval.ofBounds(0, atom_site._rowCount)), chainAtomSegments: Segmentation.ofOffsets(hierarchyOffsets.chains, Interval.ofBounds(0, atom_site._rowCount)),
<<<<<<< import { Transformer } from 'mol-state'; import { readFromFile } from 'mol-util/data-source'; import * as PLY from 'mol-io/reader/ply/parse_data/ply_parser' ======= import { StateTransformer } from 'mol-state'; import { readFromFile, ajaxGetMany } from 'mol-util/data-source'; import * as CCP4 from 'mol-io/reader/ccp4/parser' import * as DSN6 from 'mol-io/reader/dsn6/parser' >>>>>>> import { StateTransformer } from 'mol-state'; import { readFromFile, ajaxGetMany } from 'mol-util/data-source'; import * as CCP4 from 'mol-io/reader/ccp4/parser' import * as DSN6 from 'mol-io/reader/dsn6/parser' import * as PLY from 'mol-io/reader/ply/parse_data/ply_parser' <<<<<<< }); export { ParsePly } type ParsePly = typeof ParsePly const ParsePly = PluginStateTransform.BuiltIn({ name: 'parse-ply', display: { name: 'Parse PLY', description: 'Parse PLY from Binary data' }, from: [SO.Data.String], to: SO.Format.Ply })({ apply({ a }) { return Task.create('Parse PLY', async ctx => { const parsed = await PLY.parse(a.data).runInContext(ctx); if (parsed.isError) throw new Error(parsed.message); return new SO.Format.Ply(parsed.result, { label: parsed.result.name || 'PLY Data' }); }); } ======= }); export { ParseCcp4 } type ParseCcp4 = typeof ParseCcp4 const ParseCcp4 = PluginStateTransform.BuiltIn({ name: 'parse-ccp4', display: { name: 'Parse CCP4/MRC/MAP', description: 'Parse CCP4/MRC/MAP from Binary data' }, from: [SO.Data.Binary], to: SO.Format.Ccp4 })({ apply({ a }) { return Task.create('Parse CCP4/MRC/MAP', async ctx => { const parsed = await CCP4.parse(a.data).runInContext(ctx); if (parsed.isError) throw new Error(parsed.message); return new SO.Format.Ccp4(parsed.result); }); } }); export { ParseDsn6 } type ParseDsn6 = typeof ParseDsn6 const ParseDsn6 = PluginStateTransform.BuiltIn({ name: 'parse-dsn6', display: { name: 'Parse DSN6/BRIX', description: 'Parse CCP4/BRIX from Binary data' }, from: [SO.Data.Binary], to: SO.Format.Dsn6 })({ apply({ a }) { return Task.create('Parse DSN6/BRIX', async ctx => { const parsed = await DSN6.parse(a.data).runInContext(ctx); if (parsed.isError) throw new Error(parsed.message); return new SO.Format.Dsn6(parsed.result); }); } >>>>>>> }); export { ParsePly } type ParsePly = typeof ParsePly const ParsePly = PluginStateTransform.BuiltIn({ name: 'parse-ply', display: { name: 'Parse PLY', description: 'Parse PLY from Binary data' }, from: [SO.Data.String], to: SO.Format.Ply })({ apply({ a }) { return Task.create('Parse PLY', async ctx => { const parsed = await PLY.parse(a.data).runInContext(ctx); if (parsed.isError) throw new Error(parsed.message); return new SO.Format.Ply(parsed.result, { label: parsed.result.name || 'PLY Data' }); }); } }); export { ParseCcp4 } type ParseCcp4 = typeof ParseCcp4 const ParseCcp4 = PluginStateTransform.BuiltIn({ name: 'parse-ccp4', display: { name: 'Parse CCP4/MRC/MAP', description: 'Parse CCP4/MRC/MAP from Binary data' }, from: [SO.Data.Binary], to: SO.Format.Ccp4 })({ apply({ a }) { return Task.create('Parse CCP4/MRC/MAP', async ctx => { const parsed = await CCP4.parse(a.data).runInContext(ctx); if (parsed.isError) throw new Error(parsed.message); return new SO.Format.Ccp4(parsed.result); }); } }); export { ParseDsn6 } type ParseDsn6 = typeof ParseDsn6 const ParseDsn6 = PluginStateTransform.BuiltIn({ name: 'parse-dsn6', display: { name: 'Parse DSN6/BRIX', description: 'Parse CCP4/BRIX from Binary data' }, from: [SO.Data.Binary], to: SO.Format.Dsn6 })({ apply({ a }) { return Task.create('Parse DSN6/BRIX', async ctx => { const parsed = await DSN6.parse(a.data).runInContext(ctx); if (parsed.isError) throw new Error(parsed.message); return new SO.Format.Dsn6(parsed.result); }); }
<<<<<<< import { GeneColorThemeProvider } from './color/gene'; ======= import { IllustrativeColorThemeProvider } from './color/illustrative'; import { HydrophobicityColorThemeProvider } from './color/hydrophobicity'; >>>>>>> import { GeneColorThemeProvider } from './color/gene'; import { IllustrativeColorThemeProvider } from './color/illustrative'; import { HydrophobicityColorThemeProvider } from './color/hydrophobicity'; <<<<<<< 'gene': GeneColorThemeProvider, ======= 'hydrophobicity': HydrophobicityColorThemeProvider, 'illustrative': IllustrativeColorThemeProvider, >>>>>>> 'gene': GeneColorThemeProvider, 'hydrophobicity': HydrophobicityColorThemeProvider, 'illustrative': IllustrativeColorThemeProvider,
<<<<<<< export function isLocation(x: any): x is StructureElement { return !!x && x.kind === 'element-location'; } ======= export function residueIndex(e: StructureElement) { if (Unit.isAtomic(e.unit)) { return e.unit.residueIndex[e.element]; } else { // TODO: throw error instead? return -1 as ResidueIndex; } } export function chainIndex(e: StructureElement) { if (Unit.isAtomic(e.unit)) { return e.unit.chainIndex[e.element]; } else { // TODO: throw error instead? return -1 as ChainIndex; } } export function entityIndex(l: StructureElement) { switch (l.unit.kind) { case Unit.Kind.Atomic: return l.unit.model.atomicHierarchy.getEntityKey(l.unit.chainIndex[l.element]) case Unit.Kind.Spheres: return l.unit.model.coarseHierarchy.spheres.entityKey[l.element] case Unit.Kind.Gaussians: return l.unit.model.coarseHierarchy.gaussians.entityKey[l.element] } } >>>>>>> export function isLocation(x: any): x is StructureElement { return !!x && x.kind === 'element-location'; } export function residueIndex(e: StructureElement) { if (Unit.isAtomic(e.unit)) { return e.unit.residueIndex[e.element]; } else { // TODO: throw error instead? return -1 as ResidueIndex; } } export function chainIndex(e: StructureElement) { if (Unit.isAtomic(e.unit)) { return e.unit.chainIndex[e.element]; } else { // TODO: throw error instead? return -1 as ChainIndex; } } export function entityIndex(l: StructureElement) { switch (l.unit.kind) { case Unit.Kind.Atomic: return l.unit.model.atomicHierarchy.getEntityKey(l.unit.chainIndex[l.element]) case Unit.Kind.Spheres: return l.unit.model.coarseHierarchy.spheres.entityKey[l.element] case Unit.Kind.Gaussians: return l.unit.model.coarseHierarchy.gaussians.entityKey[l.element] } }