-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 89de2bd Author: meganrogge <[email protected]> Date: Tue Jun 15 11:43:13 2021 -0700 dispose of instance on close of editor commit 583f348 Author: meganrogge <[email protected]> Date: Tue Jun 15 11:21:02 2021 -0700 get unique terminal instances to work Co-authored-by: Daniel Imms <[email protected]> commit 7fa7440 Author: meganrogge <[email protected]> Date: Tue Jun 15 09:44:29 2021 -0700 call attachToElement in setInput commit 5416f75 Author: Benjamin Pasero <[email protected]> Date: Tue Jun 15 15:49:49 2021 +0200 :chore: - ignore unhandled promise cancel rejections //cc @joaomoreno @alexdima @sbatten commit 55c6ee0 Author: Benjamin Pasero <[email protected]> Date: Tue Jun 15 15:45:10 2021 +0200 . commit 25fe69f Author: Benjamin Pasero <[email protected]> Date: Tue Jun 15 15:40:20 2021 +0200 fix emmet test integration path commit f4bc7d3 Author: Martin Aeschlimann <[email protected]> Date: Tue Jun 15 15:34:54 2021 +0200 Use custom hover for all status bar entries commit 5b79dcf Author: Martin Aeschlimann <[email protected]> Date: Tue Jun 15 15:17:12 2021 +0200 MarkdownString for StatusBarItem.tooltip. For #126258 commit 0a0c8f3 Author: João Moreno <[email protected]> Date: Tue Jun 15 15:29:36 2021 +0200 Revert "switch to generic pool" This reverts commit 6495c05. commit 19f9cd4 Author: Johannes Rieken <[email protected]> Date: Tue Jun 15 15:24:09 2021 +0200 fix #125942 commit c6945f1 Author: João Moreno <[email protected]> Date: Tue Jun 15 15:15:41 2021 +0200 fix integration browser tests commit e99f791 Author: Sandeep Somavarapu <[email protected]> Date: Mon Jun 14 23:29:27 2021 +0200 - move writing user configuration to main process - safe guard read from writing in parallel from other windows commit 4a840ce Author: Megan Rogge <[email protected]> Date: Tue Jun 15 07:31:23 2021 -0500 finalize terminal iconPath (#125783) commit 5745873 Author: Alex Ross <[email protected]> Date: Tue Jun 15 14:08:59 2021 +0200 Fix timing issue where port detection can fail to start commit d47661d Author: João Moreno <[email protected]> Date: Tue Jun 15 14:07:35 2021 +0200 skip the entire notebook test suite so Code isn't even launched commit 41c7c25 Author: Alex Ross <[email protected]> Date: Tue Jun 15 13:20:11 2021 +0200 Fix task close=false Fixes #126352 commit 5d70c90 Author: Ladislau Szomoru <[email protected]> Date: Tue Jun 15 13:08:59 2021 +0200 💄 clean-up workspace contribution commit 537b1f0 Author: meganrogge <[email protected]> Date: Tue Jun 15 07:00:12 2021 -0700 add icon manager commit e97953a Author: Daniel Imms <[email protected]> Date: Tue Jun 15 06:57:18 2021 -0700 Add move to editor command Part of #126247 commit 56501c5 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 06:50:21 2021 -0700 Disable serialization by returning undefined commit 52d8d8e Merge: 46877c9 f569691 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 06:43:37 2021 -0700 Merge pull request #126383 from microsoft/merogge/terminalEditor_tyriar Terminal editor lifecycle work commit f569691 Merge: a215c79 46877c9 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 06:26:45 2021 -0700 Merge remote-tracking branch 'origin/merogge/terminalEditor' into merogge/terminalEditor_tyriar commit 46877c9 Author: meganrogge <[email protected]> Date: Tue Jun 15 06:16:17 2021 -0700 fix serialization error commit a215c79 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 06:10:21 2021 -0700 Move editor creation into new service commit 4475d84 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 05:03:39 2021 -0700 Create editor terminal in terminal service commit 86b4336 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 04:44:53 2021 -0700 Make detach return a Promise Part of #118276 commit 120f9b8 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 04:34:42 2021 -0700 Change createTerminal signature to use options object commit 0baba5e Author: Daniel Imms <[email protected]> Date: Tue Jun 15 04:14:27 2021 -0700 Rename editor to just 'Terminal' Other editors that don't actually edit don't have 'Editor' in the name either (eg. Running Extensions), so it will be an internal term. commit 8bb96ce Author: Daniel Imms <[email protected]> Date: Tue Jun 15 04:11:08 2021 -0700 Inline terminal editor input ID commit c2304c2 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 04:07:57 2021 -0700 Remove unneeded ! commit 8367f18 Merge: c29d362 9b4f499 Author: Daniel Imms <[email protected]> Date: Tue Jun 15 04:05:12 2021 -0700 Merge remote-tracking branch 'origin/main' into merogge/terminalEditor commit c29d362 Author: meganrogge <[email protected]> Date: Mon Jun 14 19:23:52 2021 -0700 use terminal instance.resource commit fb50a7f Author: meganrogge <[email protected]> Date: Mon Jun 14 17:13:51 2021 -0700 revert some css changes commit 50b6b81 Author: meganrogge <[email protected]> Date: Mon Jun 14 15:53:47 2021 -0700 add copy and try a few other things commit 0c226cd Author: meganrogge <[email protected]> Date: Mon Jun 14 13:13:28 2021 -0700 clean up commit e4c8b94 Author: meganrogge <[email protected]> Date: Mon Jun 14 12:03:05 2021 -0700 remove unnecessary changes commit 31bcda4 Author: meganrogge <[email protected]> Date: Mon Jun 14 11:45:41 2021 -0700 add basics for #126244
- Loading branch information
1 parent
79d338b
commit 22f216d
Showing
16 changed files
with
432 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
src/vs/workbench/contrib/terminal/browser/terminalEditor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { Dimension } from 'vs/base/browser/dom'; | ||
import { CancellationToken } from 'vs/base/common/cancellation'; | ||
import { IEditorOptions } from 'vs/platform/editor/common/editor'; | ||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; | ||
import { IStorageService } from 'vs/platform/storage/common/storage'; | ||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; | ||
import { IThemeService } from 'vs/platform/theme/common/themeService'; | ||
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane'; | ||
import { IEditorInputSerializer, IEditorOpenContext } from 'vs/workbench/common/editor'; | ||
import { TerminalEditorInput } from 'vs/workbench/contrib/terminal/browser/terminalEditorInput'; | ||
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; | ||
|
||
export class TerminalEditor extends EditorPane { | ||
|
||
public static readonly ID = 'terminalEditor'; | ||
|
||
private _parentElement: HTMLElement | undefined; | ||
private _editorInput?: TerminalEditorInput = undefined; | ||
|
||
private _lastDimension?: Dimension; | ||
|
||
override async setInput(newInput: TerminalEditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken) { | ||
this._editorInput?.terminalInstance?.detachFromElement(); | ||
this._editorInput = newInput; | ||
await super.setInput(newInput, options, context, token); | ||
this._editorInput.terminalInstance.attachToElement(this._parentElement!); | ||
if (this._lastDimension) { | ||
this.layout(this._lastDimension); | ||
} | ||
this._editorInput.terminalInstance.setVisible(true); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
protected createEditor(parent: HTMLElement): void { | ||
this._parentElement = parent; | ||
} | ||
|
||
layout(dimension: Dimension): void { | ||
if (this._editorInput?.terminalInstance) { | ||
this._editorInput.terminalInstance.layout(dimension); | ||
} | ||
this._lastDimension = dimension; | ||
} | ||
|
||
override setVisible(visible: boolean, group?: IEditorGroup): void { | ||
super.setVisible(visible, group); | ||
|
||
if (!this._editorInput?.terminalInstance) { | ||
return; | ||
} | ||
|
||
this._editorInput.terminalInstance.setVisible(visible); | ||
} | ||
|
||
constructor( | ||
@ITelemetryService telemetryService: ITelemetryService, | ||
@IThemeService themeService: IThemeService, | ||
@IStorageService storageService: IStorageService, | ||
) { | ||
super(TerminalEditor.ID, telemetryService, themeService, storageService); | ||
} | ||
} | ||
|
||
export class TerminalInputSerializer implements IEditorInputSerializer { | ||
public canSerialize(editorInput: TerminalEditorInput): boolean { | ||
return false; | ||
} | ||
|
||
public serialize(editorInput: TerminalEditorInput): string | undefined { | ||
return undefined; | ||
} | ||
|
||
public deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): TerminalEditorInput { | ||
// TODO: Attach to instanceId via pty service | ||
throw new Error('NYI'); | ||
} | ||
} |
Oops, something went wrong.