Merge remote-tracking branch 'origin/master' into tyriar/puppeteer
|
@ -19,8 +19,8 @@ Compression=lzma
|
|||
SolidCompression=yes
|
||||
AppMutex={code:GetAppMutex}
|
||||
SetupMutex={#AppMutex}setup
|
||||
WizardImageFile={#RepoDir}\resources\win32\inno-big.bmp
|
||||
WizardSmallImageFile={#RepoDir}\resources\win32\inno-small.bmp
|
||||
WizardImageFile="{#RepoDir}\resources\win32\inno-big-100.bmp,{#RepoDir}\resources\win32\inno-big-125.bmp,{#RepoDir}\resources\win32\inno-big-150.bmp,{#RepoDir}\resources\win32\inno-big-175.bmp,{#RepoDir}\resources\win32\inno-big-200.bmp,{#RepoDir}\resources\win32\inno-big-225.bmp,{#RepoDir}\resources\win32\inno-big-250.bmp"
|
||||
WizardSmallImageFile="{#RepoDir}\resources\win32\inno-small-100.bmp,{#RepoDir}\resources\win32\inno-small-125.bmp,{#RepoDir}\resources\win32\inno-small-150.bmp,{#RepoDir}\resources\win32\inno-small-175.bmp,{#RepoDir}\resources\win32\inno-small-200.bmp,{#RepoDir}\resources\win32\inno-small-225.bmp,{#RepoDir}\resources\win32\inno-small-250.bmp"
|
||||
SetupIconFile={#RepoDir}\resources\win32\code.ico
|
||||
UninstallDisplayIcon={app}\{#ExeBasename}.exe
|
||||
ChangesEnvironment=true
|
||||
|
|
|
@ -55,7 +55,7 @@ class TypeScriptFoldingProvider implements vscode.FoldingRangeProvider {
|
|||
|
||||
const start = range.start.line;
|
||||
// workaround for #47240
|
||||
const end = (range.end.character > 0 && document.getText(new vscode.Range(range.end.translate(0, -1), range.end)) === '}')
|
||||
const end = (range.end.character > 0 && new Set(['}', ']']).has(document.getText(new vscode.Range(range.end.translate(0, -1), range.end))))
|
||||
? Math.max(range.end.line - 1, range.start.line)
|
||||
: range.end.line;
|
||||
|
||||
|
@ -81,4 +81,4 @@ export function register(
|
|||
return vscode.languages.registerFoldingRangeProvider(selector,
|
||||
new TypeScriptFoldingProvider(client));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,8 @@ class TypeScriptQuickFixProvider implements vscode.CodeActionProvider {
|
|||
if (x === diagnostic) {
|
||||
return false;
|
||||
}
|
||||
return x.code === diagnostic.code || fixAllErrorCodes.get(x.code as number) === diagnostic.code;
|
||||
return x.code === diagnostic.code
|
||||
|| (fixAllErrorCodes.has(x.code as number) && fixAllErrorCodes.get(x.code as number) === fixAllErrorCodes.get(diagnostic.code as number));
|
||||
})) {
|
||||
return results;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.38.0",
|
||||
"distro": "8ee1612ab2b050f366c2c4c1500fc243b407581f",
|
||||
"distro": "c2664514acafa174a6b0b5a960931699641d6989",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
@ -101,7 +101,7 @@
|
|||
"gulp-shell": "^0.6.5",
|
||||
"gulp-tsb": "2.0.7",
|
||||
"gulp-tslint": "^8.1.3",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"gulp-untar": "^0.0.7",
|
||||
"gulp-vinyl-zip": "^2.1.2",
|
||||
"http-server": "^0.11.1",
|
||||
|
@ -134,7 +134,7 @@
|
|||
"tslint": "^5.16.0",
|
||||
"typescript": "3.5.2",
|
||||
"typescript-formatter": "7.1.0",
|
||||
"uglify-es": "^3.3.9",
|
||||
"uglify-es": "^3.0.18",
|
||||
"underscore": "^1.8.2",
|
||||
"vinyl": "^2.0.0",
|
||||
"vinyl-fs": "^3.0.0",
|
||||
|
|
BIN
resources/win32/inno-big-100.bmp
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
resources/win32/inno-big.bmp → resources/win32/inno-big-125.bmp
Normal file → Executable file
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 217 KiB |
BIN
resources/win32/inno-big-150.bmp
Executable file
After Width: | Height: | Size: 332 KiB |
BIN
resources/win32/inno-big-175.bmp
Executable file
After Width: | Height: | Size: 445 KiB |
BIN
resources/win32/inno-big-200.bmp
Executable file
After Width: | Height: | Size: 580 KiB |
BIN
resources/win32/inno-big-225.bmp
Executable file
After Width: | Height: | Size: 730 KiB |
BIN
resources/win32/inno-big-250.bmp
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
resources/win32/inno-small-100.bmp
Executable file
After Width: | Height: | Size: 9.1 KiB |
BIN
resources/win32/inno-small-125.bmp
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
resources/win32/inno-small-150.bmp
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
resources/win32/inno-small-175.bmp
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
resources/win32/inno-small-200.bmp
Executable file
After Width: | Height: | Size: 34 KiB |
BIN
resources/win32/inno-small-225.bmp
Executable file
After Width: | Height: | Size: 43 KiB |
BIN
resources/win32/inno-small-250.bmp
Executable file
After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 12 KiB |
|
@ -8,8 +8,7 @@ import { IMessagePassingProtocol, IPCClient } from 'vs/base/parts/ipc/common/ipc
|
|||
import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
|
||||
declare var process: any;
|
||||
import * as process from 'vs/base/common/process';
|
||||
|
||||
export interface ISocket extends IDisposable {
|
||||
onData(listener: (e: VSBuffer) => void): IDisposable;
|
||||
|
@ -434,11 +433,7 @@ export function createBufferedEvent<T>(source: Event<T>): Event<T> {
|
|||
// it is important to deliver these messages after this call, but before
|
||||
// other messages have a chance to be received (to guarantee in order delivery)
|
||||
// that's why we're using here nextTick and not other types of timeouts
|
||||
if (typeof process !== 'undefined') {
|
||||
process.nextTick(deliverMessages);
|
||||
} else {
|
||||
platform.setImmediate(deliverMessages);
|
||||
}
|
||||
process.nextTick(deliverMessages);
|
||||
},
|
||||
onLastListenerRemove: () => {
|
||||
hasListeners = false;
|
||||
|
|
|
@ -86,7 +86,7 @@ export interface IIPCOptions {
|
|||
|
||||
export class Client implements IChannelClient, IDisposable {
|
||||
|
||||
private disposeDelayer: Delayer<void>;
|
||||
private disposeDelayer: Delayer<void> | undefined;
|
||||
private activeRequests = new Set<IDisposable>();
|
||||
private child: ChildProcess | null;
|
||||
private _client: IPCClient | null;
|
||||
|
@ -137,7 +137,7 @@ export class Client implements IChannelClient, IDisposable {
|
|||
cancellationTokenListener.dispose();
|
||||
this.activeRequests.delete(disposable);
|
||||
|
||||
if (this.activeRequests.size === 0) {
|
||||
if (this.activeRequests.size === 0 && this.disposeDelayer) {
|
||||
this.disposeDelayer.trigger(() => this.disposeClient());
|
||||
}
|
||||
});
|
||||
|
@ -271,8 +271,10 @@ export class Client implements IChannelClient, IDisposable {
|
|||
|
||||
dispose() {
|
||||
this._onDidProcessExit.dispose();
|
||||
this.disposeDelayer.cancel();
|
||||
this.disposeDelayer = null!; // StrictNullOverride: nulling out ok in dispose
|
||||
if (this.disposeDelayer) {
|
||||
this.disposeDelayer.cancel();
|
||||
this.disposeDelayer = undefined;
|
||||
}
|
||||
this.disposeClient();
|
||||
this.activeRequests.clear();
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ export class SQLiteStorageDatabase implements IStorageDatabase {
|
|||
return this.doUpdateItems(recoveryConnection, { insert: recovery() }).then(() => closeRecoveryConnection(), error => {
|
||||
|
||||
// In case of an error updating items, still ensure to close the connection
|
||||
// to prevent SQLITE_BUSY errors when the connection is restablished
|
||||
// to prevent SQLITE_BUSY errors when the connection is reestablished
|
||||
closeRecoveryConnection();
|
||||
|
||||
return Promise.reject(error);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
import * as assert from 'assert';
|
||||
import * as path from 'vs/base/common/path';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import * as process from 'vs/base/common/process';
|
||||
|
||||
suite('Paths (Node Implementation)', () => {
|
||||
test('join', () => {
|
||||
|
|
|
@ -31,7 +31,7 @@ import { WindowsService } from 'vs/platform/windows/electron-browser/windowsServ
|
|||
import { MainProcessService, IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
|
||||
import { IssueReporterModel, IssueReporterData as IssueReporterModelData } from 'vs/code/electron-browser/issue/issueReporterModel';
|
||||
import { IssueReporterData, IssueReporterStyles, IssueType, ISettingsSearchIssueReporterData, IssueReporterFeatures, IssueReporterExtensionData } from 'vs/platform/issue/common/issue';
|
||||
import { IssueReporterData, IssueReporterStyles, IssueType, ISettingsSearchIssueReporterData, IssueReporterFeatures, IssueReporterExtensionData } from 'vs/platform/issue/node/issue';
|
||||
import BaseHtml from 'vs/code/electron-browser/issue/issueReporterPage';
|
||||
import { LogLevelSetterChannelClient, FollowerLogService } from 'vs/platform/log/common/logIpc';
|
||||
import { ILogService, getLogLevel } from 'vs/platform/log/common/log';
|
||||
|
@ -39,7 +39,7 @@ import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
|
|||
import { normalizeGitHubUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
|
||||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
import { withUndefinedAsNull } from 'vs/base/common/types';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
|
||||
const MAX_URL_LENGTH = 2045;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IssueType, ISettingSearchResult, IssueReporterExtensionData } from 'vs/platform/issue/common/issue';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { IssueType, ISettingSearchResult, IssueReporterExtensionData } from 'vs/platform/issue/node/issue';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
|
||||
export interface IssueReporterData {
|
||||
issueType: IssueType;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import * as assert from 'assert';
|
||||
import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporterModel';
|
||||
import { normalizeGitHubUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
|
||||
import { IssueType } from 'vs/platform/issue/common/issue';
|
||||
import { IssueType } from 'vs/platform/issue/node/issue';
|
||||
|
||||
suite('IssueReporter', () => {
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { repeat } from 'vs/base/common/strings';
|
|||
import { totalmem } from 'os';
|
||||
import product from 'vs/platform/product/node/product';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ProcessExplorerStyles, ProcessExplorerData } from 'vs/platform/issue/common/issue';
|
||||
import { ProcessExplorerStyles, ProcessExplorerData } from 'vs/platform/issue/node/issue';
|
||||
import * as browser from 'vs/base/browser/browser';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import { IContextMenuItem } from 'vs/base/parts/contextmenu/common/contextmenu';
|
||||
|
@ -17,7 +17,7 @@ import { popup } from 'vs/base/parts/contextmenu/electron-browser/contextmenu';
|
|||
import { ProcessItem } from 'vs/base/common/processes';
|
||||
import { addDisposableListener } from 'vs/base/browser/dom';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { isRemoteDiagnosticError, IRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { isRemoteDiagnosticError, IRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
|
||||
|
||||
let mapPidToWindowTitle = new Map<number, string>();
|
||||
|
|
|
@ -48,8 +48,7 @@ import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/
|
|||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService';
|
||||
import { IDiagnosticsService } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { DiagnosticsService, IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService';
|
||||
import { DiagnosticsChannel } from 'vs/platform/diagnostics/node/diagnosticsIpc';
|
||||
import { FileService } from 'vs/platform/files/common/fileService';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
|
|
|
@ -47,7 +47,7 @@ import { getMachineId } from 'vs/base/node/id';
|
|||
import { Win32UpdateService } from 'vs/platform/update/electron-main/updateService.win32';
|
||||
import { LinuxUpdateService } from 'vs/platform/update/electron-main/updateService.linux';
|
||||
import { DarwinUpdateService } from 'vs/platform/update/electron-main/updateService.darwin';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService } from 'vs/platform/issue/node/issue';
|
||||
import { IssueChannel } from 'vs/platform/issue/node/issueIpc';
|
||||
import { IssueService } from 'vs/platform/issue/electron-main/issueService';
|
||||
import { LogLevelSetterChannel } from 'vs/platform/log/common/logIpc';
|
||||
|
@ -81,8 +81,8 @@ import { nodeSocketFactory } from 'vs/platform/remote/node/nodeSocketFactory';
|
|||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { statSync } from 'fs';
|
||||
import { ISignService } from 'vs/platform/sign/common/sign';
|
||||
import { IDiagnosticsService } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsIpc';
|
||||
import { IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService';
|
||||
import { FileService } from 'vs/platform/files/common/fileService';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider';
|
||||
|
|
|
@ -27,6 +27,7 @@ export const KnownSnippetVariableNames: { [key: string]: true } = Object.freeze(
|
|||
'CURRENT_DAY_NAME_SHORT': true,
|
||||
'CURRENT_MONTH_NAME': true,
|
||||
'CURRENT_MONTH_NAME_SHORT': true,
|
||||
'CURRENT_SECONDS_UNIX': true,
|
||||
'SELECTION': true,
|
||||
'CLIPBOARD': true,
|
||||
'TM_SELECTED_TEXT': true,
|
||||
|
@ -245,6 +246,8 @@ export class TimeBasedVariableResolver implements VariableResolver {
|
|||
return TimeBasedVariableResolver.monthNames[new Date().getMonth()];
|
||||
} else if (name === 'CURRENT_MONTH_NAME_SHORT') {
|
||||
return TimeBasedVariableResolver.monthNamesShort[new Date().getMonth()];
|
||||
} else if (name === 'CURRENT_SECONDS_UNIX') {
|
||||
return String(Math.floor(Date.now() / 1000));
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
|
|
@ -281,6 +281,7 @@ suite('Snippet Variables Resolver', function () {
|
|||
assertVariableResolve3(resolver, 'CURRENT_DAY_NAME_SHORT');
|
||||
assertVariableResolve3(resolver, 'CURRENT_MONTH_NAME');
|
||||
assertVariableResolve3(resolver, 'CURRENT_MONTH_NAME_SHORT');
|
||||
assertVariableResolve3(resolver, 'CURRENT_SECONDS_UNIX');
|
||||
});
|
||||
|
||||
test('creating snippet - format-condition doesn\'t work #53617', function () {
|
||||
|
|
|
@ -15,10 +15,18 @@ export class BrowserClipboardService implements IClipboardService {
|
|||
private _internalResourcesClipboard: URI[] | undefined;
|
||||
|
||||
async writeText(text: string, type?: string): Promise<void> {
|
||||
if (type) {
|
||||
return; // TODO@sbatten
|
||||
}
|
||||
|
||||
return navigator.clipboard.writeText(text);
|
||||
}
|
||||
|
||||
async readText(type?: string): Promise<string> {
|
||||
if (type) {
|
||||
return ''; // TODO@sbatten
|
||||
}
|
||||
|
||||
return navigator.clipboard.readText();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
import { UriComponents } from 'vs/base/common/uri';
|
||||
import { ProcessItem } from 'vs/base/common/processes';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IMainProcessInfo } from 'vs/platform/launch/common/launchService';
|
||||
import { IWorkspace } from 'vs/platform/workspace/common/workspace';
|
||||
import { IStringDictionary } from 'vs/base/common/collections';
|
||||
|
||||
|
@ -67,18 +65,6 @@ export interface IWorkspaceInformation extends IWorkspace {
|
|||
telemetryId: string | undefined;
|
||||
}
|
||||
|
||||
export const ID = 'diagnosticsService';
|
||||
export const IDiagnosticsService = createDecorator<IDiagnosticsService>(ID);
|
||||
|
||||
export interface IDiagnosticsService {
|
||||
_serviceBrand: any;
|
||||
|
||||
getPerformanceInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<PerformanceInfo>;
|
||||
getSystemInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<SystemInfo>;
|
||||
getDiagnostics(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<string>;
|
||||
reportWorkspaceStats(workspace: IWorkspaceInformation): Promise<void>;
|
||||
}
|
||||
|
||||
export function isRemoteDiagnosticError(x: any): x is IRemoteDiagnosticError {
|
||||
return !!x.hostName && !!x.errorMessage;
|
||||
}
|
|
@ -4,7 +4,8 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IServerChannel, IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { IDiagnosticsService, IRemoteDiagnosticInfo, IRemoteDiagnosticError, SystemInfo, PerformanceInfo } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { IRemoteDiagnosticInfo, IRemoteDiagnosticError, SystemInfo, PerformanceInfo } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { IDiagnosticsService } from './diagnosticsService';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IMainProcessInfo } from 'vs/platform/launch/common/launchService';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as osLib from 'os';
|
||||
import { virtualMachineHint } from 'vs/base/node/id';
|
||||
import { IMachineInfo, WorkspaceStats, WorkspaceStatItem, IDiagnosticsService, PerformanceInfo, SystemInfo, IRemoteDiagnosticInfo, IRemoteDiagnosticError, isRemoteDiagnosticError, IWorkspaceInformation } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { IMachineInfo, WorkspaceStats, WorkspaceStatItem, PerformanceInfo, SystemInfo, IRemoteDiagnosticInfo, IRemoteDiagnosticError, isRemoteDiagnosticError, IWorkspaceInformation } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { readdir, stat, exists, readFile } from 'fs';
|
||||
import { join, basename } from 'vs/base/common/path';
|
||||
import { parse, ParseError } from 'vs/base/common/json';
|
||||
|
@ -17,6 +17,19 @@ import { URI } from 'vs/base/common/uri';
|
|||
import { ProcessItem } from 'vs/base/common/processes';
|
||||
import { IMainProcessInfo } from 'vs/platform/launch/common/launchService';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export const ID = 'diagnosticsService';
|
||||
export const IDiagnosticsService = createDecorator<IDiagnosticsService>(ID);
|
||||
|
||||
export interface IDiagnosticsService {
|
||||
_serviceBrand: any;
|
||||
|
||||
getPerformanceInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<PerformanceInfo>;
|
||||
getSystemInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<SystemInfo>;
|
||||
getDiagnostics(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<string>;
|
||||
reportWorkspaceStats(workspace: IWorkspaceInformation): Promise<void>;
|
||||
}
|
||||
|
||||
export interface VersionInfo {
|
||||
vscodeVersion: string;
|
||||
|
|
|
@ -134,7 +134,7 @@ export class OutOfProcessWin32FolderWatcher {
|
|||
public dispose(): void {
|
||||
if (this.handle) {
|
||||
this.handle.kill();
|
||||
this.handle = null!; // StrictNullOverride: nulling out ok in dispose
|
||||
this.handle = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { IIssueService, IssueReporterData, ProcessExplorerData } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService, IssueReporterData, ProcessExplorerData } from 'vs/platform/issue/node/issue';
|
||||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
import { localize } from 'vs/nls';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import { parseArgs } from 'vs/platform/environment/node/argv';
|
||||
import { IIssueService, IssueReporterData, IssueReporterFeatures, ProcessExplorerData } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService, IssueReporterData, IssueReporterFeatures, ProcessExplorerData } from 'vs/platform/issue/node/issue';
|
||||
import { BrowserWindow, ipcMain, screen, Event, dialog } from 'electron';
|
||||
import { ILaunchService } from 'vs/platform/launch/electron-main/launchService';
|
||||
import { PerformanceInfo, IDiagnosticsService, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { PerformanceInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { isMacintosh, IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { IServerChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService } from 'vs/platform/issue/node/issue';
|
||||
|
||||
export class IssueChannel implements IServerChannel {
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import { BrowserWindow, ipcMain, Event as IpcEvent, app } from 'electron';
|
|||
import { Event } from 'vs/base/common/event';
|
||||
import { hasArgs } from 'vs/platform/environment/node/argv';
|
||||
import { coalesce } from 'vs/base/common/arrays';
|
||||
import { IDiagnosticInfoOptions, IDiagnosticInfo, IRemoteDiagnosticInfo, IRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { IDiagnosticInfoOptions, IDiagnosticInfo, IRemoteDiagnosticInfo, IRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { IMainProcessInfo, IWindowInfo } from 'vs/platform/launch/common/launchService';
|
||||
|
||||
export const ID = 'launchService';
|
||||
|
|
|
@ -17,6 +17,7 @@ import { URI } from 'vs/base/common/uri';
|
|||
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { normalizeDriveLetter } from 'vs/base/common/labels';
|
||||
import { dirname, joinPath } from 'vs/base/common/resources';
|
||||
|
||||
suite('WorkspacesMainService', () => {
|
||||
const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'workspacesservice');
|
||||
|
@ -51,13 +52,13 @@ suite('WorkspacesMainService', () => {
|
|||
|
||||
let service: TestWorkspacesMainService;
|
||||
|
||||
setup(() => {
|
||||
setup(async () => {
|
||||
service = new TestWorkspacesMainService(environmentService, logService);
|
||||
|
||||
// Delete any existing backups completely and then re-create it.
|
||||
return pfs.rimraf(untitledWorkspacesHomePath, pfs.RimRafMode.MOVE).then(() => {
|
||||
return pfs.mkdirp(untitledWorkspacesHomePath);
|
||||
});
|
||||
await pfs.rimraf(untitledWorkspacesHomePath, pfs.RimRafMode.MOVE);
|
||||
|
||||
return pfs.mkdirp(untitledWorkspacesHomePath);
|
||||
});
|
||||
|
||||
teardown(() => {
|
||||
|
@ -77,57 +78,50 @@ suite('WorkspacesMainService', () => {
|
|||
assert.equal(u1.toString(), u2.toString());
|
||||
}
|
||||
|
||||
test('createWorkspace (folders)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
assert.ok(workspace);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
assert.ok(service.isUntitledWorkspace(workspace));
|
||||
test('createWorkspace (folders)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
assert.ok(workspace);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
assert.ok(service.isUntitledWorkspace(workspace));
|
||||
|
||||
const ws = JSON.parse(fs.readFileSync(workspace.configPath.fsPath).toString()) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 2); //
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, process.cwd());
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, os.tmpdir());
|
||||
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[0]).name);
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[1]).name);
|
||||
});
|
||||
const ws = (JSON.parse(fs.readFileSync(workspace.configPath.fsPath).toString()) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 2);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, process.cwd());
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, os.tmpdir());
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[0]).name);
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[1]).name);
|
||||
});
|
||||
|
||||
test('createWorkspace (folders with name)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()], ['currentworkingdirectory', 'tempdir']).then(workspace => {
|
||||
assert.ok(workspace);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
assert.ok(service.isUntitledWorkspace(workspace));
|
||||
test('createWorkspace (folders with name)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()], ['currentworkingdirectory', 'tempdir']);
|
||||
assert.ok(workspace);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
assert.ok(service.isUntitledWorkspace(workspace));
|
||||
|
||||
const ws = JSON.parse(fs.readFileSync(workspace.configPath.fsPath).toString()) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 2); //
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, process.cwd());
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, os.tmpdir());
|
||||
|
||||
assert.equal((<IRawFileWorkspaceFolder>ws.folders[0]).name, 'currentworkingdirectory');
|
||||
assert.equal((<IRawFileWorkspaceFolder>ws.folders[1]).name, 'tempdir');
|
||||
});
|
||||
const ws = (JSON.parse(fs.readFileSync(workspace.configPath.fsPath).toString()) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 2);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, process.cwd());
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, os.tmpdir());
|
||||
assert.equal((<IRawFileWorkspaceFolder>ws.folders[0]).name, 'currentworkingdirectory');
|
||||
assert.equal((<IRawFileWorkspaceFolder>ws.folders[1]).name, 'tempdir');
|
||||
});
|
||||
|
||||
test('createUntitledWorkspace (folders as other resource URIs)', () => {
|
||||
test('createUntitledWorkspace (folders as other resource URIs)', async () => {
|
||||
const folder1URI = URI.parse('myscheme://server/work/p/f1');
|
||||
const folder2URI = URI.parse('myscheme://server/work/o/f3');
|
||||
|
||||
return service.createUntitledWorkspace([{ uri: folder1URI }, { uri: folder2URI }], 'server').then(workspace => {
|
||||
assert.ok(workspace);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
assert.ok(service.isUntitledWorkspace(workspace));
|
||||
const workspace = await service.createUntitledWorkspace([{ uri: folder1URI }, { uri: folder2URI }], 'server');
|
||||
assert.ok(workspace);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
assert.ok(service.isUntitledWorkspace(workspace));
|
||||
|
||||
const ws = JSON.parse(fs.readFileSync(workspace.configPath.fsPath).toString()) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 2);
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[0]).uri, folder1URI.toString(true));
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[1]).uri, folder2URI.toString(true));
|
||||
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[0]).name);
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[1]).name);
|
||||
|
||||
assert.equal(ws.remoteAuthority, 'server');
|
||||
});
|
||||
const ws = (JSON.parse(fs.readFileSync(workspace.configPath.fsPath).toString()) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 2);
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[0]).uri, folder1URI.toString(true));
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[1]).uri, folder2URI.toString(true));
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[0]).name);
|
||||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[1]).name);
|
||||
assert.equal(ws.remoteAuthority, 'server');
|
||||
});
|
||||
|
||||
test('createWorkspaceSync (folders)', () => {
|
||||
|
@ -178,145 +172,130 @@ suite('WorkspacesMainService', () => {
|
|||
assert.ok(!(<IRawFileWorkspaceFolder>ws.folders[1]).name);
|
||||
});
|
||||
|
||||
test('resolveWorkspaceSync', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
assert.ok(service.resolveLocalWorkspaceSync(workspace.configPath));
|
||||
test('resolveWorkspaceSync', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
assert.ok(service.resolveLocalWorkspaceSync(workspace.configPath));
|
||||
|
||||
// make it a valid workspace path
|
||||
const newPath = path.join(path.dirname(workspace.configPath.fsPath), `workspace.${WORKSPACE_EXTENSION}`);
|
||||
fs.renameSync(workspace.configPath.fsPath, newPath);
|
||||
workspace.configPath = URI.file(newPath);
|
||||
// make it a valid workspace path
|
||||
const newPath = path.join(path.dirname(workspace.configPath.fsPath), `workspace.${WORKSPACE_EXTENSION}`);
|
||||
fs.renameSync(workspace.configPath.fsPath, newPath);
|
||||
workspace.configPath = URI.file(newPath);
|
||||
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assert.equal(2, resolved!.folders.length);
|
||||
assertEqualURI(resolved!.configPath, workspace.configPath);
|
||||
assert.ok(resolved!.id);
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assert.equal(2, resolved!.folders.length);
|
||||
assertEqualURI(resolved!.configPath, workspace.configPath);
|
||||
assert.ok(resolved!.id);
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ something: 'something' })); // invalid workspace
|
||||
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ something: 'something' })); // invalid workspace
|
||||
const resolvedInvalid = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assert.ok(!resolvedInvalid);
|
||||
});
|
||||
const resolvedInvalid = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assert.ok(!resolvedInvalid);
|
||||
});
|
||||
|
||||
test('resolveWorkspaceSync (support relative paths)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ folders: [{ path: './ticino-playground/lib' }] }));
|
||||
test('resolveWorkspaceSync (support relative paths)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ folders: [{ path: './ticino-playground/lib' }] }));
|
||||
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'lib')));
|
||||
});
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'lib')));
|
||||
});
|
||||
|
||||
test('resolveWorkspaceSync (support relative paths #2)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ folders: [{ path: './ticino-playground/lib/../other' }] }));
|
||||
test('resolveWorkspaceSync (support relative paths #2)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ folders: [{ path: './ticino-playground/lib/../other' }] }));
|
||||
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'other')));
|
||||
});
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'other')));
|
||||
});
|
||||
|
||||
test('resolveWorkspaceSync (support relative paths #3)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ folders: [{ path: 'ticino-playground/lib' }] }));
|
||||
test('resolveWorkspaceSync (support relative paths #3)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
fs.writeFileSync(workspace.configPath.fsPath, JSON.stringify({ folders: [{ path: 'ticino-playground/lib' }] }));
|
||||
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'lib')));
|
||||
});
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'lib')));
|
||||
});
|
||||
|
||||
test('resolveWorkspaceSync (support invalid JSON via fault tolerant parsing)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
fs.writeFileSync(workspace.configPath.fsPath, '{ "folders": [ { "path": "./ticino-playground/lib" } , ] }'); // trailing comma
|
||||
test('resolveWorkspaceSync (support invalid JSON via fault tolerant parsing)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
fs.writeFileSync(workspace.configPath.fsPath, '{ "folders": [ { "path": "./ticino-playground/lib" } , ] }'); // trailing comma
|
||||
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'lib')));
|
||||
});
|
||||
const resolved = service.resolveLocalWorkspaceSync(workspace.configPath);
|
||||
assertEqualURI(resolved!.folders[0].uri, URI.file(path.join(path.dirname(workspace.configPath.fsPath), 'ticino-playground', 'lib')));
|
||||
});
|
||||
|
||||
test('rewriteWorkspaceFileForNewLocation', () => {
|
||||
test('rewriteWorkspaceFileForNewLocation', async () => {
|
||||
const folder1 = process.cwd(); // absolute path because outside of tmpDir
|
||||
const tmpDir = os.tmpdir();
|
||||
const tmpInsideDir = path.join(os.tmpdir(), 'inside');
|
||||
|
||||
return createWorkspace([folder1, tmpInsideDir, path.join(tmpInsideDir, 'somefolder')]).then(workspace => {
|
||||
const origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
const workspace = await createWorkspace([folder1, tmpInsideDir, path.join(tmpInsideDir, 'somefolder')]);
|
||||
const origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
|
||||
let origConfigPath = workspace.configPath;
|
||||
let workspaceConfigPath = URI.file(path.join(tmpDir, 'inside', 'myworkspace1.code-workspace'));
|
||||
let newContent = rewriteWorkspaceFileForNewLocation(origContent, origConfigPath, workspaceConfigPath);
|
||||
let origConfigPath = workspace.configPath;
|
||||
let workspaceConfigPath = URI.file(path.join(tmpDir, 'inside', 'myworkspace1.code-workspace'));
|
||||
let newContent = rewriteWorkspaceFileForNewLocation(origContent, origConfigPath, workspaceConfigPath);
|
||||
let ws = (JSON.parse(newContent) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1); // absolute path because outside of tmpdir
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, '.');
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, 'somefolder');
|
||||
|
||||
let ws = JSON.parse(newContent) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1); // absolute path because outside of tmpdir
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, '.');
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, 'somefolder');
|
||||
origConfigPath = workspaceConfigPath;
|
||||
workspaceConfigPath = URI.file(path.join(tmpDir, 'myworkspace2.code-workspace'));
|
||||
newContent = rewriteWorkspaceFileForNewLocation(newContent, origConfigPath, workspaceConfigPath);
|
||||
ws = (JSON.parse(newContent) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, 'inside');
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, isWindows ? 'inside\\somefolder' : 'inside/somefolder');
|
||||
|
||||
origConfigPath = workspaceConfigPath;
|
||||
workspaceConfigPath = URI.file(path.join(tmpDir, 'myworkspace2.code-workspace'));
|
||||
newContent = rewriteWorkspaceFileForNewLocation(newContent, origConfigPath, workspaceConfigPath);
|
||||
origConfigPath = workspaceConfigPath;
|
||||
workspaceConfigPath = URI.file(path.join(tmpDir, 'other', 'myworkspace2.code-workspace'));
|
||||
newContent = rewriteWorkspaceFileForNewLocation(newContent, origConfigPath, workspaceConfigPath);
|
||||
ws = (JSON.parse(newContent) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, tmpInsideDir);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, path.join(tmpInsideDir, 'somefolder'));
|
||||
|
||||
ws = JSON.parse(newContent) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, 'inside');
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, isWindows ? 'inside\\somefolder' : 'inside/somefolder');
|
||||
origConfigPath = workspaceConfigPath;
|
||||
workspaceConfigPath = URI.parse('foo://foo/bar/myworkspace2.code-workspace');
|
||||
newContent = rewriteWorkspaceFileForNewLocation(newContent, origConfigPath, workspaceConfigPath);
|
||||
ws = (JSON.parse(newContent) as IStoredWorkspace);
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[0]).uri, URI.file(folder1).toString(true));
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[1]).uri, URI.file(tmpInsideDir).toString(true));
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[2]).uri, URI.file(path.join(tmpInsideDir, 'somefolder')).toString(true));
|
||||
|
||||
origConfigPath = workspaceConfigPath;
|
||||
workspaceConfigPath = URI.file(path.join(tmpDir, 'other', 'myworkspace2.code-workspace'));
|
||||
newContent = rewriteWorkspaceFileForNewLocation(newContent, origConfigPath, workspaceConfigPath);
|
||||
|
||||
ws = JSON.parse(newContent) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, tmpInsideDir);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, path.join(tmpInsideDir, 'somefolder'));
|
||||
|
||||
origConfigPath = workspaceConfigPath;
|
||||
workspaceConfigPath = URI.parse('foo://foo/bar/myworkspace2.code-workspace');
|
||||
newContent = rewriteWorkspaceFileForNewLocation(newContent, origConfigPath, workspaceConfigPath);
|
||||
|
||||
ws = JSON.parse(newContent) as IStoredWorkspace;
|
||||
assert.equal(ws.folders.length, 3);
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[0]).uri, URI.file(folder1).toString(true));
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[1]).uri, URI.file(tmpInsideDir).toString(true));
|
||||
assert.equal((<IRawUriWorkspaceFolder>ws.folders[2]).uri, URI.file(path.join(tmpInsideDir, 'somefolder')).toString(true));
|
||||
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
|
||||
test('rewriteWorkspaceFileForNewLocation (preserves comments)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir(), path.join(os.tmpdir(), 'somefolder')]).then(workspace => {
|
||||
const workspaceConfigPath = URI.file(path.join(os.tmpdir(), `myworkspace.${Date.now()}.${WORKSPACE_EXTENSION}`));
|
||||
test('rewriteWorkspaceFileForNewLocation (preserves comments)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir(), path.join(os.tmpdir(), 'somefolder')]);
|
||||
const workspaceConfigPath = URI.file(path.join(os.tmpdir(), `myworkspace.${Date.now()}.${WORKSPACE_EXTENSION}`));
|
||||
|
||||
let origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
origContent = `// this is a comment\n${origContent}`;
|
||||
let origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
origContent = `// this is a comment\n${origContent}`;
|
||||
|
||||
let newContent = rewriteWorkspaceFileForNewLocation(origContent, workspace.configPath, workspaceConfigPath);
|
||||
|
||||
assert.equal(0, newContent.indexOf('// this is a comment'));
|
||||
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
let newContent = rewriteWorkspaceFileForNewLocation(origContent, workspace.configPath, workspaceConfigPath);
|
||||
assert.equal(0, newContent.indexOf('// this is a comment'));
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
|
||||
test('rewriteWorkspaceFileForNewLocation (preserves forward slashes)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir(), path.join(os.tmpdir(), 'somefolder')]).then(workspace => {
|
||||
const workspaceConfigPath = URI.file(path.join(os.tmpdir(), `myworkspace.${Date.now()}.${WORKSPACE_EXTENSION}`));
|
||||
let origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
origContent = origContent.replace(/[\\]/g, '/'); // convert backslash to slash
|
||||
test('rewriteWorkspaceFileForNewLocation (preserves forward slashes)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir(), path.join(os.tmpdir(), 'somefolder')]);
|
||||
const workspaceConfigPath = URI.file(path.join(os.tmpdir(), `myworkspace.${Date.now()}.${WORKSPACE_EXTENSION}`));
|
||||
|
||||
const newContent = rewriteWorkspaceFileForNewLocation(origContent, workspace.configPath, workspaceConfigPath);
|
||||
let origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
origContent = origContent.replace(/[\\]/g, '/'); // convert backslash to slash
|
||||
|
||||
const ws = JSON.parse(newContent) as IStoredWorkspace;
|
||||
assert.ok(ws.folders.every(f => (<IRawFileWorkspaceFolder>f).path.indexOf('\\') < 0));
|
||||
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
const newContent = rewriteWorkspaceFileForNewLocation(origContent, workspace.configPath, workspaceConfigPath);
|
||||
const ws = (JSON.parse(newContent) as IStoredWorkspace);
|
||||
assert.ok(ws.folders.every(f => (<IRawFileWorkspaceFolder>f).path.indexOf('\\') < 0));
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
|
||||
test('rewriteWorkspaceFileForNewLocation (unc paths)', () => {
|
||||
test('rewriteWorkspaceFileForNewLocation (unc paths)', async () => {
|
||||
if (!isWindows) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
@ -326,68 +305,58 @@ suite('WorkspacesMainService', () => {
|
|||
const folder2Location = '\\\\server\\share2\\some\\path';
|
||||
const folder3Location = path.join(os.tmpdir(), 'wsloc', 'inner', 'more');
|
||||
|
||||
return createWorkspace([folder1Location, folder2Location, folder3Location]).then(workspace => {
|
||||
const workspaceConfigPath = URI.file(path.join(workspaceLocation, `myworkspace.${Date.now()}.${WORKSPACE_EXTENSION}`));
|
||||
let origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
const workspace = await createWorkspace([folder1Location, folder2Location, folder3Location]);
|
||||
const workspaceConfigPath = URI.file(path.join(workspaceLocation, `myworkspace.${Date.now()}.${WORKSPACE_EXTENSION}`));
|
||||
let origContent = fs.readFileSync(workspace.configPath.fsPath).toString();
|
||||
const newContent = rewriteWorkspaceFileForNewLocation(origContent, workspace.configPath, workspaceConfigPath);
|
||||
const ws = (JSON.parse(newContent) as IStoredWorkspace);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1Location);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, folder2Location);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, 'inner\\more');
|
||||
|
||||
const newContent = rewriteWorkspaceFileForNewLocation(origContent, workspace.configPath, workspaceConfigPath);
|
||||
|
||||
const ws = JSON.parse(newContent) as IStoredWorkspace;
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[0]).path, folder1Location);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[1]).path, folder2Location);
|
||||
assertPathEquals((<IRawFileWorkspaceFolder>ws.folders[2]).path, 'inner\\more');
|
||||
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
|
||||
test('deleteUntitledWorkspaceSync (untitled)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
|
||||
assert.ok(!fs.existsSync(workspace.configPath.fsPath));
|
||||
});
|
||||
test('deleteUntitledWorkspaceSync (untitled)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
assert.ok(fs.existsSync(workspace.configPath.fsPath));
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
assert.ok(!fs.existsSync(workspace.configPath.fsPath));
|
||||
});
|
||||
|
||||
test('deleteUntitledWorkspaceSync (saved)', () => {
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(workspace => {
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
test('deleteUntitledWorkspaceSync (saved)', async () => {
|
||||
const workspace = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
service.deleteUntitledWorkspaceSync(workspace);
|
||||
});
|
||||
|
||||
test('getUntitledWorkspaceSync', () => {
|
||||
test('getUntitledWorkspaceSync', async () => {
|
||||
let untitled = service.getUntitledWorkspacesSync();
|
||||
assert.equal(untitled.length, 0);
|
||||
|
||||
return createWorkspace([process.cwd(), os.tmpdir()]).then(untitledOne => {
|
||||
assert.ok(fs.existsSync(untitledOne.configPath.fsPath));
|
||||
const untitledOne = await createWorkspace([process.cwd(), os.tmpdir()]);
|
||||
assert.ok(fs.existsSync(untitledOne.configPath.fsPath));
|
||||
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
assert.equal(1, untitled.length);
|
||||
assert.equal(untitledOne.id, untitled[0].workspace.id);
|
||||
|
||||
assert.equal(1, untitled.length);
|
||||
assert.equal(untitledOne.id, untitled[0].workspace.id);
|
||||
const untitledTwo = await createWorkspace([os.tmpdir(), process.cwd()]);
|
||||
assert.ok(fs.existsSync(untitledTwo.configPath.fsPath));
|
||||
assert.ok(fs.existsSync(untitledOne.configPath.fsPath), `Unexpected workspaces count of 1 (expected 2): ${untitledOne.configPath.fsPath} does not exist anymore?`);
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
assert.ok(fs.existsSync(untitledOne.configPath.fsPath), `Unexpected workspaces count of 1 (expected 2): ${untitledOne.configPath.fsPath} does not exist anymore?`);
|
||||
if (untitled.length === 1) {
|
||||
const untitledHome = dirname(dirname(untitledTwo.configPath));
|
||||
assert.fail(`Unexpected workspaces count of 1 (expected 2), all workspaces:\n ${fs.readdirSync(untitledHome.fsPath).map(name => fs.readFileSync(joinPath(untitledHome, name, 'workspace.json').fsPath, 'utf8'))}`);
|
||||
}
|
||||
assert.equal(2, untitled.length);
|
||||
|
||||
return createWorkspace([os.tmpdir(), process.cwd()]).then(untitledTwo => {
|
||||
assert.ok(fs.existsSync(untitledTwo.configPath.fsPath));
|
||||
service.deleteUntitledWorkspaceSync(untitledOne);
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
assert.equal(1, untitled.length);
|
||||
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
|
||||
if (untitled.length === 1) {
|
||||
assert.fail('Unexpected workspaces count, contents:\n' + fs.readFileSync(untitledTwo.configPath.fsPath, 'utf8'));
|
||||
}
|
||||
|
||||
assert.equal(2, untitled.length);
|
||||
|
||||
service.deleteUntitledWorkspaceSync(untitledOne);
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
assert.equal(1, untitled.length);
|
||||
|
||||
service.deleteUntitledWorkspaceSync(untitledTwo);
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
assert.equal(0, untitled.length);
|
||||
});
|
||||
});
|
||||
service.deleteUntitledWorkspaceSync(untitledTwo);
|
||||
untitled = service.getUntitledWorkspacesSync();
|
||||
assert.equal(0, untitled.length);
|
||||
});
|
||||
});
|
||||
|
|
25
src/vs/vscode.proposed.d.ts
vendored
|
@ -565,22 +565,6 @@ declare module 'vscode' {
|
|||
|
||||
//#endregion
|
||||
|
||||
//#region Joh: onDidExecuteCommand
|
||||
|
||||
export interface CommandExecutionEvent {
|
||||
command: string;
|
||||
arguments: any[];
|
||||
}
|
||||
|
||||
export namespace commands {
|
||||
/**
|
||||
* An event that is emitted when a [command](#Command) is executed.
|
||||
*/
|
||||
export const onDidExecuteCommand: Event<CommandExecutionEvent>;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Joh: decorations
|
||||
|
||||
//todo@joh -> make class
|
||||
|
@ -1046,6 +1030,15 @@ declare module 'vscode' {
|
|||
*/
|
||||
constructor(label: TreeItemLabel, collapsibleState?: TreeItemCollapsibleState);
|
||||
}
|
||||
|
||||
export interface TreeViewOptions2<T> extends TreeViewOptions<T> {
|
||||
/**
|
||||
* Whether the tree supports multi-select. When the tree supports multi-select and a command is executed from the tree,
|
||||
* the first argument to the command is the tree item that the command was executed on and the second argument is an
|
||||
* array containing the other selected tree items.
|
||||
*/
|
||||
canSelectMany?: boolean;
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region CustomExecution
|
||||
|
|
|
@ -15,7 +15,6 @@ export class MainThreadCommands implements MainThreadCommandsShape {
|
|||
private readonly _commandRegistrations = new Map<string, IDisposable>();
|
||||
private readonly _generateCommandsDocumentationRegistration: IDisposable;
|
||||
private readonly _proxy: ExtHostCommandsShape;
|
||||
private _onDidExecuteCommandListener?: IDisposable;
|
||||
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
|
@ -78,19 +77,6 @@ export class MainThreadCommands implements MainThreadCommandsShape {
|
|||
return this._commandService.executeCommand<T>(id, ...args);
|
||||
}
|
||||
|
||||
$registerCommandListener() {
|
||||
if (!this._onDidExecuteCommandListener) {
|
||||
this._onDidExecuteCommandListener = this._commandService.onDidExecuteCommand(command => this._proxy.$handleDidExecuteCommand(command));
|
||||
}
|
||||
}
|
||||
|
||||
$unregisterCommandListener() {
|
||||
if (this._onDidExecuteCommandListener) {
|
||||
this._onDidExecuteCommandListener.dispose();
|
||||
this._onDidExecuteCommandListener = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
$getCommands(): Promise<string[]> {
|
||||
return Promise.resolve([...CommandsRegistry.getCommands().keys()]);
|
||||
}
|
||||
|
|
|
@ -5,49 +5,33 @@
|
|||
|
||||
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { MainContext, MainThreadKeytarShape, IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
|
||||
import { optional } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ICredentialsService } from 'vs/workbench/services/credentials/common/credentials';
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadKeytar)
|
||||
export class MainThreadKeytar implements MainThreadKeytarShape {
|
||||
|
||||
private readonly _credentialsService?: ICredentialsService;
|
||||
|
||||
constructor(
|
||||
_extHostContext: IExtHostContext,
|
||||
@optional(ICredentialsService) credentialsService: ICredentialsService,
|
||||
) {
|
||||
this._credentialsService = credentialsService;
|
||||
@ICredentialsService private readonly _credentialsService: ICredentialsService,
|
||||
) { }
|
||||
|
||||
async $getPassword(service: string, account: string): Promise<string | null> {
|
||||
return this._credentialsService.getPassword(service, account);
|
||||
}
|
||||
|
||||
async $setPassword(service: string, account: string, password: string): Promise<void> {
|
||||
return this._credentialsService.setPassword(service, account, password);
|
||||
}
|
||||
|
||||
async $deletePassword(service: string, account: string): Promise<boolean> {
|
||||
return this._credentialsService.deletePassword(service, account);
|
||||
}
|
||||
|
||||
async $findPassword(service: string): Promise<string | null> {
|
||||
return this._credentialsService.findPassword(service);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
//
|
||||
}
|
||||
|
||||
async $getPassword(service: string, account: string): Promise<string | null> {
|
||||
if (this._credentialsService) {
|
||||
return this._credentialsService.getPassword(service, account);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
async $setPassword(service: string, account: string, password: string): Promise<void> {
|
||||
if (this._credentialsService) {
|
||||
return this._credentialsService.setPassword(service, account, password);
|
||||
}
|
||||
}
|
||||
|
||||
async $deletePassword(service: string, account: string): Promise<boolean> {
|
||||
if (this._credentialsService) {
|
||||
return this._credentialsService.deletePassword(service, account);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
async $findPassword(service: string): Promise<string | null> {
|
||||
if (this._credentialsService) {
|
||||
return this._credentialsService.findPassword(service);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,13 +27,14 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie
|
|||
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTreeViews);
|
||||
}
|
||||
|
||||
$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean }): void {
|
||||
$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean }): void {
|
||||
const dataProvider = new TreeViewDataProvider(treeViewId, this._proxy, this.notificationService);
|
||||
this._dataProviders.set(treeViewId, dataProvider);
|
||||
const viewer = this.getTreeView(treeViewId);
|
||||
if (viewer) {
|
||||
viewer.dataProvider = dataProvider;
|
||||
viewer.showCollapseAllAction = !!options.showCollapseAll;
|
||||
viewer.canSelectMany = !!options.canSelectMany;
|
||||
this.registerListeners(treeViewId, viewer);
|
||||
this._proxy.$setVisible(treeViewId, viewer.visible);
|
||||
} else {
|
||||
|
|
|
@ -19,6 +19,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
|||
import { VIEWLET_ID as EXPLORER } from 'vs/workbench/contrib/files/common/files';
|
||||
import { VIEWLET_ID as SCM } from 'vs/workbench/contrib/scm/common/scm';
|
||||
import { VIEWLET_ID as DEBUG } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { VIEWLET_ID as REMOTE } from 'vs/workbench/contrib/remote/common/remote.contribution';
|
||||
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor, ShowViewletAction } from 'vs/workbench/browser/viewlet';
|
||||
|
@ -79,6 +80,7 @@ interface IUserFriendlyViewDescriptor {
|
|||
id: string;
|
||||
name: string;
|
||||
when?: string;
|
||||
group?: string;
|
||||
}
|
||||
|
||||
const viewDescriptor: IJSONSchema = {
|
||||
|
@ -99,6 +101,27 @@ const viewDescriptor: IJSONSchema = {
|
|||
}
|
||||
};
|
||||
|
||||
const nestableViewDescriptor: IJSONSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'),
|
||||
type: 'string'
|
||||
},
|
||||
name: {
|
||||
description: localize('vscode.extension.contributes.view.name', 'The human-readable name of the view. Will be shown'),
|
||||
type: 'string'
|
||||
},
|
||||
when: {
|
||||
description: localize('vscode.extension.contributes.view.when', 'Condition which must be true to show this view'),
|
||||
type: 'string'
|
||||
},
|
||||
group: {
|
||||
description: localize('vscode.extension.contributes.view.group', 'Nested group in the viewlet'),
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
};
|
||||
const viewsContribution: IJSONSchema = {
|
||||
description: localize('vscode.extension.contributes.views', "Contributes views to the editor"),
|
||||
type: 'object',
|
||||
|
@ -126,6 +149,12 @@ const viewsContribution: IJSONSchema = {
|
|||
type: 'array',
|
||||
items: viewDescriptor,
|
||||
default: []
|
||||
},
|
||||
'remote': {
|
||||
description: localize('views.remote', "Contributes views to Remote container in the Activity bar"),
|
||||
type: 'array',
|
||||
items: nestableViewDescriptor,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
additionalProperties: {
|
||||
|
@ -376,6 +405,12 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
|
|||
return null;
|
||||
}
|
||||
|
||||
const order = ExtensionIdentifier.equals(extension.description.identifier, container.extensionId)
|
||||
? index + 1
|
||||
: container.orderDelegate
|
||||
? container.orderDelegate.getOrder(item.group)
|
||||
: undefined;
|
||||
|
||||
const viewDescriptor = <ICustomViewDescriptor>{
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
|
@ -384,9 +419,10 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
|
|||
canToggleVisibility: true,
|
||||
collapsed: this.showCollapsed(container),
|
||||
treeView: this.instantiationService.createInstance(CustomTreeView, item.id, item.name, container),
|
||||
order: ExtensionIdentifier.equals(extension.description.identifier, container.extensionId) ? index + 1 : undefined,
|
||||
order: order,
|
||||
extensionId: extension.description.identifier,
|
||||
originalContainerId: entry.key
|
||||
originalContainerId: entry.key,
|
||||
group: item.group
|
||||
};
|
||||
|
||||
viewIds.push(viewDescriptor.id);
|
||||
|
@ -440,6 +476,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
|
|||
case 'explorer': return this.viewContainersRegistry.get(EXPLORER);
|
||||
case 'debug': return this.viewContainersRegistry.get(DEBUG);
|
||||
case 'scm': return this.viewContainersRegistry.get(SCM);
|
||||
case 'remote': return this.viewContainersRegistry.get(REMOTE);
|
||||
default: return this.viewContainersRegistry.get(`workbench.view.extension.${value}`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,11 +223,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
},
|
||||
getCommands(filterInternal: boolean = false): Thenable<string[]> {
|
||||
return extHostCommands.getCommands(filterInternal);
|
||||
},
|
||||
onDidExecuteCommand: proposedApiFunction(extension, (listener, thisArgs?, disposables?) => {
|
||||
checkProposedApiEnabled(extension);
|
||||
return extHostCommands.onDidExecuteCommand(listener, thisArgs, disposables);
|
||||
}),
|
||||
}
|
||||
};
|
||||
|
||||
// namespace: env
|
||||
|
|
|
@ -21,7 +21,7 @@ import { EndOfLineSequence, ISingleEditOperation } from 'vs/editor/common/model'
|
|||
import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel';
|
||||
import * as modes from 'vs/editor/common/modes';
|
||||
import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/modes/languageConfiguration';
|
||||
import { ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands';
|
||||
import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
|
||||
import { ConfigurationTarget, IConfigurationData, IConfigurationModel } from 'vs/platform/configuration/common/configuration';
|
||||
import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
|
@ -115,8 +115,6 @@ export interface MainThreadClipboardShape extends IDisposable {
|
|||
|
||||
export interface MainThreadCommandsShape extends IDisposable {
|
||||
$registerCommand(id: string): void;
|
||||
$registerCommandListener(): void;
|
||||
$unregisterCommandListener(): void;
|
||||
$unregisterCommand(id: string): void;
|
||||
$executeCommand<T>(id: string, args: any[]): Promise<T | undefined>;
|
||||
$getCommands(): Promise<string[]>;
|
||||
|
@ -242,7 +240,7 @@ export interface MainThreadTextEditorsShape extends IDisposable {
|
|||
}
|
||||
|
||||
export interface MainThreadTreeViewsShape extends IDisposable {
|
||||
$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean }): void;
|
||||
$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean }): void;
|
||||
$refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem }): Promise<void>;
|
||||
$reveal(treeViewId: string, treeItem: ITreeItem, parentChain: ITreeItem[], options: IRevealOptions): Promise<void>;
|
||||
$setMessage(treeViewId: string, message: string): void;
|
||||
|
@ -735,7 +733,6 @@ export interface MainThreadWindowShape extends IDisposable {
|
|||
export interface ExtHostCommandsShape {
|
||||
$executeContributedCommand<T>(id: string, ...args: any[]): Promise<T>;
|
||||
$getContributedCommandHandlerDescriptions(): Promise<{ [id: string]: string | ICommandHandlerDescription }>;
|
||||
$handleDidExecuteCommand(command: ICommandEvent): void;
|
||||
}
|
||||
|
||||
export interface ExtHostConfigurationShape {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { validateConstraint } from 'vs/base/common/types';
|
||||
import { ICommandHandlerDescription, ICommandEvent } from 'vs/platform/commands/common/commands';
|
||||
import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
|
||||
import * as extHostTypes from 'vs/workbench/api/common/extHostTypes';
|
||||
import * as extHostTypeConverter from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
import { cloneAndChange } from 'vs/base/common/objects';
|
||||
|
@ -17,7 +17,6 @@ import { revive } from 'vs/base/common/marshalling';
|
|||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
|
||||
|
@ -36,9 +35,6 @@ export class ExtHostCommands implements ExtHostCommandsShape {
|
|||
|
||||
readonly _serviceBrand: any;
|
||||
|
||||
private readonly _onDidExecuteCommand: Emitter<vscode.CommandExecutionEvent>;
|
||||
readonly onDidExecuteCommand: Event<vscode.CommandExecutionEvent>;
|
||||
|
||||
private readonly _commands = new Map<string, CommandHandler>();
|
||||
private readonly _proxy: MainThreadCommandsShape;
|
||||
private readonly _converter: CommandsConverter;
|
||||
|
@ -50,11 +46,6 @@ export class ExtHostCommands implements ExtHostCommandsShape {
|
|||
@ILogService logService: ILogService
|
||||
) {
|
||||
this._proxy = extHostRpc.getProxy(MainContext.MainThreadCommands);
|
||||
this._onDidExecuteCommand = new Emitter<vscode.CommandExecutionEvent>({
|
||||
onFirstListenerDidAdd: () => this._proxy.$registerCommandListener(),
|
||||
onLastListenerRemove: () => this._proxy.$unregisterCommandListener(),
|
||||
});
|
||||
this.onDidExecuteCommand = Event.filter(this._onDidExecuteCommand.event, e => e.command[0] !== '_'); // filter 'private' commands
|
||||
this._logService = logService;
|
||||
this._converter = new CommandsConverter(this);
|
||||
this._argumentProcessors = [
|
||||
|
@ -119,22 +110,13 @@ export class ExtHostCommands implements ExtHostCommandsShape {
|
|||
});
|
||||
}
|
||||
|
||||
$handleDidExecuteCommand(command: ICommandEvent): void {
|
||||
this._onDidExecuteCommand.fire({
|
||||
command: command.commandId,
|
||||
arguments: command.args.map(arg => this._argumentProcessors.reduce((r, p) => p.processArgument(r), arg))
|
||||
});
|
||||
}
|
||||
|
||||
executeCommand<T>(id: string, ...args: any[]): Promise<T> {
|
||||
this._logService.trace('ExtHostCommands#executeCommand', id);
|
||||
|
||||
if (this._commands.has(id)) {
|
||||
// we stay inside the extension host and support
|
||||
// to pass any kind of parameters around
|
||||
const res = this._executeContributedCommand<T>(id, args);
|
||||
this._onDidExecuteCommand.fire({ command: id, arguments: args });
|
||||
return res;
|
||||
return this._executeContributedCommand<T>(id, args);
|
||||
|
||||
} else {
|
||||
// automagically convert some argument types
|
||||
|
|
|
@ -52,10 +52,21 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape {
|
|||
private commands: ExtHostCommands,
|
||||
private logService: ILogService
|
||||
) {
|
||||
|
||||
function isTreeViewItemHandleArg(arg: any): boolean {
|
||||
return arg && arg.$treeViewId && arg.$treeItemHandle;
|
||||
}
|
||||
commands.registerArgumentProcessor({
|
||||
processArgument: arg => {
|
||||
if (arg && arg.$treeViewId && arg.$treeItemHandle) {
|
||||
if (isTreeViewItemHandleArg(arg)) {
|
||||
return this.convertArgument(arg);
|
||||
} else if (Array.isArray(arg) && (arg.length > 0)) {
|
||||
return arg.map(item => {
|
||||
if (isTreeViewItemHandleArg(item)) {
|
||||
return this.convertArgument(item);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
return arg;
|
||||
}
|
||||
|
@ -182,10 +193,10 @@ class ExtHostTreeView<T> extends Disposable {
|
|||
private refreshPromise: Promise<void> = Promise.resolve();
|
||||
private refreshQueue: Promise<void> = Promise.resolve();
|
||||
|
||||
constructor(private viewId: string, options: vscode.TreeViewOptions<T>, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter, private logService: ILogService, private extension: IExtensionDescription) {
|
||||
constructor(private viewId: string, options: vscode.TreeViewOptions2<T>, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter, private logService: ILogService, private extension: IExtensionDescription) {
|
||||
super();
|
||||
this.dataProvider = options.treeDataProvider;
|
||||
this.proxy.$registerTreeViewDataProvider(viewId, { showCollapseAll: !!options.showCollapseAll });
|
||||
this.proxy.$registerTreeViewDataProvider(viewId, { showCollapseAll: !!options.showCollapseAll, canSelectMany: !!options.canSelectMany });
|
||||
if (this.dataProvider.onDidChangeTreeData) {
|
||||
this._register(this.dataProvider.onDidChangeTreeData(element => this._onDidChangeData.fire({ message: false, element })));
|
||||
}
|
||||
|
|
|
@ -43,6 +43,69 @@ class ApiInstances {
|
|||
}
|
||||
}
|
||||
|
||||
class ExportsTrap {
|
||||
|
||||
static readonly Instance = new ExportsTrap();
|
||||
|
||||
private readonly _names: string[] = [];
|
||||
private readonly _exports = new Map<string, any>();
|
||||
|
||||
private constructor() {
|
||||
|
||||
const exportsProxy = new Proxy({}, {
|
||||
set: (target: any, p: PropertyKey, value: any, receiver: any) => {
|
||||
// store in target
|
||||
target[p] = value;
|
||||
// store in named-bucket
|
||||
const name = this._names[this._names.length - 1];
|
||||
this._exports.get(name)![p] = value;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const moduleProxy = new Proxy({}, {
|
||||
|
||||
get: (target: any, p: PropertyKey) => {
|
||||
if (p === 'exports') {
|
||||
return exportsProxy;
|
||||
}
|
||||
|
||||
return target[p];
|
||||
},
|
||||
|
||||
set: (target: any, p: PropertyKey, value: any, receiver: any) => {
|
||||
// store in target
|
||||
target[p] = value;
|
||||
|
||||
// override bucket
|
||||
if (p === 'exports') {
|
||||
const name = this._names[this._names.length - 1];
|
||||
this._exports.set(name, value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
(<any>self).exports = exportsProxy;
|
||||
(<any>self).module = moduleProxy;
|
||||
}
|
||||
|
||||
add(name: string) {
|
||||
this._exports.set(name, Object.create(null));
|
||||
this._names.push(name);
|
||||
|
||||
return {
|
||||
claim: () => {
|
||||
const result = this._exports.get(name);
|
||||
this._exports.delete(name);
|
||||
this._names.pop();
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
||||
|
||||
private _apiInstances?: ApiInstances;
|
||||
|
@ -57,7 +120,6 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
|||
|
||||
protected _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
||||
|
||||
|
||||
interface FakeCommonJSSelf {
|
||||
module?: object;
|
||||
exports?: object;
|
||||
|
@ -82,39 +144,30 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
|||
throw new Error(`Cannot load module '${mod}'`);
|
||||
}
|
||||
|
||||
const exports = Object.create(null);
|
||||
patchSelf.module = { exports };
|
||||
patchSelf.exports = exports;
|
||||
|
||||
const next = joinPath(parent, '..', ensureSuffix(mod, '.js'));
|
||||
moduleStack.push(next);
|
||||
const trap = ExportsTrap.Instance.add(next.toString());
|
||||
importScripts(asDomUri(next).toString(true));
|
||||
moduleStack.pop();
|
||||
|
||||
return exports;
|
||||
return trap.claim();
|
||||
};
|
||||
|
||||
try {
|
||||
activationTimesBuilder.codeLoadingStart();
|
||||
|
||||
const exports = Object.create(null);
|
||||
patchSelf.module = { exports };
|
||||
patchSelf.exports = exports;
|
||||
|
||||
module = module.with({ path: ensureSuffix(module.path, '.js') });
|
||||
moduleStack.push(module);
|
||||
|
||||
const trap = ExportsTrap.Instance.add(module.toString());
|
||||
importScripts(asDomUri(module).toString(true));
|
||||
moduleStack.pop();
|
||||
return Promise.resolve<T>(trap.claim());
|
||||
|
||||
} finally {
|
||||
activationTimesBuilder.codeLoadingStop();
|
||||
}
|
||||
|
||||
return Promise.resolve<T>(exports);
|
||||
}
|
||||
|
||||
async $setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void> {
|
||||
async $setRemoteEnvironment(_env: { [key: string]: string | null }): Promise<void> {
|
||||
throw new Error('Not supported');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ export interface IEditorOpeningEvent extends IEditorIdentifier {
|
|||
* Allows to prevent the opening of an editor by providing a callback
|
||||
* that will be executed instead. By returning another editor promise
|
||||
* it is possible to override the opening with another editor. It is ok
|
||||
* to return a promise that resolves to NULL to prevent the opening
|
||||
* to return a promise that resolves to `undefined` to prevent the opening
|
||||
* alltogether.
|
||||
*/
|
||||
prevent(callback: () => undefined | Promise<IEditor | undefined>): void;
|
||||
|
|
|
@ -164,9 +164,11 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
|||
private domNode!: HTMLElement;
|
||||
private treeContainer!: HTMLElement;
|
||||
private _messageValue: string | undefined;
|
||||
private _canSelectMany: boolean = false;
|
||||
private messageElement!: HTMLDivElement;
|
||||
private tree: WorkbenchAsyncDataTree<ITreeItem, ITreeItem, FuzzyScore> | undefined;
|
||||
private treeLabels: ResourceLabels | undefined;
|
||||
|
||||
private root: ITreeItem;
|
||||
private elementsToRefresh: ITreeItem[] = [];
|
||||
private menus: TitleMenus;
|
||||
|
@ -253,6 +255,14 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
|||
this.updateMessage();
|
||||
}
|
||||
|
||||
get canSelectMany(): boolean {
|
||||
return this._canSelectMany;
|
||||
}
|
||||
|
||||
set canSelectMany(canSelectMany: boolean) {
|
||||
this._canSelectMany = canSelectMany;
|
||||
}
|
||||
|
||||
get hasIconForParentNode(): boolean {
|
||||
return this._hasIconForParentNode;
|
||||
}
|
||||
|
@ -372,12 +382,14 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
|||
collapseByDefault: (e: ITreeItem): boolean => {
|
||||
return e.collapsibleState !== TreeItemCollapsibleState.Expanded;
|
||||
},
|
||||
multipleSelectionSupport: false
|
||||
}));
|
||||
multipleSelectionSupport: this.canSelectMany,
|
||||
}) as WorkbenchAsyncDataTree<ITreeItem, ITreeItem, FuzzyScore>);
|
||||
aligner.tree = this.tree;
|
||||
const actionRunner = new MultipleSelectionActionRunner(() => this.tree!.getSelection());
|
||||
renderer.actionRunner = actionRunner;
|
||||
|
||||
this.tree.contextKeyService.createKey<boolean>(this.id, true);
|
||||
this._register(this.tree.onContextMenu(e => this.onContextMenu(treeMenus, e)));
|
||||
this._register(this.tree.onContextMenu(e => this.onContextMenu(treeMenus, e, actionRunner)));
|
||||
this._register(this.tree.onDidChangeSelection(e => this._onDidChangeSelection.fire(e.elements)));
|
||||
this._register(this.tree.onDidChangeCollapseState(e => {
|
||||
if (!e.node.element) {
|
||||
|
@ -406,7 +418,7 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
|||
}));
|
||||
}
|
||||
|
||||
private onContextMenu(treeMenus: TreeMenus, treeEvent: ITreeContextMenuEvent<ITreeItem>): void {
|
||||
private onContextMenu(treeMenus: TreeMenus, treeEvent: ITreeContextMenuEvent<ITreeItem>, actionRunner: MultipleSelectionActionRunner): void {
|
||||
const node: ITreeItem | null = treeEvent.element;
|
||||
if (node === null) {
|
||||
return;
|
||||
|
@ -442,7 +454,7 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
|||
|
||||
getActionsContext: () => (<TreeViewItemHandleArg>{ $treeViewId: this.id, $treeItemHandle: node.handle }),
|
||||
|
||||
actionRunner: new MultipleSelectionActionRunner(() => this.tree!.getSelection())
|
||||
actionRunner
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -686,6 +698,8 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
static readonly ITEM_HEIGHT = 22;
|
||||
static readonly TREE_TEMPLATE_ID = 'treeExplorer';
|
||||
|
||||
private _actionRunner: MultipleSelectionActionRunner | undefined;
|
||||
|
||||
constructor(
|
||||
private treeViewId: string,
|
||||
private menus: TreeMenus,
|
||||
|
@ -703,6 +717,10 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
return TreeRenderer.TREE_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
set actionRunner(actionRunner: MultipleSelectionActionRunner) {
|
||||
this._actionRunner = actionRunner;
|
||||
}
|
||||
|
||||
renderTemplate(container: HTMLElement): ITreeExplorerTemplateData {
|
||||
DOM.addClass(container, 'custom-view-tree-node-item');
|
||||
|
||||
|
@ -740,8 +758,11 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
|
||||
templateData.icon.style.backgroundImage = iconUrl ? `url('${DOM.asDomUri(iconUrl).toString(true)}')` : '';
|
||||
DOM.toggleClass(templateData.icon, 'custom-view-tree-node-item-icon', !!iconUrl);
|
||||
templateData.actionBar.context = (<TreeViewItemHandleArg>{ $treeViewId: this.treeViewId, $treeItemHandle: node.handle });
|
||||
templateData.actionBar.context = <TreeViewItemHandleArg>{ $treeViewId: this.treeViewId, $treeItemHandle: node.handle };
|
||||
templateData.actionBar.push(this.menus.getResourceActions(node), { icon: true, label: false });
|
||||
if (this._actionRunner) {
|
||||
templateData.actionBar.actionRunner = this._actionRunner;
|
||||
}
|
||||
this.setAlignment(templateData.container, node);
|
||||
templateData.elementDisposable = (this.themeService.onDidFileIconThemeChange(() => this.setAlignment(templateData.container, node)));
|
||||
}
|
||||
|
@ -822,23 +843,23 @@ class Aligner extends Disposable {
|
|||
|
||||
class MultipleSelectionActionRunner extends ActionRunner {
|
||||
|
||||
constructor(private getSelectedResources: (() => any[])) {
|
||||
constructor(private getSelectedResources: (() => ITreeItem[])) {
|
||||
super();
|
||||
}
|
||||
|
||||
runAction(action: IAction, context: any): Promise<any> {
|
||||
if (action instanceof MenuItemAction) {
|
||||
const selection = this.getSelectedResources();
|
||||
const filteredSelection = selection.filter(s => s !== context);
|
||||
|
||||
if (selection.length === filteredSelection.length || selection.length === 1) {
|
||||
return action.run(context);
|
||||
}
|
||||
|
||||
return action.run(context, ...filteredSelection);
|
||||
runAction(action: IAction, context: TreeViewItemHandleArg): Promise<any> {
|
||||
const selection = this.getSelectedResources();
|
||||
let selectionHandleArgs: TreeViewItemHandleArg[] | undefined = undefined;
|
||||
if (selection.length > 1) {
|
||||
selectionHandleArgs = [];
|
||||
selection.forEach(selected => {
|
||||
if (selected.handle !== context.$treeItemHandle) {
|
||||
selectionHandleArgs!.push({ $treeViewId: context.$treeViewId, $treeItemHandle: selected.handle });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return super.runAction(action, context);
|
||||
return action.run(...[context, selectionHandleArgs]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -382,7 +382,19 @@ export class ContributableViewsModel extends Disposable {
|
|||
return 0;
|
||||
}
|
||||
|
||||
return (this.getViewOrder(a) - this.getViewOrder(b)) || (a.id < b.id ? -1 : 1);
|
||||
return (this.getViewOrder(a) - this.getViewOrder(b)) || this.getGroupOrderResult(a, b) || (a.id < b.id ? -1 : 1);
|
||||
}
|
||||
|
||||
private getGroupOrderResult(a: IViewDescriptor, b: IViewDescriptor) {
|
||||
if (!a.group || !b.group) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (a.group === b.group) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return a.group < b.group ? -1 : 1;
|
||||
}
|
||||
|
||||
private getViewOrder(viewDescriptor: IViewDescriptor): number {
|
||||
|
|
|
@ -123,12 +123,7 @@ class CodeRendererMain extends Disposable {
|
|||
const payload = await this.resolveWorkspaceInitializationPayload();
|
||||
|
||||
// Environment
|
||||
const environmentService = new BrowserWorkbenchEnvironmentService({
|
||||
workspaceId: payload.id,
|
||||
remoteAuthority: this.configuration.remoteAuthority,
|
||||
webviewEndpoint: this.configuration.webviewEndpoint,
|
||||
connectionToken: this.configuration.connectionToken
|
||||
});
|
||||
const environmentService = new BrowserWorkbenchEnvironmentService(payload.id, this.configuration);
|
||||
serviceCollection.set(IWorkbenchEnvironmentService, environmentService);
|
||||
|
||||
// Product
|
||||
|
|
|
@ -412,6 +412,8 @@ export class SimpleWindowService extends Disposable implements IWindowService {
|
|||
}
|
||||
|
||||
closeWindow(): Promise<void> {
|
||||
window.close();
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
@ -847,7 +849,7 @@ registerSingleton(ITunnelService, SimpleTunnelService);
|
|||
|
||||
//#region workspace stats
|
||||
|
||||
class WorkspaceStatsService implements IWorkspaceStatsService {
|
||||
class SimpleWorkspaceStatsService implements IWorkspaceStatsService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
|
@ -865,6 +867,6 @@ class WorkspaceStatsService implements IWorkspaceStatsService {
|
|||
|
||||
}
|
||||
|
||||
registerSingleton(IWorkspaceStatsService, WorkspaceStatsService);
|
||||
registerSingleton(IWorkspaceStatsService, SimpleWorkspaceStatsService);
|
||||
|
||||
//#endregion
|
||||
|
|
|
@ -51,7 +51,7 @@ export interface IViewContainersRegistry {
|
|||
*
|
||||
* @returns the registered ViewContainer.
|
||||
*/
|
||||
registerViewContainer(id: string, hideIfEmpty?: boolean, extensionId?: ExtensionIdentifier): ViewContainer;
|
||||
registerViewContainer(id: string, hideIfEmpty?: boolean, extensionId?: ExtensionIdentifier, viewOrderDelegate?: ViewOrderDelegate): ViewContainer;
|
||||
|
||||
/**
|
||||
* Deregisters the given view container
|
||||
|
@ -67,8 +67,12 @@ export interface IViewContainersRegistry {
|
|||
get(id: string): ViewContainer | undefined;
|
||||
}
|
||||
|
||||
interface ViewOrderDelegate {
|
||||
getOrder(group?: string): number | undefined;
|
||||
}
|
||||
|
||||
export class ViewContainer {
|
||||
protected constructor(readonly id: string, readonly hideIfEmpty: boolean, readonly extensionId?: ExtensionIdentifier) { }
|
||||
protected constructor(readonly id: string, readonly hideIfEmpty: boolean, readonly extensionId?: ExtensionIdentifier, readonly orderDelegate?: ViewOrderDelegate) { }
|
||||
}
|
||||
|
||||
class ViewContainersRegistryImpl extends Disposable implements IViewContainersRegistry {
|
||||
|
@ -85,7 +89,7 @@ class ViewContainersRegistryImpl extends Disposable implements IViewContainersRe
|
|||
return values(this.viewContainers);
|
||||
}
|
||||
|
||||
registerViewContainer(id: string, hideIfEmpty?: boolean, extensionId?: ExtensionIdentifier): ViewContainer {
|
||||
registerViewContainer(id: string, hideIfEmpty?: boolean, extensionId?: ExtensionIdentifier, viewOrderDelegate?: ViewOrderDelegate): ViewContainer {
|
||||
const existing = this.viewContainers.get(id);
|
||||
if (existing) {
|
||||
return existing;
|
||||
|
@ -93,7 +97,7 @@ class ViewContainersRegistryImpl extends Disposable implements IViewContainersRe
|
|||
|
||||
const viewContainer = new class extends ViewContainer {
|
||||
constructor() {
|
||||
super(id, !!hideIfEmpty, extensionId);
|
||||
super(id, !!hideIfEmpty, extensionId, viewOrderDelegate);
|
||||
}
|
||||
};
|
||||
this.viewContainers.set(id, viewContainer);
|
||||
|
@ -126,6 +130,8 @@ export interface IViewDescriptor {
|
|||
|
||||
readonly when?: ContextKeyExpr;
|
||||
|
||||
readonly group?: string;
|
||||
|
||||
readonly order?: number;
|
||||
|
||||
readonly weight?: number;
|
||||
|
@ -304,6 +310,8 @@ export interface ITreeView extends IDisposable {
|
|||
|
||||
showCollapseAllAction: boolean;
|
||||
|
||||
canSelectMany: boolean;
|
||||
|
||||
message?: string;
|
||||
|
||||
readonly visible: boolean;
|
||||
|
|
|
@ -543,9 +543,9 @@ class FunctionBreakpointInputRenderer implements IListRenderer<IFunctionBreakpoi
|
|||
}
|
||||
}
|
||||
|
||||
export function openBreakpointSource(breakpoint: IBreakpoint, sideBySide: boolean, preserveFocus: boolean, debugService: IDebugService, editorService: IEditorService): Promise<IEditor | null> {
|
||||
export function openBreakpointSource(breakpoint: IBreakpoint, sideBySide: boolean, preserveFocus: boolean, debugService: IDebugService, editorService: IEditorService): Promise<IEditor | undefined> {
|
||||
if (breakpoint.uri.scheme === DEBUG_SCHEME && debugService.state === State.Inactive) {
|
||||
return Promise.resolve(null);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
const selection = breakpoint.endLineNumber ? {
|
||||
|
|
|
@ -576,7 +576,7 @@ function isDebugModel(obj: any): obj is IDebugModel {
|
|||
}
|
||||
|
||||
function isDebugSession(obj: any): obj is IDebugSession {
|
||||
return typeof obj.getAllThreads === 'function';
|
||||
return obj && typeof obj.getAllThreads === 'function';
|
||||
}
|
||||
|
||||
function isDeemphasized(frame: IStackFrame): boolean {
|
||||
|
@ -608,6 +608,10 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
|
|||
} else if (isDebugSession(element)) {
|
||||
const childSessions = this.debugService.getModel().getSessions().filter(s => s.parentSession === element);
|
||||
const threads: CallStackItem[] = element.getAllThreads();
|
||||
if (threads.length === 1 && childSessions.length === 0) {
|
||||
// Do not show thread when there is only one to be compact.
|
||||
return this.getThreadChildren(<Thread>threads[0]);
|
||||
}
|
||||
|
||||
return Promise.resolve(threads.concat(childSessions));
|
||||
} else {
|
||||
|
|
|
@ -35,6 +35,7 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
|
|||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { withUndefinedAsNull } from 'vs/base/common/types';
|
||||
|
||||
const jsonRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
|
||||
jsonRegistry.registerSchema(launchSchemaId, launchSchema);
|
||||
|
@ -577,7 +578,7 @@ class Launch extends AbstractLaunch implements ILaunch {
|
|||
pinned: created,
|
||||
revealIfVisible: true
|
||||
},
|
||||
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(editor => ({ editor, created })));
|
||||
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(editor => ({ editor: withUndefinedAsNull(editor), created })));
|
||||
}, (error: Error) => {
|
||||
throw new Error(nls.localize('DebugConfig.failed', "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).", error.message));
|
||||
});
|
||||
|
@ -613,7 +614,7 @@ class WorkspaceLaunch extends AbstractLaunch implements ILaunch {
|
|||
return this.editorService.openEditor({
|
||||
resource: this.contextService.getWorkspace().configuration!,
|
||||
options: { preserveFocus }
|
||||
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(editor => ({ editor, created: false }));
|
||||
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(editor => ({ editor: withUndefinedAsNull(editor), created: false }));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -647,6 +648,6 @@ class UserLaunch extends AbstractLaunch implements ILaunch {
|
|||
}
|
||||
|
||||
openConfigFile(sideBySide: boolean, preserveFocus: boolean, type?: string): Promise<{ editor: IEditor | null, created: boolean }> {
|
||||
return this.preferencesService.openGlobalSettings(false, { preserveFocus }).then(editor => ({ editor, created: false }));
|
||||
return this.preferencesService.openGlobalSettings(false, { preserveFocus }).then(editor => ({ editor: withUndefinedAsNull(editor), created: false }));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,19 +35,23 @@ class ToggleBreakpointAction extends EditorAction {
|
|||
}
|
||||
|
||||
public run(accessor: ServicesAccessor, editor: ICodeEditor): Promise<any> {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
|
||||
const position = editor.getPosition();
|
||||
if (editor.hasModel() && position) {
|
||||
if (editor.hasModel()) {
|
||||
const debugService = accessor.get(IDebugService);
|
||||
const modelUri = editor.getModel().uri;
|
||||
const bps = debugService.getModel().getBreakpoints({ lineNumber: position.lineNumber, uri: modelUri });
|
||||
const canSet = debugService.getConfigurationManager().canSetBreakpointsIn(editor.getModel());
|
||||
// Does not account for multi line selections, Set to remove multiple cursor on the same line
|
||||
const lineNumbers = [...new Set(editor.getSelections().map(s => s.getPosition().lineNumber))];
|
||||
|
||||
if (bps.length) {
|
||||
return Promise.all(bps.map(bp => debugService.removeBreakpoints(bp.getId())));
|
||||
}
|
||||
if (debugService.getConfigurationManager().canSetBreakpointsIn(editor.getModel())) {
|
||||
return debugService.addBreakpoints(modelUri, [{ lineNumber: position.lineNumber }], 'debugEditorActions.toggleBreakpointAction');
|
||||
}
|
||||
return Promise.all(lineNumbers.map(line => {
|
||||
const bps = debugService.getModel().getBreakpoints({ lineNumber: line, uri: modelUri });
|
||||
if (bps.length) {
|
||||
return Promise.all(bps.map(bp => debugService.removeBreakpoints(bp.getId())));
|
||||
} else if (canSet) {
|
||||
return (debugService.addBreakpoints(modelUri, [{ lineNumber: line }], 'debugEditorActions.toggleBreakpointAction'));
|
||||
} else {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
|
|
|
@ -17,7 +17,7 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
|||
|
||||
constructor(
|
||||
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
|
||||
//@IWindowService windowService: IWindowService,
|
||||
// @IWindowService windowService: IWindowService, // TODO@weinand TODO@isidorn cyclic dependency?
|
||||
@IEnvironmentService environmentService: IEnvironmentService
|
||||
) {
|
||||
const connection = remoteAgentService.getConnection();
|
||||
|
@ -30,13 +30,11 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
|||
|
||||
this._register(this.onReload(event => {
|
||||
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
|
||||
//windowService.reloadWindow();
|
||||
window.location.reload();
|
||||
}
|
||||
}));
|
||||
this._register(this.onClose(event => {
|
||||
if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
|
||||
//this._windowService.closeWindow();
|
||||
window.close();
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -16,6 +16,7 @@ import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
|||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { env as processEnv } from 'vs/base/common/process';
|
||||
|
||||
/**
|
||||
* This interface represents a single command line argument split into a "prefix" and a "path" half.
|
||||
|
@ -594,10 +595,7 @@ export class RawDebugSession {
|
|||
let env: IProcessEnvironment = {};
|
||||
if (vscodeArgs.env) {
|
||||
// merge environment variables into a copy of the process.env
|
||||
if (typeof process === 'object' && process.env) {
|
||||
env = objects.mixin(env, process.env);
|
||||
}
|
||||
env = objects.mixin(env, vscodeArgs.env);
|
||||
env = objects.mixin(processEnv, vscodeArgs.env);
|
||||
// and delete some if necessary
|
||||
Object.keys(env).filter(k => env[k] === null).forEach(key => delete env[key]);
|
||||
}
|
||||
|
|
|
@ -227,14 +227,14 @@ export class Expression extends ExpressionContainer implements IExpression {
|
|||
const response = await session.evaluate(this.name, stackFrame ? stackFrame.frameId : undefined, context);
|
||||
this.available = !!(response && response.body);
|
||||
if (response && response.body) {
|
||||
this.value = response.body.result;
|
||||
this.value = response.body.result || '';
|
||||
this.reference = response.body.variablesReference;
|
||||
this.namedVariables = response.body.namedVariables;
|
||||
this.indexedVariables = response.body.indexedVariables;
|
||||
this.type = response.body.type || this.type;
|
||||
}
|
||||
} catch (e) {
|
||||
this.value = e.message;
|
||||
this.value = e.message || '';
|
||||
this.available = false;
|
||||
this.reference = 0;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ export class Variable extends ExpressionContainer implements IExpression {
|
|||
reference: number | undefined,
|
||||
public name: string,
|
||||
public evaluateName: string | undefined,
|
||||
value: string,
|
||||
value: string | undefined,
|
||||
namedVariables: number | undefined,
|
||||
indexedVariables: number | undefined,
|
||||
public presentationHint: DebugProtocol.VariablePresentationHint | undefined,
|
||||
|
@ -265,7 +265,7 @@ export class Variable extends ExpressionContainer implements IExpression {
|
|||
startOfVariables = 0
|
||||
) {
|
||||
super(session, reference, `variable:${parent.getId()}:${name}`, namedVariables, indexedVariables, startOfVariables);
|
||||
this.value = value;
|
||||
this.value = value || '';
|
||||
}
|
||||
|
||||
async setVariable(value: string): Promise<any> {
|
||||
|
@ -276,7 +276,7 @@ export class Variable extends ExpressionContainer implements IExpression {
|
|||
try {
|
||||
const response = await this.session.setVariable((<ExpressionContainer>this.parent).reference, this.name, value);
|
||||
if (response && response.body) {
|
||||
this.value = response.body.value;
|
||||
this.value = response.body.value || '';
|
||||
this.type = response.body.type || this.type;
|
||||
this.reference = response.body.variablesReference;
|
||||
this.namedVariables = response.body.namedVariables;
|
||||
|
|
|
@ -13,6 +13,7 @@ import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/
|
|||
import { Schemas } from 'vs/base/common/network';
|
||||
import { isUri } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||
import { ITextEditor } from 'vs/workbench/common/editor';
|
||||
import { withUndefinedAsNull } from 'vs/base/common/types';
|
||||
|
||||
export const UNKNOWN_SOURCE_LABEL = nls.localize('unknownSource', "Unknown Source");
|
||||
|
||||
|
@ -104,7 +105,7 @@ export class Source {
|
|||
revealInCenterIfOutsideViewport: true,
|
||||
pinned: pinned || (!preserveFocus && !this.inMemory)
|
||||
}
|
||||
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP);
|
||||
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(withUndefinedAsNull);
|
||||
}
|
||||
|
||||
static getEncodedDebugData(modelUri: uri): { name: string, path: string, sessionId?: string, sourceReference?: number } {
|
||||
|
|
|
@ -53,6 +53,7 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work
|
|||
import { IWebviewService, Webview } from 'vs/workbench/contrib/webview/common/webview';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { platform } from 'vs/base/common/process';
|
||||
|
||||
function removeEmbeddedSVGs(documentContent: string): string {
|
||||
const newDocument = new DOMParser().parseFromString(documentContent, 'text/html');
|
||||
|
@ -1275,7 +1276,7 @@ export class ExtensionEditor extends BaseEditor {
|
|||
private resolveKeybinding(rawKeyBinding: IKeyBinding): ResolvedKeybinding | null {
|
||||
let key: string | undefined;
|
||||
|
||||
switch (process.platform) {
|
||||
switch (platform) {
|
||||
case 'win32': key = rawKeyBinding.win; break;
|
||||
case 'linux': key = rawKeyBinding.linux; break;
|
||||
case 'darwin': key = rawKeyBinding.mac; break;
|
||||
|
|
1159
src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/browser/extensionTipsService';
|
||||
|
||||
// Singletons
|
||||
registerSingleton(IExtensionTipsService, ExtensionTipsService);
|
|
@ -7,9 +7,7 @@ import { localize } from 'vs/nls';
|
|||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
|
@ -23,6 +21,8 @@ import { RuntimeExtensionsInput } from 'vs/workbench/contrib/extensions/electron
|
|||
import { URI } from 'vs/base/common/uri';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ExtensionsAutoProfiler } from 'vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler';
|
||||
import { IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
|
||||
// Singletons
|
||||
registerSingleton(IExtensionTipsService, ExtensionTipsService);
|
||||
|
@ -134,4 +134,4 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
|||
},
|
||||
group: 'navigation',
|
||||
when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID))
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ import {
|
|||
import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/browser/extensionTipsService';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier
|
||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/browser/extensionTipsService';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer, IExtensionTipsService, ExtensionRecommendationReason } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/browser/extensionTipsService';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/browser/extensionTipsService';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
|
|
|
@ -34,6 +34,7 @@ import { ViewletPanel } from 'vs/workbench/browser/parts/views/panelViewlet';
|
|||
import { KeyChord, KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress';
|
||||
import { withUndefinedAsNull } from 'vs/base/common/types';
|
||||
|
||||
export class ExplorerViewletViewsContribution extends Disposable implements IWorkbenchContribution {
|
||||
|
||||
|
@ -202,7 +203,7 @@ export class ExplorerViewlet extends ViewContainerViewlet {
|
|||
openEditorsView.setStructuralRefreshDelay(delay);
|
||||
}
|
||||
|
||||
let openedEditor: IEditor | null = null;
|
||||
let openedEditor: IEditor | undefined;
|
||||
try {
|
||||
openedEditor = await this.editorService.openEditor(editor, options, group);
|
||||
} catch (error) {
|
||||
|
@ -214,7 +215,7 @@ export class ExplorerViewlet extends ViewContainerViewlet {
|
|||
}
|
||||
}
|
||||
|
||||
return openedEditor;
|
||||
return withUndefinedAsNull(openedEditor);
|
||||
});
|
||||
|
||||
const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IEditorService, delegatingEditorService]));
|
||||
|
|
|
@ -471,7 +471,7 @@ export class GlobalCompareResourcesAction extends Action {
|
|||
override: this.editorService.openEditor({
|
||||
leftResource: activeResource,
|
||||
rightResource: resource
|
||||
}).then(() => null)
|
||||
}).then(() => undefined)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
|||
import { IWorkbenchIssueService } from 'vs/workbench/contrib/issue/electron-browser/issue';
|
||||
import { WorkbenchIssueService } from 'vs/workbench/contrib/issue/electron-browser/issueService';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { IIssueService } from 'vs/platform/issue/common/issue';
|
||||
import { IIssueService } from 'vs/platform/issue/node/issue';
|
||||
|
||||
const helpCategory = { value: nls.localize('help', "Help"), original: 'Help' };
|
||||
const workbenchActionsRegistry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IssueReporterData } from 'vs/platform/issue/common/issue';
|
||||
import { IssueReporterData } from 'vs/platform/issue/node/issue';
|
||||
|
||||
export const IWorkbenchIssueService = createDecorator<IWorkbenchIssueService>('workbenchIssueService');
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import * as nls from 'vs/nls';
|
||||
import { IssueType } from 'vs/platform/issue/common/issue';
|
||||
import { IssueType } from 'vs/platform/issue/node/issue';
|
||||
import { IWorkbenchIssueService } from 'vs/workbench/contrib/issue/electron-browser/issue';
|
||||
|
||||
export class OpenProcessExplorer extends Action {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IssueReporterStyles, IIssueService, IssueReporterData, ProcessExplorerData, IssueReporterExtensionData } from 'vs/platform/issue/common/issue';
|
||||
import { IssueReporterStyles, IIssueService, IssueReporterData, ProcessExplorerData, IssueReporterExtensionData } from 'vs/platform/issue/node/issue';
|
||||
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { textLinkForeground, inputBackground, inputBorder, inputForeground, buttonBackground, buttonHoverBackground, buttonForeground, inputValidationErrorBorder, foreground, inputActiveOptionBorder, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, editorBackground, editorForeground, listHoverBackground, listHoverForeground, listHighlightForeground, textLinkActiveForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
|
|
@ -158,9 +158,9 @@ export class KeyboardLayoutPickerAction extends Action {
|
|||
|
||||
await this.fileService.resolve(file).then(undefined, (error) => {
|
||||
return this.fileService.createFile(file, VSBuffer.fromString(KeyboardLayoutPickerAction.DEFAULT_CONTENT));
|
||||
}).then((stat): Promise<IEditor | null> | null => {
|
||||
}).then((stat): Promise<IEditor | undefined> | undefined => {
|
||||
if (!stat) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
return this.editorService.openEditor({
|
||||
resource: stat.resource,
|
||||
|
|
|
@ -225,7 +225,7 @@ export class OpenFolderSettingsAction extends Action {
|
|||
return this.preferencesService.openFolderSettings(workspaceFolder.uri);
|
||||
}
|
||||
|
||||
return null;
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import { nullRange } from 'vs/workbench/services/preferences/common/preferencesM
|
|||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IStringDictionary } from 'vs/base/common/collections';
|
||||
import { IProductService } from 'vs/platform/product/common/product';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
|
||||
export interface IEndpointDetails {
|
||||
urlBase?: string;
|
||||
|
@ -564,3 +565,5 @@ export class SettingMatches {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
registerSingleton(IPreferencesSearchService, PreferencesSearchService, true);
|
||||
|
|
|
@ -458,12 +458,12 @@ export class SettingsEditor2 extends BaseEditor {
|
|||
}
|
||||
}
|
||||
|
||||
switchToSettingsFile(): Promise<IEditor | null> {
|
||||
switchToSettingsFile(): Promise<IEditor | undefined> {
|
||||
const query = parseQuery(this.searchWidget.getValue());
|
||||
return this.openSettingsFile(query.query);
|
||||
}
|
||||
|
||||
private openSettingsFile(query?: string): Promise<IEditor | null> {
|
||||
private openSettingsFile(query?: string): Promise<IEditor | undefined> {
|
||||
const currentSettingsTarget = this.settingsTargetsWidget.settingsTarget;
|
||||
|
||||
const options: ISettingsEditorOptions = { query };
|
||||
|
|
|
@ -159,7 +159,7 @@ export class WorkspaceChangeExtHostRelauncher extends Disposable implements IWor
|
|||
constructor(
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
@IExtensionService extensionService: IExtensionService,
|
||||
@IWindowService windowSevice: IWindowService,
|
||||
@IWindowService windowService: IWindowService,
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService
|
||||
) {
|
||||
super();
|
||||
|
@ -170,7 +170,7 @@ export class WorkspaceChangeExtHostRelauncher extends Disposable implements IWor
|
|||
}
|
||||
|
||||
if (environmentService.configuration.remoteAuthority) {
|
||||
windowSevice.reloadWindow(); // TODO@aeschli, workaround
|
||||
windowService.reloadWindow(); // TODO@aeschli, workaround
|
||||
} else {
|
||||
extensionService.restartExtensionHost();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.354 13.854H7.646L6.793 13H1.5L1 12.5V2.5L1.5 2H7L7.354 2.146L8 2.793L8.646 2.146L9 2H14.5L15 2.5V12.5L14.5 13H9.207L8.354 13.854ZM2 12H7L7.354 12.146L8 12.793L8.646 12.146L9 12H14V3H9.207L8.354 3.854H7.646L6.793 3H2V12Z" fill="#C5C5C5"/>
|
||||
<path d="M8.51101 3.40405H7.53201V13.5001H8.51101V3.40405Z" fill="#C5C5C5"/>
|
||||
<path d="M6 5H3V6H6V5Z" fill="#C5C5C5"/>
|
||||
<path d="M6 7H3V8H6V7Z" fill="#C5C5C5"/>
|
||||
<path d="M6 9H3V10H6V9Z" fill="#C5C5C5"/>
|
||||
<path d="M13 5H10V6H13V5Z" fill="#C5C5C5"/>
|
||||
<path d="M13 7H10V8H13V7Z" fill="#C5C5C5"/>
|
||||
<path d="M13 9H10V10H13V9Z" fill="#C5C5C5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 696 B |
|
@ -0,0 +1,11 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.354 13.854H7.646L6.793 13H1.5L1 12.5V2.5L1.5 2H7L7.354 2.146L8 2.793L8.646 2.146L9 2H14.5L15 2.5V12.5L14.5 13H9.207L8.354 13.854ZM2 12H7L7.354 12.146L8 12.793L8.646 12.146L9 12H14V3H9.207L8.354 3.854H7.646L6.793 3H2V12Z" fill="white"/>
|
||||
<path d="M8.51101 3.40405H7.53201V13.5001H8.51101V3.40405Z" fill="white"/>
|
||||
<path d="M6 5H3V6H6V5Z" fill="white"/>
|
||||
<path d="M6 7H3V8H6V7Z" fill="white"/>
|
||||
<path d="M6 9H3V10H6V9Z" fill="white"/>
|
||||
<path d="M13 5H10V6H13V5Z" fill="white"/>
|
||||
<path d="M13 7H10V8H13V7Z" fill="white"/>
|
||||
<path d="M13 9H10V10H13V9Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 680 B |
|
@ -0,0 +1,11 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.354 13.854H7.646L6.793 13H1.5L1 12.5V2.5L1.5 2H7L7.354 2.146L8 2.793L8.646 2.146L9 2H14.5L15 2.5V12.5L14.5 13H9.207L8.354 13.854ZM2 12H7L7.354 12.146L8 12.793L8.646 12.146L9 12H14V3H9.207L8.354 3.854H7.646L6.793 3H2V12Z" fill="#424242"/>
|
||||
<path d="M8.51101 3.40405H7.53201V13.5001H8.51101V3.40405Z" fill="#424242"/>
|
||||
<path d="M6 5H3V6H6V5Z" fill="#424242"/>
|
||||
<path d="M6 7H3V8H6V7Z" fill="#424242"/>
|
||||
<path d="M6 9H3V10H6V9Z" fill="#424242"/>
|
||||
<path d="M13 5H10V6H13V5Z" fill="#424242"/>
|
||||
<path d="M13 7H10V8H13V7Z" fill="#424242"/>
|
||||
<path d="M13 9H10V10H13V9Z" fill="#424242"/>
|
||||
</svg>
|
After Width: | Height: | Size: 696 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 3.78418C14.8086 4.07129 14.5921 4.33902 14.3506 4.5874C14.109 4.83577 13.847 5.0625 13.5644 5.26757C13.569 5.33138 13.5724 5.39404 13.5747 5.45556C13.577 5.51709 13.5781 5.57975 13.5781 5.64355C13.5781 6.21777 13.5166 6.78515 13.3935 7.3457C13.2705 7.90624 13.0928 8.44856 12.8603 8.97265C12.5231 9.73372 12.1016 10.4139 11.5957 11.0132C11.0898 11.6125 10.5168 12.1195 9.87646 12.5342C9.23616 12.9489 8.53775 13.2656 7.78125 13.4844C7.02474 13.7031 6.23177 13.8125 5.40234 13.8125C4.61848 13.8125 3.854 13.7043 3.10888 13.4878C2.36377 13.2713 1.6608 12.9489 1 12.5205C1.22331 12.5478 1.45117 12.5615 1.68359 12.5615C2.33529 12.5615 2.96533 12.4567 3.57373 12.2471C4.18212 12.0374 4.74153 11.7321 5.25195 11.331C4.94661 11.3265 4.65266 11.2752 4.37011 11.1772C4.08756 11.0793 3.82893 10.9425 3.59423 10.7671C3.35953 10.5916 3.15445 10.3831 2.979 10.1416C2.80354 9.90006 2.66796 9.63346 2.57226 9.34179C2.6634 9.35546 2.75341 9.36686 2.84228 9.37597C2.93115 9.38509 3.02115 9.38964 3.1123 9.38964C3.36751 9.38964 3.61815 9.35547 3.86425 9.28711C3.52701 9.21875 3.21826 9.09798 2.93798 8.9248C2.65771 8.75162 2.41503 8.54085 2.20996 8.29248C2.00488 8.04411 1.84537 7.76383 1.73144 7.45166C1.61751 7.13948 1.56054 6.8125 1.56054 6.4707V6.43652C1.96158 6.66439 2.3968 6.78515 2.8662 6.79883C2.66568 6.66211 2.48681 6.50602 2.32959 6.33056C2.17236 6.15511 2.03906 5.96484 1.92968 5.75976C1.82031 5.55469 1.736 5.33822 1.67675 5.11035C1.61751 4.88249 1.58789 4.64779 1.58789 4.40625C1.58789 4.15104 1.61979 3.90153 1.68359 3.65772C1.74739 3.4139 1.84537 3.18262 1.97753 2.96387C2.34212 3.41504 2.74772 3.8195 3.19433 4.17725C3.64094 4.53499 4.11604 4.84147 4.61962 5.09668C5.1232 5.35189 5.65071 5.55355 6.20214 5.70166C6.75357 5.84977 7.31868 5.9375 7.89745 5.96484C7.87011 5.86003 7.85074 5.75179 7.83934 5.64014C7.82795 5.52848 7.82225 5.41797 7.82225 5.30859C7.82225 4.91211 7.89745 4.53955 8.04784 4.19092C8.19823 3.84228 8.40331 3.53809 8.66307 3.27832C8.92284 3.01855 9.22704 2.81348 9.57567 2.66309C9.92431 2.5127 10.2969 2.4375 10.6933 2.4375C11.0944 2.4375 11.4761 2.51611 11.8384 2.67334C12.2007 2.83057 12.5185 3.05501 12.792 3.34668C13.1155 3.28288 13.4289 3.19287 13.7319 3.07666C14.035 2.96045 14.3278 2.81803 14.6103 2.64941C14.5055 2.9821 14.3449 3.28516 14.1284 3.55859C13.9119 3.83203 13.6533 4.05762 13.3525 4.23535C13.9267 4.16699 14.4759 4.0166 15 3.78418Z" fill="#C8C8C8"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 3.78418C14.8086 4.07129 14.5921 4.33902 14.3506 4.5874C14.109 4.83577 13.847 5.0625 13.5644 5.26757C13.569 5.33138 13.5724 5.39404 13.5747 5.45556C13.577 5.51709 13.5781 5.57975 13.5781 5.64355C13.5781 6.21777 13.5166 6.78515 13.3935 7.3457C13.2705 7.90624 13.0928 8.44856 12.8603 8.97265C12.5231 9.73372 12.1016 10.4139 11.5957 11.0132C11.0898 11.6125 10.5168 12.1195 9.87646 12.5342C9.23616 12.9489 8.53775 13.2656 7.78125 13.4844C7.02474 13.7031 6.23177 13.8125 5.40234 13.8125C4.61848 13.8125 3.854 13.7043 3.10888 13.4878C2.36377 13.2713 1.6608 12.9489 1 12.5205C1.22331 12.5478 1.45117 12.5615 1.68359 12.5615C2.33529 12.5615 2.96533 12.4567 3.57373 12.2471C4.18212 12.0374 4.74153 11.7321 5.25195 11.331C4.94661 11.3265 4.65266 11.2752 4.37011 11.1772C4.08756 11.0793 3.82893 10.9425 3.59423 10.7671C3.35953 10.5916 3.15445 10.3831 2.979 10.1416C2.80354 9.90006 2.66796 9.63346 2.57226 9.34179C2.6634 9.35546 2.75341 9.36686 2.84228 9.37597C2.93115 9.38509 3.02115 9.38964 3.1123 9.38964C3.36751 9.38964 3.61815 9.35547 3.86425 9.28711C3.52701 9.21875 3.21826 9.09798 2.93798 8.9248C2.65771 8.75162 2.41503 8.54085 2.20996 8.29248C2.00488 8.04411 1.84537 7.76383 1.73144 7.45166C1.61751 7.13948 1.56054 6.8125 1.56054 6.4707V6.43652C1.96158 6.66439 2.3968 6.78515 2.8662 6.79883C2.66568 6.66211 2.48681 6.50602 2.32959 6.33056C2.17236 6.15511 2.03906 5.96484 1.92968 5.75976C1.82031 5.55469 1.736 5.33822 1.67675 5.11035C1.61751 4.88249 1.58789 4.64779 1.58789 4.40625C1.58789 4.15104 1.61979 3.90153 1.68359 3.65772C1.74739 3.4139 1.84537 3.18262 1.97753 2.96387C2.34212 3.41504 2.74772 3.8195 3.19433 4.17725C3.64094 4.53499 4.11604 4.84147 4.61962 5.09668C5.1232 5.35189 5.65071 5.55355 6.20214 5.70166C6.75357 5.84977 7.31868 5.9375 7.89745 5.96484C7.87011 5.86003 7.85074 5.75179 7.83934 5.64014C7.82795 5.52848 7.82225 5.41797 7.82225 5.30859C7.82225 4.91211 7.89745 4.53955 8.04784 4.19092C8.19823 3.84228 8.40331 3.53809 8.66307 3.27832C8.92284 3.01855 9.22704 2.81348 9.57567 2.66309C9.92431 2.5127 10.2969 2.4375 10.6933 2.4375C11.0944 2.4375 11.4761 2.51611 11.8384 2.67334C12.2007 2.83057 12.5185 3.05501 12.792 3.34668C13.1155 3.28288 13.4289 3.19287 13.7319 3.07666C14.035 2.96045 14.3278 2.81803 14.6103 2.64941C14.5055 2.9821 14.3449 3.28516 14.1284 3.55859C13.9119 3.83203 13.6533 4.05762 13.3525 4.23535C13.9267 4.16699 14.4759 4.0166 15 3.78418Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 3.78418C14.8086 4.07129 14.5921 4.33902 14.3506 4.5874C14.109 4.83577 13.847 5.0625 13.5644 5.26757C13.569 5.33138 13.5724 5.39404 13.5747 5.45556C13.577 5.51709 13.5781 5.57975 13.5781 5.64355C13.5781 6.21777 13.5166 6.78515 13.3935 7.3457C13.2705 7.90624 13.0928 8.44856 12.8603 8.97265C12.5231 9.73372 12.1016 10.4139 11.5957 11.0132C11.0898 11.6125 10.5168 12.1195 9.87646 12.5342C9.23616 12.9489 8.53775 13.2656 7.78125 13.4844C7.02474 13.7031 6.23177 13.8125 5.40234 13.8125C4.61848 13.8125 3.854 13.7043 3.10888 13.4878C2.36377 13.2713 1.6608 12.9489 1 12.5205C1.22331 12.5478 1.45117 12.5615 1.68359 12.5615C2.33529 12.5615 2.96533 12.4567 3.57373 12.2471C4.18212 12.0374 4.74153 11.7321 5.25195 11.331C4.94661 11.3265 4.65266 11.2752 4.37011 11.1772C4.08756 11.0793 3.82893 10.9425 3.59423 10.7671C3.35953 10.5916 3.15445 10.3831 2.979 10.1416C2.80354 9.90006 2.66796 9.63346 2.57226 9.34179C2.6634 9.35546 2.75341 9.36686 2.84228 9.37597C2.93115 9.38509 3.02115 9.38964 3.1123 9.38964C3.36751 9.38964 3.61815 9.35547 3.86425 9.28711C3.52701 9.21875 3.21826 9.09798 2.93798 8.9248C2.65771 8.75162 2.41503 8.54085 2.20996 8.29248C2.00488 8.04411 1.84537 7.76383 1.73144 7.45166C1.61751 7.13948 1.56054 6.8125 1.56054 6.4707V6.43652C1.96158 6.66439 2.3968 6.78515 2.8662 6.79883C2.66568 6.66211 2.48681 6.50602 2.32959 6.33056C2.17236 6.15511 2.03906 5.96484 1.92968 5.75976C1.82031 5.55469 1.736 5.33822 1.67675 5.11035C1.61751 4.88249 1.58789 4.64779 1.58789 4.40625C1.58789 4.15104 1.61979 3.90153 1.68359 3.65772C1.74739 3.4139 1.84537 3.18262 1.97753 2.96387C2.34212 3.41504 2.74772 3.8195 3.19433 4.17725C3.64094 4.53499 4.11604 4.84147 4.61962 5.09668C5.1232 5.35189 5.65071 5.55355 6.20214 5.70166C6.75357 5.84977 7.31868 5.9375 7.89745 5.96484C7.87011 5.86003 7.85074 5.75179 7.83934 5.64014C7.82795 5.52848 7.82225 5.41797 7.82225 5.30859C7.82225 4.91211 7.89745 4.53955 8.04784 4.19092C8.19823 3.84228 8.40331 3.53809 8.66307 3.27832C8.92284 3.01855 9.22704 2.81348 9.57567 2.66309C9.92431 2.5127 10.2969 2.4375 10.6933 2.4375C11.0944 2.4375 11.4761 2.51611 11.8384 2.67334C12.2007 2.83057 12.5185 3.05501 12.792 3.34668C13.1155 3.28288 13.4289 3.19287 13.7319 3.07666C14.035 2.96045 14.3278 2.81803 14.6103 2.64941C14.5055 2.9821 14.3449 3.28516 14.1284 3.55859C13.9119 3.83203 13.6533 4.05762 13.3525 4.23535C13.9267 4.16699 14.4759 4.0166 15 3.78418Z" fill="#424242"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.59454 6.25211L8 1L6.40546 6.25211H1L5.37311 9.65247L3.7496 15L8 11.695L12.2504 15L10.6269 9.65247L15 6.25211H9.59454ZM2.34804 6.72168H6.72044L8 2.50706L8.00002 2.50708L6.72046 6.7217H2.34805L2.34804 6.72168ZM5.88539 9.4722L4.57848 13.7769L4.57851 13.7769L5.8854 9.47221L5.88539 9.4722ZM13.6519 6.7217L13.652 6.72168H9.27956L9.27958 6.7217H13.6519ZM4.90113 7.6229H7.26847L8.00002 5.21332L8.73156 7.6229H11.0989L9.18369 9.1121L9.91523 11.5217L8.00002 10.0325L6.0848 11.5217L6.81635 9.1121L4.90113 7.6229Z" fill="#C5C5C5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 678 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.59454 6.25211L8 1L6.40546 6.25211H1L5.37311 9.65247L3.7496 15L8 11.695L12.2504 15L10.6269 9.65247L15 6.25211H9.59454ZM2.34804 6.72168H6.72044L8 2.50706L8.00002 2.50708L6.72046 6.7217H2.34805L2.34804 6.72168ZM5.88539 9.4722L4.57848 13.7769L4.57851 13.7769L5.8854 9.47221L5.88539 9.4722ZM13.6519 6.7217L13.652 6.72168H9.27956L9.27958 6.7217H13.6519ZM4.90113 7.6229H7.26847L8.00002 5.21332L8.73156 7.6229H11.0989L9.18369 9.1121L9.91523 11.5217L8.00002 10.0325L6.0848 11.5217L6.81635 9.1121L4.90113 7.6229Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 676 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.59454 6.25211L8 1L6.40546 6.25211H1L5.37311 9.65247L3.7496 15L8 11.695L12.2504 15L10.6269 9.65247L15 6.25211H9.59454ZM2.34804 6.72168H6.72044L8 2.50706L8.00002 2.50708L6.72046 6.7217H2.34805L2.34804 6.72168ZM5.88539 9.4722L4.57848 13.7769L4.57851 13.7769L5.8854 9.47221L5.88539 9.4722ZM13.6519 6.7217L13.652 6.72168H9.27956L9.27958 6.7217H13.6519ZM4.90113 7.6229H7.26847L8.00002 5.21332L8.73156 7.6229H11.0989L9.18369 9.1121L9.91523 11.5217L8.00002 10.0325L6.0848 11.5217L6.81635 9.1121L4.90113 7.6229Z" fill="#424242"/>
|
||||
</svg>
|
After Width: | Height: | Size: 678 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.5 2H1.5L1 2.5V11.5L1.5 12H4V14.5L4.854 14.854L7.707 12H14.5L15 11.5V2.5L14.5 2ZM14 11H7.5L7.146 11.146L5 13.293V11.5L4.5 11H2V3H14V11Z" fill="#C5C5C5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 271 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.5 2H1.5L1 2.5V11.5L1.5 12H4V14.5L4.854 14.854L7.707 12H14.5L15 11.5V2.5L14.5 2ZM14 11H7.5L7.146 11.146L5 13.293V11.5L4.5 11H2V3H14V11Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 269 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.5 2H1.5L1 2.5V11.5L1.5 12H4V14.5L4.854 14.854L7.707 12H14.5L15 11.5V2.5L14.5 2ZM14 11H7.5L7.146 11.146L5 13.293V11.5L4.5 11H2V3H14V11Z" fill="#424242"/>
|
||||
</svg>
|
After Width: | Height: | Size: 271 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 7.5C13 10.5376 10.5376 13 7.5 13C4.46243 13 2 10.5376 2 7.5C2 4.46243 4.46243 2 7.5 2C10.5376 2 13 4.46243 13 7.5ZM14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5ZM7 9V4H8V9H7ZM7 10V11H8V10H7Z" fill="#C5C5C5"/>
|
||||
</svg>
|
After Width: | Height: | Size: 438 B |
|
@ -0,0 +1,4 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 7.5C13 10.5376 10.5376 13 7.5 13C4.46243 13 2 10.5376 2 7.5C2 4.46243 4.46243 2 7.5 2C10.5376 2 13 4.46243 13 7.5ZM14 7.5C14 11.0899 11.0899 14 7.5 14C3.91015 14 1 11.0899 1 7.5C1 3.91015 3.91015 1 7.5 1C11.0899 1 14 3.91015 14 7.5ZM7 9V4H8V9H7ZM7 10V11H8V10H7Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 436 B |