bring titlebarplus up to date

* Merge NPM Scripts: Added configuration option to change default click action #49282

* fix #50560

* Fix getmac test (#48804)

* Cleaning up some typos in vscode.d.ts and vscode.proposed.d.ts (#50533)

* yarn.lock changes

* grid - log serialized state if restoring failed

* Fixes #50382: Align .mtku with .detected-link

* debug issues back to isidorn

* Hide interactive playground commands from command palette (fixes #49706)

* grid - drop outline as focus indication and rely on dimmed state

* grid - allow to close empty group when closing all editors of a group

* grid - get preferredSize from grid

* Fixes #43003: Cannot specify a global problemMatcher in tasks.json

* cleanup integrated terminal support for debugging

* grid - action wording tweaks

* #45663 Use core translations asset

* grid - allow to close dirty diff editor if master is still opened in same group

* Support to run npm install from a package node

* grid - log previous UI state upon error

* grid - stronger border top color

otherwise when a tab is showing in a vertical split, the border collides with the sash border

* remove todo

* do not append logLevel

#47774

* Implement Go To Next/Previous Breakpoint editor actions

* Include enabledOnly in debug model interface

* remove from schema

#47774

* #45663 fix compilations

* change openBreakpointSource to use IBreakpoint

* return passed context if resourceOrContext is not useful

* fix off by one issue

* Simplify implementation

* return context if it has a groupId

* polish

* Fixes Microsoft/monaco-editor#891: Focus editor when returning from context menu

* go to next / previosu breakpoint minor polish

* Add Endgame for 1.24

* fix index computing for editor close case

* Fix #49145

- Enable/Disable viewlets by views when context
- Move viewlet enablement/disablement to views service
- Fix - adopt if a viewlet extension is disabled/removed

* Avoid command palette entry (#49340)

* [handlebars] code-folding algorithm is less useful than Indentation-based one. Fixes #48457

* use upper lang id

* Fixes #49378

* #49145 Store placeholder states for all viewlets

* Add `logicalLine` argument to `mutlicursor.insertBelow` and `mutlicursor.insertAbove`

* Removed duplicate loop

* eliminate code duplication; use resolveWorkspaceFolder()

* #45663 Get all asset types

* [css] update service

* [html] update services

* grid - fix compile

* add User-Id to marketplace build requests

* Improve rendererType description

Fixes #50617

* fix #50672

* Fixes #49173

* fix #50321

* fix #50670

* Install option not needed when we have Install and Restart Fixes #50669

* Fixes #50616, Showing/hiding details in Issue Reporter resets scroll position

* Fix #50642, fix #50673

* Issue reporter and process explorer windows should close when the parent window closes, fixes #50716

* Issue Reporter should clear the error state when selecting an extension, fixes #50702

* Extracting methods

* Make sure we update the webview's state on setState

* Avoid prompting for same file type in the same session #50537

* Use language name instead of locale in the prompt #50738

* Use correct failed error code for webview resource load error

* Mark unused parameter

* Restore restart

* Try serializing webviews even if they have not called setState

Fixes #50752

* Change parameter name to match interface name

Fixes #50745

* Fix non-serializable webviews being revived if they called setState

* Include recommended extensions in telemetry events to determine success

* Fix #49777 - Emmet balance In after balance out should go back to initial selection and not first child (#49996)

* Update Emmet - balance.ts

* Cover all cases

* Update prompt msg Fixes #50738

* Fix #50632

* search-rg has no icon

* EH search - replace search.enableSearchProviders with a search-rg specific setting

* fix #50742

* fix #50691

* part of #50760

* smoke: uncomment debug suite

* smoketest: use yarn

* grid - allow to close empty groups via middle click (#50733)

* careful with path comparisons on windows

related to #50760

* smoke: run yarn verbose

* fix #50710

* Improve description (#43208)

* fix #50722

* Fix #50663

* Fix #47586

* fixes #50609

* fixes #50026

* 💄

* fix  #50773

* improve perf of findId and getElementById, #50575

* don't show outline when there are more then 7500 symbols, #50575

* fix typos

* polish for #50667

* fix #50700

* grid keep sizing after branch node demotion

fixes #50564

* grid - for now remove editorGroup.activeEmptyBackground

* fix #50726

* grid: resize views when branch is demoted

fixes #50675

* fix #50727

* fix #50734

* remove preview rant from search.location

* splitview: dont propagate white-sapce property

fixes #50720

* fix #50774

* Fixes #50296

* fix  #50207

* Fixes #24670: Add API to determine if the task service supports parallel task execution.

* fix #50741

* Fixes  #49400: Cannot read property 'then' of undefined

* Fix #50717

* Fix #48901

* polish debug.toolBarLocation

fixes #50786

* Fix #50717

* missing compilation

* Fix #48225

* fix #50711

* Fix errors installing extension from Welcome page (fixes #50753)

* fixes #50794

* fixes #50787

* continuous build: use vsts npm feed

* Fix for #50792: empty pre post scripts not rendered properly

* Fix #50728

* continuous build: use vsts feed

* Fix for #50792 npm exclude doesn´t work for folder names

* Move previewOptions, #50788

* build: remove npm auth

* better fix for #50710

* Revert "Merge pull request #49790 from usernamehw/raw_settings"

This reverts commit f92a162b41, reversing
changes made to fc710af792.

* Remove unused variable

* Fix regression in C# TextMate grammar related to lambda parameters

This tweak fixes a regression recently introduced in the C# TextMate grammar around
implicitly-typed lambda parameters.

* https://github.com/dotnet/csharp-tmLanguage/issues/119
* https://github.com/dotnet/csharp-tmLanguage/issues/120

* Fix parameter not being escaped

Fixes #49057

* wip: grid.getNeighborViews

* Make sure we use normalized path for compare

Fixes #50760

(the path should already have been normalized at this point so I don't think there is any user impact)

* Clean up importModuleSpecifier wording

Fixes #50817

* Remove duplicate strings and small cleanup

* Spelling fix Ouoting -> Quoting

* Restore default settings editor keybinding

* Dont trigger emmet for # in selectors Fixes #49269

* Hide settings editor feedback button in stable

* Use better colors for markdown code blocks

* Moving webview api back to proposed for more polishing

#49022

* Shorten showUnused setting name

Fixes #50648

* fix #50678

* Don't include imports in js/ts document symbol results

Fixes #50829

* smoketest: remove verbose from yarn

* smoketest: clear state from failing search tests

* minor rename

* Fix markdown preview not setting context properly on first creation

Fixes #50558

* smoketest: update to package-lock.json

fixes #50857

* smoketest: bring back search tests

* #48901 Expand by default only in custom viewlets

* fixes #50812

* open editors: clear focus when group without editors is active

fixes #50563

* Fix MaxNumber incrementFileName bug

* Fixes #48758: Do not import standalone editor modules

* fixes #50864

* Use `MAX_SAFE_SMALL_INTEGER`

* Fixes #50858: Task api is still marked as proposed

* fixes #50737

* fix #50867

* Fix: showQuickPick keeps showing infinite progress (fixes #50863)

* Clarify for translation (fixes #50634)

* fixes #50870

* fix #50479

* grid - todo@grid => todo@ben

* grid - adopt new getNeighborViews() method

* grid - add workbench.action.closeEditorsAndGroup

* open editors: close group action

fixes #50625

* open editors: use actionRunner for contexts

fixes #50621

* [css][html] update service

* grid: getNeighborViews

* grid - adopt wrapping

* Some menu action clients (ActionBar) handle alternative actions on their own so the alternative actions should be ignored

fixes #50581

* fillInActionBarActions and fillInContextMenuActions for clarity

* Remove inconsistent use of active in terminal API

Related #48434

* Try using fixAllDescription for js/ts quick fixes

Fixes #42549

* Fixes #50828, code-insiders --status triggered exception in main process

* Pick up ts 2.9.1 final

* Fix for #50868 and #50884

* Still gray out vars even if user has disabled suggestions

Fixes #50890

* grid: fix neighbor npe issue

* grid: more getNeighborViews tests

* grid: use boundaries for neighbor finding

* grid: getNeighborViews perf

* grid: add todo

* 2018-05-31. Merged in translations from Transifex.

* Update GDPR annotation

* update message

* Add specific `refactor.move` scope for js/ts move to new file action

* Use localized language name when available

* Add proper contribution schema for ts server pluguins

#50682

* Fix extra word

* Fix #50909 - add link to new settings editor from old one

* Left-align settings editor preview prompt

* grid - fix issues with touchbar updating

* grid - use viewColumnToEditorGroup in more places

* grid - close all groups should preserve first group

* Reapply fix for #50790

* grid - assign some default keybindings for focus group

* Fixes #50763: All running Visual Studio code instances shutdown all at once

* grid - 💄

* fixes #50926

* show alternative actions when alt is pressed, not only on mouse over

* open editors: click on groups should activate them

* update description (for #50677)

* Fix #50835

* grid - tweak some groups access order

* one more time, fix #50321

* beware of keybinding command null arguments

fixes #50821

* grid - prevent multiple confirmation dialogs for the same editor to show up (for  #50539)

* smoketest: go-to-definition is flaky

fixes #50944
fixes #49107

* Fixes #50943: TSC version 2.9.x in watch mode prints different end compile message

* grid - fix bad === for editors

* 💄 grid, cleanup getViews()

* Update distro commit and third party notices

* Use localizedLanguageName instead of languageNameLocalized which doesnt exist

* Remove now unneeded any

* Make sure unused diags are still updated when suggestions are disabled

Fixes #50890

* Fix unused var

* Update version

* Update issue templates, #49380

* Fix #50893 - escape regex chars when copy search string from editor

* Fix #50985 - don't take editor text when toggling search details
This commit is contained in:
Benjamin Pasero
2018-06-04 10:44:46 -07:00
committed by SteVen Batten
parent fc07fa2e2b
commit 06df95754d
1447 changed files with 32028 additions and 22542 deletions
@@ -150,7 +150,7 @@ export class IssueReporter extends Disposable {
const content: string[] = [];
if (styles.inputBackground) {
content.push(`input[type="text"], textarea, select, .issues-container > .issue > .issue-state { background-color: ${styles.inputBackground}; }`);
content.push(`input[type="text"], textarea, select, .issues-container > .issue > .issue-state, .block-info { background-color: ${styles.inputBackground}; }`);
}
if (styles.inputBorder) {
@@ -160,7 +160,7 @@ export class IssueReporter extends Disposable {
}
if (styles.inputForeground) {
content.push(`input[type="text"], textarea, select, .issues-container > .issue > .issue-state { color: ${styles.inputForeground}; }`);
content.push(`input[type="text"], textarea, select, .issues-container > .issue > .issue-state, .block-info { color: ${styles.inputForeground}; }`);
}
if (styles.inputErrorBorder) {
@@ -321,24 +321,11 @@ export class IssueReporter extends Disposable {
});
});
const labelElements = document.getElementsByClassName('caption');
for (let i = 0; i < labelElements.length; i++) {
const label = labelElements.item(i);
label.addEventListener('click', (e) => {
e.stopPropagation();
const containingDiv = (<HTMLLabelElement>e.target).parentElement;
const checkbox = <HTMLInputElement>containingDiv.firstElementChild;
if (checkbox) {
this.issueReporterModel.update({ [checkbox.id]: !this.issueReporterModel.getData()[checkbox.id] });
}
});
}
const showInfoElements = document.getElementsByClassName('showInfo');
for (let i = 0; i < showInfoElements.length; i++) {
const showInfo = showInfoElements.item(i);
showInfo.addEventListener('click', (e) => {
e.preventDefault();
const label = (<HTMLDivElement>e.target);
const containingElement = label.parentElement.parentElement;
const info = containingElement.lastElementChild;
@@ -754,6 +741,12 @@ export class IssueReporter extends Disposable {
this.validateInput('description');
});
if (this.issueReporterModel.fileOnExtension()) {
document.getElementById('extension-selector').addEventListener('change', (event) => {
this.validateInput('extension-selector');
});
}
return false;
}
@@ -66,7 +66,7 @@ export default (): string => `
<label class="caption" for="includeSystemInfo">${escape(localize({
key: 'sendSystemInfo',
comment: ['{0} is either "show" or "hide" and is a button to toggle the visibililty of the system information']
}, "Send my system information ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
}, "Include my system information ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
<div class="block-info hidden">
<!-- To be dynamically filled -->
</div>
@@ -76,7 +76,7 @@ export default (): string => `
<label class="caption" for="includeProcessInfo">${escape(localize({
key: 'sendProcessInfo',
comment: ['{0} is either "show" or "hide" and is a button to toggle the visibililty of the process info']
}, "Send my currently running processes ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
}, "Include my currently running processes ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
<pre class="block-info hidden">
<code>
<!-- To be dynamically filled -->
@@ -88,7 +88,7 @@ export default (): string => `
<label class="caption" for="includeWorkspaceInfo">${escape(localize({
key: 'sendWorkspaceInfo',
comment: ['{0} is either "show" or "hide" and is a button to toggle the visibililty of the workspace information']
}, "Send my workspace metadata ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
}, "Include my workspace metadata ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
<pre id="systemInfo" class="block-info hidden">
<code>
<!-- To be dynamically filled -->
@@ -100,7 +100,7 @@ export default (): string => `
<label class="caption" for="includeExtensions">${escape(localize({
key: 'sendExtensions',
comment: ['{0} is either "show" or "hide" and is a button to toggle the visibililty of the enabled extensions list']
}, "Send my enabled extensions ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
}, "Include my enabled extensions ({0})")).replace('{0}', `<a href="#" class="showInfo">${escape(localize('show', "show"))}</a>`)}</label>
<div id="systemInfo" class="block-info hidden">
<!-- To be dynamically filled -->
</div>
@@ -10,18 +10,17 @@
table {
width: 100%;
max-width: 100%;
margin-bottom: 1rem;
background-color: transparent;
border-collapse: collapse;
}
th {
vertical-align: bottom;
border-bottom: 2px solid #e9ecef;
padding: .75rem;
border-bottom: 1px solid;
padding: 5px;
text-align: inherit;
}
td {
padding: .25rem;
padding: 5px;
vertical-align: top;
}
@@ -65,6 +64,7 @@ textarea {
width: auto;
padding: 4px 10px;
align-self: flex-end;
margin-bottom: 10px;
}
select {
@@ -75,7 +75,6 @@ select {
line-height: 1.5;
color: #495057;
background-color: #fff;
border-radius: 0.25rem;
border: none;
}
@@ -95,7 +94,7 @@ html {
body {
margin: 0;
overflow: scroll;
overflow-y: scroll;
height: 100%;
}
@@ -109,16 +108,16 @@ body {
.block .block-info {
width: 100%;
font-family: 'Menlo', 'Courier New', 'Courier', monospace;
font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";
font-size: 12px;
overflow: auto;
overflow-wrap: break-word;
margin: 5px;
padding: 10px;
}
pre {
margin: 10px 20px;
}
pre code {
font-family: 'Menlo', 'Courier New', 'Courier', monospace;
font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";
}
#issue-reporter {
@@ -126,6 +125,7 @@ pre code {
margin-left: auto;
margin-right: auto;
padding-top: 2em;
padding-bottom: 2em;
display: flex;
flex-direction: column;
height: 100%;
@@ -203,7 +203,6 @@ input:disabled {
.instructions {
font-size: 12px;
margin-left: 1em;
margin-top: .5em;
}
@@ -242,7 +241,7 @@ a {
}
.section .input-group .validation-error {
margin-left: 13%;
margin-left: 15%;
}
.section .inline-form-control, .section .inline-label {
@@ -262,17 +261,25 @@ a {
}
#similar-issues {
margin-left: 13%;
margin-left: 15%;
display: block;
}
#problem-source-help-text {
margin-left: calc(15% + 1em);
}
@media (max-width: 950px) {
.section .inline-label {
width: 13%;
width: 15%;
}
#problem-source-help-text {
margin-left: calc(15% + 1em);
}
.section .inline-form-control {
width: calc(87% - 5px);
width: calc(85% - 5px);
}
}
@@ -281,6 +288,10 @@ a {
display: none !important;
}
#problem-source-help-text {
margin-left: 1em;
}
.section .inline-form-control {
width: 100%;
}
@@ -66,9 +66,13 @@ export class LanguagePackCachedDataCleaner {
}
// Cleanup entries for language packs that aren't installed anymore
const cacheDir = path.join(this._environmentService.userDataPath, 'clp');
let exists = await pfs.exists(cacheDir);
if (!exists) {
return;
}
for (let entry of await pfs.readdir(cacheDir)) {
if (installed[entry]) {
this._logService.info(`Skipping directory ${entry}. Language pack still in use`);
this._logService.info(`Skipping directory ${entry}. Language pack still in use.`);
continue;
}
this._logService.info('Removing unused language pack:', entry);
+73 -48
View File
@@ -9,7 +9,7 @@ import * as nls from 'vs/nls';
import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platform';
import * as arrays from 'vs/base/common/arrays';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ipcMain as ipc, app, shell, Menu, MenuItem, BrowserWindow } from 'electron';
import { app, shell, Menu, MenuItem, BrowserWindow } from 'electron';
import { OpenContext, IRunActionInWindowRequest, IWindowsService } from 'vs/platform/windows/common/windows';
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
import { AutoSaveConfiguration } from 'vs/platform/files/common/files';
@@ -24,11 +24,6 @@ import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/wind
import { IHistoryMainService } from 'vs/platform/history/common/history';
import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
interface IExtensionViewlet {
id: string;
label: string;
}
interface IMenuItemClickHandler {
inDevTools: (contents: Electron.WebContents) => void;
inNoWindow: () => void;
@@ -57,8 +52,6 @@ export class CodeMenu {
private keybindingsResolver: KeybindingsResolver;
private extensionViewlets: IExtensionViewlet[];
private closeFolder: Electron.MenuItem;
private closeWorkspace: Electron.MenuItem;
@@ -74,7 +67,6 @@ export class CodeMenu {
@ITelemetryService private telemetryService: ITelemetryService,
@IHistoryMainService private historyMainService: IHistoryMainService
) {
this.extensionViewlets = [];
this.nativeTabMenuItems = [];
this.menuUpdater = new RunOnceScheduler(() => this.doUpdateMenu(), 0);
@@ -99,21 +91,6 @@ export class CodeMenu {
this.windowsMainService.onWindowReady(() => this.updateWorkspaceMenuItems());
this.windowsMainService.onWindowClose(() => this.updateWorkspaceMenuItems());
// Listen to extension viewlets
ipc.on('vscode:extensionViewlets', (event: any, rawExtensionViewlets: string) => {
let extensionViewlets: IExtensionViewlet[] = [];
try {
extensionViewlets = JSON.parse(rawExtensionViewlets);
} catch (error) {
// Should not happen
}
if (extensionViewlets.length) {
this.extensionViewlets = extensionViewlets;
this.updateMenu();
}
});
// Update when auto save config changes
this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e));
@@ -662,36 +639,70 @@ export class CodeMenu {
}
private setViewMenu(viewMenu: Electron.Menu): void {
const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands');
const openView = this.createMenuItem(nls.localize({ key: 'miOpenView', comment: ['&& denotes a mnemonic'] }, "&&Open View..."), 'workbench.action.openView');
// Views
const explorer = this.createMenuItem(nls.localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"), 'workbench.view.explorer');
const search = this.createMenuItem(nls.localize({ key: 'miViewSearch', comment: ['&& denotes a mnemonic'] }, "&&Search"), 'workbench.view.search');
const scm = this.createMenuItem(nls.localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "S&&CM"), 'workbench.view.scm');
const debug = this.createMenuItem(nls.localize({ key: 'miViewDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug"), 'workbench.view.debug');
const extensions = this.createMenuItem(nls.localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions"), 'workbench.view.extensions');
// Panels
const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput');
const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl');
const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal');
const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems');
let additionalViewlets: Electron.MenuItem;
if (this.extensionViewlets.length) {
const additionalViewletsMenu = new Menu();
this.extensionViewlets.forEach(viewlet => {
additionalViewletsMenu.append(this.createMenuItem(viewlet.label, viewlet.id));
});
additionalViewlets = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miAdditionalViews', comment: ['&& denotes a mnemonic'] }, "Additional &&Views")), submenu: additionalViewletsMenu, enabled: true });
}
const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands');
const openView = this.createMenuItem(nls.localize({ key: 'miOpenView', comment: ['&& denotes a mnemonic'] }, "&&Open View..."), 'workbench.action.openView');
const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsMainService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsMainService.getWindowCount() > 0 }));
const toggleZenMode = this.createMenuItem(nls.localize('miToggleZenMode', "Toggle Zen Mode"), 'workbench.action.toggleZenMode');
const toggleCenteredLayout = this.createMenuItem(nls.localize('miToggleCenteredLayout', "Toggle Centered Layout"), 'workbench.action.toggleCenteredLayout');
const toggleMenuBar = this.createMenuItem(nls.localize({ key: 'miToggleMenuBar', comment: ['&& denotes a mnemonic'] }, "Toggle Menu &&Bar"), 'workbench.action.toggleMenuBar');
const splitEditor = this.createMenuItem(nls.localize({ key: 'miSplitEditor', comment: ['&& denotes a mnemonic'] }, "Split &&Editor"), 'workbench.action.splitEditor');
const toggleEditorLayout = this.createMenuItem(nls.localize({ key: 'miToggleEditorLayout', comment: ['&& denotes a mnemonic'] }, "Toggle Editor Group &&Layout"), 'workbench.action.toggleEditorGroupLayout');
// Editor Layout
const editorLayoutMenu = new Menu();
const splitEditorUp = this.createMenuItem(nls.localize({ key: 'miSplitEditorUp', comment: ['&& denotes a mnemonic'] }, "Split &&Up"), 'workbench.action.splitEditorUp');
const splitEditorDown = this.createMenuItem(nls.localize({ key: 'miSplitEditorDown', comment: ['&& denotes a mnemonic'] }, "Split &&Down"), 'workbench.action.splitEditorDown');
const splitEditorLeft = this.createMenuItem(nls.localize({ key: 'miSplitEditorLeft', comment: ['&& denotes a mnemonic'] }, "Split &&Left"), 'workbench.action.splitEditorLeft');
const splitEditorRight = this.createMenuItem(nls.localize({ key: 'miSplitEditorRight', comment: ['&& denotes a mnemonic'] }, "Split &&Right"), 'workbench.action.splitEditorRight');
const singleColumnEditorLayout = this.createMenuItem(nls.localize({ key: 'miSingleColumnEditorLayout', comment: ['&& denotes a mnemonic'] }, "&&Single"), 'workbench.action.editorLayoutSingle');
const centeredEditorLayout = this.createMenuItem(nls.localize({ key: 'miCenteredEditorLayout', comment: ['&& denotes a mnemonic'] }, "&&Centered"), 'workbench.action.editorLayoutCentered');
const twoColumnsEditorLayout = this.createMenuItem(nls.localize({ key: 'miTwoColumnsEditorLayout', comment: ['&& denotes a mnemonic'] }, "&&Two Columns"), 'workbench.action.editorLayoutTwoColumns');
const threeColumnsEditorLayout = this.createMenuItem(nls.localize({ key: 'miThreeColumnsEditorLayout', comment: ['&& denotes a mnemonic'] }, "T&&hree Columns"), 'workbench.action.editorLayoutThreeColumns');
const twoRowsEditorLayout = this.createMenuItem(nls.localize({ key: 'miTwoRowsEditorLayout', comment: ['&& denotes a mnemonic'] }, "T&&wo Rows"), 'workbench.action.editorLayoutTwoRows');
const threeRowsEditorLayout = this.createMenuItem(nls.localize({ key: 'miThreeRowsEditorLayout', comment: ['&& denotes a mnemonic'] }, "Three &&Rows"), 'workbench.action.editorLayoutThreeRows');
const twoByTwoGridEditorLayout = this.createMenuItem(nls.localize({ key: 'miTwoByTwoGridEditorLayout', comment: ['&& denotes a mnemonic'] }, "&&Grid (2x2)"), 'workbench.action.editorLayoutTwoByTwoGrid');
const twoColumnsRightEditorLayout = this.createMenuItem(nls.localize({ key: 'miTwoColumnsRightEditorLayout', comment: ['&& denotes a mnemonic'] }, "Two C&&olumns Right"), 'workbench.action.editorLayoutTwoColumnsRight');
const twoColumnsBottomEditorLayout = this.createMenuItem(nls.localize({ key: 'miTwoColumnsBottomEditorLayout', comment: ['&& denotes a mnemonic'] }, "Two &&Columns Bottom"), 'workbench.action.editorLayoutTwoColumnsBottom');
const toggleEditorLayout = this.createMenuItem(nls.localize({ key: 'miToggleEditorLayout', comment: ['&& denotes a mnemonic'] }, "Flip &&Layout"), 'workbench.action.toggleEditorGroupLayout');
[
splitEditorUp,
splitEditorDown,
splitEditorLeft,
splitEditorRight,
__separator__(),
singleColumnEditorLayout,
centeredEditorLayout,
twoColumnsEditorLayout,
threeColumnsEditorLayout,
twoRowsEditorLayout,
threeRowsEditorLayout,
twoByTwoGridEditorLayout,
twoColumnsRightEditorLayout,
twoColumnsBottomEditorLayout,
__separator__(),
toggleEditorLayout
].forEach(item => editorLayoutMenu.append(item));
const editorLayout = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miEditorLayout', comment: ['&& denotes a mnemonic'] }, "Editor &&Layout")), submenu: editorLayoutMenu });
// Workbench Layout
const toggleSidebar = this.createMenuItem(nls.localize({ key: 'miToggleSidebar', comment: ['&& denotes a mnemonic'] }, "&&Toggle Side Bar"), 'workbench.action.toggleSidebarVisibility');
let moveSideBarLabel: string;
@@ -702,7 +713,6 @@ export class CodeMenu {
}
const moveSidebar = this.createMenuItem(moveSideBarLabel, 'workbench.action.toggleSidebarPosition');
const togglePanel = this.createMenuItem(nls.localize({ key: 'miTogglePanel', comment: ['&& denotes a mnemonic'] }, "Toggle &&Panel"), 'workbench.action.togglePanel');
let statusBarLabel: string;
@@ -721,11 +731,13 @@ export class CodeMenu {
}
const toggleActivtyBar = this.createMenuItem(activityBarLabel, 'workbench.action.toggleActivityBarVisibility');
// Editor
const toggleWordWrap = this.createMenuItem(nls.localize({ key: 'miToggleWordWrap', comment: ['&& denotes a mnemonic'] }, "Toggle &&Word Wrap"), 'editor.action.toggleWordWrap');
const toggleMinimap = this.createMenuItem(nls.localize({ key: 'miToggleMinimap', comment: ['&& denotes a mnemonic'] }, "Toggle &&Minimap"), 'editor.action.toggleMinimap');
const toggleRenderWhitespace = this.createMenuItem(nls.localize({ key: 'miToggleRenderWhitespace', comment: ['&& denotes a mnemonic'] }, "Toggle &&Render Whitespace"), 'editor.action.toggleRenderWhitespace');
const toggleRenderControlCharacters = this.createMenuItem(nls.localize({ key: 'miToggleRenderControlCharacters', comment: ['&& denotes a mnemonic'] }, "Toggle &&Control Characters"), 'editor.action.toggleRenderControlCharacter');
// Zoom
const zoomIn = this.createMenuItem(nls.localize({ key: 'miZoomIn', comment: ['&& denotes a mnemonic'] }, "&&Zoom In"), 'workbench.action.zoomIn');
const zoomOut = this.createMenuItem(nls.localize({ key: 'miZoomOut', comment: ['&& denotes a mnemonic'] }, "Zoom O&&ut"), 'workbench.action.zoomOut');
const resetZoom = this.createMenuItem(nls.localize({ key: 'miZoomReset', comment: ['&& denotes a mnemonic'] }, "&&Reset Zoom"), 'workbench.action.zoomReset');
@@ -739,7 +751,6 @@ export class CodeMenu {
scm,
debug,
extensions,
additionalViewlets,
__separator__(),
output,
problems,
@@ -751,8 +762,8 @@ export class CodeMenu {
toggleCenteredLayout,
isWindows || isLinux ? toggleMenuBar : void 0,
__separator__(),
splitEditor,
toggleEditorLayout,
editorLayout,
__separator__(),
moveSidebar,
toggleSidebar,
togglePanel,
@@ -793,19 +804,33 @@ export class CodeMenu {
const switchGroupMenu = new Menu();
const focusFirstGroup = this.createMenuItem(nls.localize({ key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] }, "&&First Group"), 'workbench.action.focusFirstEditorGroup');
const focusSecondGroup = this.createMenuItem(nls.localize({ key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] }, "&&Second Group"), 'workbench.action.focusSecondEditorGroup');
const focusThirdGroup = this.createMenuItem(nls.localize({ key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] }, "&&Third Group"), 'workbench.action.focusThirdEditorGroup');
const focusFirstGroup = this.createMenuItem(nls.localize({ key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] }, "Group &&1"), 'workbench.action.focusFirstEditorGroup');
const focusSecondGroup = this.createMenuItem(nls.localize({ key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] }, "Group &&2"), 'workbench.action.focusSecondEditorGroup');
const focusThirdGroup = this.createMenuItem(nls.localize({ key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] }, "Group &&3"), 'workbench.action.focusThirdEditorGroup');
const focusFourthGroup = this.createMenuItem(nls.localize({ key: 'miFocusFourthGroup', comment: ['&& denotes a mnemonic'] }, "Group &&4"), 'workbench.action.focusFourthEditorGroup');
const focusFifthGroup = this.createMenuItem(nls.localize({ key: 'miFocusFifthGroup', comment: ['&& denotes a mnemonic'] }, "Group &&5"), 'workbench.action.focusFifthEditorGroup');
const nextGroup = this.createMenuItem(nls.localize({ key: 'miNextGroup', comment: ['&& denotes a mnemonic'] }, "&&Next Group"), 'workbench.action.focusNextGroup');
const previousGroup = this.createMenuItem(nls.localize({ key: 'miPreviousGroup', comment: ['&& denotes a mnemonic'] }, "&&Previous Group"), 'workbench.action.focusPreviousGroup');
const focusLeftGroup = this.createMenuItem(nls.localize({ key: 'miFocusLeftGroup', comment: ['&& denotes a mnemonic'] }, "Group &&Left"), 'workbench.action.focusLeftGroup');
const focusRightGroup = this.createMenuItem(nls.localize({ key: 'miFocusRightGroup', comment: ['&& denotes a mnemonic'] }, "Group &&Right"), 'workbench.action.focusRightGroup');
const focusAboveGroup = this.createMenuItem(nls.localize({ key: 'miFocusAboveGroup', comment: ['&& denotes a mnemonic'] }, "Group &&Above"), 'workbench.action.focusAboveGroup');
const focusBelowGroup = this.createMenuItem(nls.localize({ key: 'miFocusBelowGroup', comment: ['&& denotes a mnemonic'] }, "Group &&Below"), 'workbench.action.focusBelowGroup');
[
focusFirstGroup,
focusSecondGroup,
focusThirdGroup,
focusFourthGroup,
focusFifthGroup,
__separator__(),
nextGroup,
previousGroup
previousGroup,
__separator__(),
focusAboveGroup,
focusBelowGroup,
focusLeftGroup,
focusRightGroup
].forEach(item => switchGroupMenu.append(item));
const switchGroup = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true });
+6 -2
View File
@@ -716,7 +716,11 @@ export class WindowsManager implements IWindowsMainService {
return window;
}
private doOpenFolderOrWorkspace(openConfig: IOpenConfiguration, folderOrWorkspace: IPathToOpen, openInNewWindow: boolean, filesToOpen: IPath[], filesToCreate: IPath[], filesToDiff: IPath[], filesToWait: IPathsToWaitFor, windowToUse?: ICodeWindow): ICodeWindow {
private doOpenFolderOrWorkspace(openConfig: IOpenConfiguration, folderOrWorkspace: IPathToOpen, forceNewWindow: boolean, filesToOpen: IPath[], filesToCreate: IPath[], filesToDiff: IPath[], filesToWait: IPathsToWaitFor, windowToUse?: ICodeWindow): ICodeWindow {
if (!forceNewWindow && !windowToUse && typeof openConfig.contextWindowId === 'number') {
windowToUse = this.getWindowById(openConfig.contextWindowId); // fix for https://github.com/Microsoft/vscode/issues/49587
}
const browserWindow = this.openInBrowserWindow({
userEnv: openConfig.userEnv,
cli: openConfig.cli,
@@ -727,7 +731,7 @@ export class WindowsManager implements IWindowsMainService {
filesToCreate,
filesToDiff,
filesToWait,
forceNewWindow: openInNewWindow,
forceNewWindow,
windowToUse
});