VSCode merge (#4610)

* Merge from vscode e388c734f30757875976c7e326d6cfeee77710de

* fix yarn lcoks

* remove small issue
This commit is contained in:
Anthony Dresser
2019-03-20 10:39:09 -07:00
committed by GitHub
parent 87765e8673
commit c814b92557
310 changed files with 6606 additions and 2129 deletions

3
.gitattributes vendored
View File

@@ -6,4 +6,5 @@ ThirdPartyNotices.txt eol=crlf
*.bat eol=crlf
*.cmd eol=crlf
*.ps1 eol=lf
*.sh eol=lf
*.sh eol=lf
*.rtf -text

2
.nvmrc
View File

@@ -1 +1 @@
8
10

9
.vscode/launch.json vendored
View File

@@ -211,6 +211,13 @@
"Launch azuredatastudio",
"Attach to Extension Host"
]
}
},
{
"name": "Debug Unit Tests",
"configurations": [
"Attach to VS Code",
"Run Unit Tests"
]
},
]
}

19
.vscode/tasks.json vendored
View File

@@ -28,23 +28,6 @@
}
}
},
{
"type": "npm",
"script": "strict-null-check-watch",
"label": "TS - Strict Null Checks",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"problemMatcher": {
"base": "$tsc-watch",
"owner": "typescript-strict-null",
"applyTo": "allDocuments"
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"type": "gulp",
"task": "tslint",
@@ -86,4 +69,4 @@
"problemMatcher": []
}
]
}
}

View File

@@ -2,24 +2,25 @@ steps:
- task: NodeTool@0
inputs:
versionSpec: "10.15.1"
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: '$(ArtifactFeed)'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
# inputs:
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
# vstsFeed: '$(ArtifactFeed)'
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
- script: |
yarn
displayName: Install Dependencies
condition: ne(variables['CacheRestored'], 'true')
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: '$(ArtifactFeed)'
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
# inputs:
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
# vstsFeed: '$(ArtifactFeed)'
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
- script: |
yarn gulp electron-x64
displayName: Download Electron
@@ -29,9 +30,6 @@ steps:
- script: |
yarn monaco-compile-check
displayName: Run Monaco Editor Checks
- script: |
yarn strict-null-check
displayName: Run Strict Null Checks
- script: |
yarn compile
displayName: Compile Sources
@@ -49,4 +47,4 @@ steps:
inputs:
testResultsFiles: '*-results.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
condition: succeededOrFailed()
condition: succeededOrFailed()

View File

@@ -9,12 +9,19 @@ steps:
- script: |
set -e
echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc
cat << EOF > ~/.netrc
machine monacotools.visualstudio.com
password $(VSO_PAT)
machine github.com
login vscode
password $(VSCODE_MIXIN_PASSWORD)
EOF
yarn
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
yarn gulp -- hygiene
yarn monaco-compile-check
yarn strict-null-check
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
node build/azure-pipelines/common/installDistro.js
node build/lib/builtInExtensions.js
displayName: Prepare build

View File

@@ -10,24 +10,25 @@ steps:
- task: NodeTool@0
inputs:
versionSpec: "10.15.1"
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: '$(ArtifactFeed)'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.10.1"
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
# inputs:
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
# vstsFeed: '$(ArtifactFeed)'
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
- script: |
yarn
displayName: Install Dependencies
condition: ne(variables['CacheRestored'], 'true')
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: '$(ArtifactFeed)'
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
# inputs:
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
# vstsFeed: '$(ArtifactFeed)'
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
- script: |
yarn gulp electron-x64
displayName: Download Electron
@@ -37,9 +38,6 @@ steps:
- script: |
yarn monaco-compile-check
displayName: Run Monaco Editor Checks
- script: |
yarn strict-null-check
displayName: Run Strict Null Checks
- script: |
yarn compile
displayName: Compile Sources
@@ -54,4 +52,4 @@ steps:
inputs:
testResultsFiles: '*-results.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
condition: succeededOrFailed()
condition: succeededOrFailed()

View File

@@ -14,12 +14,18 @@ steps:
export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
fi
echo "machine monacotools.visualstudio.com password $(VSO_PAT)" > ~/.netrc
cat << EOF > ~/.netrc
machine monacotools.visualstudio.com
password $(VSO_PAT)
machine github.com
login vscode
password $(VSCODE_MIXIN_PASSWORD)
EOF
CHILD_CONCURRENCY=1 yarn
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
npm run gulp -- hygiene
npm run monaco-compile-check
npm run strict-null-check
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
node build/azure-pipelines/common/installDistro.js
node build/lib/builtInExtensions.js

View File

@@ -9,21 +9,22 @@ steps:
inputs:
versionSpec: '2.x'
addToPath: true
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: '$(ArtifactFeed)'
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
# inputs:
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
# vstsFeed: '$(ArtifactFeed)'
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
- powershell: |
yarn
displayName: Install Dependencies
condition: ne(variables['CacheRestored'], 'true')
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: '$(ArtifactFeed)'
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
# inputs:
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
# vstsFeed: '$(ArtifactFeed)'
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
- powershell: |
yarn gulp electron
displayName: Download Electron
@@ -33,9 +34,6 @@ steps:
- powershell: |
yarn monaco-compile-check
displayName: Run Monaco Editor Checks
- script: |
yarn strict-null-check
displayName: Run Strict Null Checks
- powershell: |
yarn compile
displayName: Compile Sources

View File

@@ -15,15 +15,14 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
"machine monacotools.visualstudio.com password $(VSO_PAT)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
"machine monacotools.visualstudio.com`npassword $(VSO_PAT)`nmachine github.com`nlogin vscode`npassword $(VSCODE_MIXIN_PASSWORD)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
$env:npm_config_arch="$(VSCODE_ARCH)"
$env:CHILD_CONCURRENCY="1"
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
exec { yarn }
exec { npm run gulp -- mixin }
exec { npm run gulp -- hygiene }
exec { npm run monaco-compile-check }
exec { npm run strict-null-check }
exec { npm run gulp -- mixin }
exec { node build/azure-pipelines/common/installDistro.js }
exec { node build/lib/builtInExtensions.js }

View File

@@ -42,7 +42,8 @@ const indentationFilter = [
// except specific files
'!ThirdPartyNotices.txt',
'!LICENSE.txt',
'!LICENSE.{txt,rtf}',
'!LICENSES.chromium.html',
'!**/LICENSE',
'!src/vs/nls.js',
'!src/vs/nls.build.js',

View File

@@ -10,15 +10,15 @@ const json = require('gulp-json-editor');
const buffer = require('gulp-buffer');
const filter = require('gulp-filter');
const es = require('event-stream');
const util = require('./lib/util');
const remote = require('gulp-remote-src');
const zip = require('gulp-vinyl-zip');
const vfs = require('vinyl-fs');
const pkg = require('../package.json');
const cp = require('child_process');
const fancyLog = require('fancy-log');
const ansiColors = require('ansi-colors');
// {{SQL CARBON EDIT}}
const jeditor = require('gulp-json-editor');
const pkg = require('../package.json');
gulp.task('mixin', function () {
// {{SQL CARBON EDIT}}
const updateUrl = process.env['SQLOPS_UPDATEURL'];

View File

@@ -321,7 +321,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const productJsonStream = gulp.src(['product.json'], { base: '.' })
.pipe(json(productJsonUpdate));
const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.', allowEmpty: true });
const license = gulp.src(['LICENSES.chromium.html', product.licenseFileName, 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.', allowEmpty: true });
// TODO the API should be copied to `out` during compile, not here
const api = gulp.src('src/vs/vscode.d.ts').pipe(rename('out/vs/vscode.d.ts'));

View File

@@ -42,6 +42,10 @@
"name": "vs/workbench/contrib/codeinset",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/callHierarchy",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/comments",
"project": "vscode-workbench"
@@ -218,6 +222,10 @@
"name": "vs/workbench/services/files",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/files2",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/integrity",
"project": "vscode-workbench"

View File

@@ -17,8 +17,17 @@ function yarnInstall(location, opts) {
opts.cwd = location;
opts.stdio = 'inherit';
const raw = process.env['npm_config_argv'] || '{}';
const argv = JSON.parse(raw);
const original = argv.original || [];
const args = ['install'];
if (original.indexOf('--ignore-optional') > -1) {
args.push('--ignore-optional');
}
console.log('Installing dependencies in \'%s\'.', location);
const result = cp.spawnSync(yarn, ['install'], opts);
const result = cp.spawnSync(yarn, args, opts);
if (result.error || result.status !== 0) {
process.exit(1);

File diff suppressed because it is too large Load Diff

View File

@@ -22,8 +22,6 @@
"update-localization-extension": "node build/npm/update-localization-extension.js",
"smoketest": "cd test/smoke && node test/index.js",
"monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit",
"download-builtin-extensions": "node build/lib/builtInExtensions.js",
"check-monaco-editor-compilation": "tsc -p src/tsconfig.monaco.json --noEmit",
"tslint": "node node_modules/tslint/bin/tslint -c tslint-gci.json -p src/tsconfig.json",
"strict-null-check": "tsc -p src/tsconfig.strictNullChecks.json",
"strict-null-check-watch": "tsc -p src/tsconfig.strictNullChecks.json --watch"

View File

@@ -17,6 +17,7 @@
"win32ShellNameShort": "Azure Data Studio",
"darwinBundleIdentifier": "com.azuredatastudio.oss",
"linuxIconName": "com.azuredatastudio.oss",
"licenseFileName": "LICENSE.txt",
"reportIssueUrl": "https://github.com/Microsoft/azuredatastudio/issues/new?labels=customer%20reported%20issue",
"requestFeatureUrl": "https://github.com/Microsoft/azuredatastudio/issues/new?labels=feature-request",
"privacyStatementUrl": "https://privacy.microsoft.com/en-us/privacystatement",

View File

@@ -5,10 +5,10 @@
'use strict';
import { ExtHostModelViewTreeViewsShape, SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IModelViewTreeViewDataProvider, ITreeComponentItem } from 'sql/workbench/common/views';
import { INotificationService } from 'vs/platform/notification/common/notification';
import * as vsTreeView from 'vs/workbench/api/electron-browser/mainThreadTreeViews';
import * as vsTreeView from 'vs/workbench/api/browser/mainThreadTreeViews';
export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implements IModelViewTreeViewDataProvider {
constructor(handle: number, treeViewId: string,

View File

@@ -4,9 +4,9 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { SqlMainContext, MainThreadDashboardShape, ExtHostDashboardShape, SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IDashboardService } from 'sql/platform/dashboard/browser/dashboardService';
@extHostNamedCustomer(SqlMainContext.MainThreadDashboard)

View File

@@ -8,8 +8,8 @@ import 'vs/css!sql/media/icons/common-icons';
import { WebViewDialog } from 'sql/workbench/parts/webview/electron-browser/webViewDialog';
import { MainThreadModalDialogShape, SqlMainContext, SqlExtHostContext, ExtHostModalDialogsShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
@extHostNamedCustomer(SqlMainContext.MainThreadModalDialog)

View File

@@ -3,10 +3,10 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { TaskRegistry, ITaskHandlerDescription } from 'sql/platform/tasks/common/tasks';
import { IDisposable } from 'vs/base/common/lifecycle';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import {
ExtHostAccountManagementShape,

View File

@@ -13,7 +13,7 @@ import {
SqlMainContext,
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { AzureResource } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
@@ -167,5 +167,3 @@ interface AccountProviderWithMetadata {
metadata: azdata.AccountProviderMetadata;
provider: azdata.AccountProvider;
}

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostBackgroundTaskManagementShape, SqlMainContext, MainThreadBackgroundTaskManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
@@ -110,4 +110,4 @@ export class ExtHostBackgroundTaskManagement implements ExtHostBackgroundTaskMan
this._handlers.delete(operationId);
}
}
}
}

View File

@@ -5,7 +5,7 @@
'use strict';
import { ExtHostConnectionManagementShape, SqlMainContext, MainThreadConnectionManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { generateUuid } from 'vs/base/common/uuid';
import * as azdata from 'azdata';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { SqlMainContext, MainThreadCredentialManagementShape, ExtHostCredentialManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as vscode from 'vscode';
import * as azdata from 'azdata';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
import * as azdata from 'azdata';

View File

@@ -6,7 +6,7 @@
import { SqlMainContext, ExtHostDashboardWebviewsShape, MainThreadDashboardWebviewShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Emitter } from 'vs/base/common/event';
import { deepClone } from 'vs/base/common/objects';

View File

@@ -7,7 +7,7 @@
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { Event, Emitter } from 'vs/base/common/event';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
import { SqlMainContext, MainThreadDataProtocolShape, ExtHostDataProtocolShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { DataProviderType } from 'sql/workbench/api/common/sqlExtHostTypes';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostExtensionManagementShape, MainThreadExtensionManagementShape, SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';

View File

@@ -5,7 +5,7 @@
'use strict';
import { SqlMainContext, MainThreadModalDialogShape, ExtHostModalDialogsShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { Emitter } from 'vs/base/common/event';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Emitter } from 'vs/base/common/event';
import { deepClone } from 'vs/base/common/objects';
import { URI } from 'vs/base/common/uri';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
import { deepClone } from 'vs/base/common/objects';
import * as nls from 'vs/nls';

View File

@@ -9,7 +9,7 @@ import * as vscode from 'vscode';
import { SqlMainContext, ExtHostModelViewTreeViewsShape, MainThreadModelViewShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { ITreeComponentItem } from 'sql/workbench/common/views';
import { CommandsConverter } from 'vs/workbench/api/node/extHostCommands';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as azdata from 'azdata';
import * as vsTreeExt from 'vs/workbench/api/node/extHostTreeViews';
import { Emitter } from 'vs/base/common/event';

View File

@@ -7,7 +7,7 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
import { localize } from 'vs/nls';
import { URI, UriComponents } from 'vs/base/common/uri';

View File

@@ -12,7 +12,7 @@ import { dispose } from 'vs/base/common/lifecycle';
import { URI, UriComponents } from 'vs/base/common/uri';
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
import * as typeConverters from 'vs/workbench/api/node/extHostTypeConverters';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ok } from 'vs/base/common/assert';
import {

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostObjectExplorerShape, SqlMainContext, MainThreadObjectExplorerShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostQueryEditorShape, SqlMainContext, MainThreadQueryEditorShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';

View File

@@ -6,7 +6,7 @@
'use strict';
import * as azdata from 'azdata';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable } from 'vs/workbench/api/node/extHostTypes';
import {
ExtHostResourceProviderShape,
@@ -88,5 +88,3 @@ interface ResourceProviderWithMetadata {
metadata: azdata.ResourceProviderMetadata;
provider: azdata.ResourceProvider;
}

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { SqlMainContext, MainThreadSerializationProviderShape, ExtHostSerializationProviderShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as vscode from 'vscode';
import * as azdata from 'azdata';

View File

@@ -6,7 +6,7 @@
import { validateConstraint } from 'vs/base/common/types';
import { ILogService } from 'vs/platform/log/common/log';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import * as extHostTypes from 'vs/workbench/api/node/extHostTypes';
import * as azdata from 'azdata';

View File

@@ -13,8 +13,8 @@ import {
SqlExtHostContext,
SqlMainContext
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { UpdateAccountListEventParams } from 'sql/platform/accountManagement/common/eventTypes';
@extHostNamedCustomer(SqlMainContext.MainThreadAccountManagement)

View File

@@ -7,8 +7,8 @@
import { ITaskService } from 'sql/platform/taskHistory/common/taskService';
import { MainThreadBackgroundTaskManagementShape, SqlMainContext, ExtHostBackgroundTaskManagementShape, SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';

View File

@@ -6,8 +6,8 @@
import { SqlExtHostContext, SqlMainContext, ExtHostConnectionManagementShape, MainThreadConnectionManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as azdata from 'azdata';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';

View File

@@ -11,8 +11,8 @@ import {
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { ICredentialsService } from 'sql/platform/credentials/common/credentialsService';
import * as azdata from 'azdata';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
@extHostNamedCustomer(SqlMainContext.MainThreadCredentialManagement)
export class MainThreadCredentialManagement implements MainThreadCredentialManagementShape {

View File

@@ -5,8 +5,8 @@
'use strict';
import { MainThreadDashboardWebviewShape, SqlMainContext, ExtHostDashboardWebviewsShape, SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IDashboardViewService, IDashboardWebview } from 'sql/platform/dashboard/common/dashboardViewService';
@extHostNamedCustomer(SqlMainContext.MainThreadDashboardWebview)

View File

@@ -24,9 +24,9 @@ import { ITaskService } from 'sql/platform/taskHistory/common/taskService';
import { IProfilerService } from 'sql/workbench/services/profiler/common/interfaces';
import { ISerializationService } from 'sql/platform/serialization/common/serializationService';
import { IFileBrowserService } from 'sql/platform/fileBrowser/common/interfaces';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IDacFxService } from 'sql/platform/dacfx/common/dacFxService';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
/**
* Main thread class for handling data protocol management registration.

View File

@@ -5,8 +5,8 @@
'use strict';
import { SqlMainContext, MainThreadExtensionManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
import { IExtensionManagementService, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement';
import { URI } from 'vs/base/common/uri';

View File

@@ -5,8 +5,8 @@
'use strict';
import { MainThreadModelViewShape, SqlMainContext, ExtHostModelViewShape, SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable } from 'vs/base/common/lifecycle';

View File

@@ -5,8 +5,8 @@
'use strict';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { MainThreadModelViewDialogShape, SqlMainContext, ExtHostModelViewDialogShape, SqlExtHostContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
@@ -293,4 +293,4 @@ export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape
private validateDialogClose(handle: number): Thenable<boolean> {
return this._proxy.$validateDialogClose(handle);
}
}
}

View File

@@ -6,9 +6,9 @@
import * as azdata from 'azdata';
import { SqlExtHostContext, SqlMainContext, ExtHostNotebookShape, MainThreadNotebookShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { Disposable } from 'vs/base/common/lifecycle';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
import { URI } from 'vs/base/common/uri';

View File

@@ -6,15 +6,14 @@
import * as azdata from 'azdata';
import * as path from 'path';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { URI, UriComponents } from 'vs/base/common/uri';
import { Event, Emitter } from 'vs/base/common/event';
import { IExtHostContext, IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext, IUndoStopOptions } from 'vs/workbench/api/common/extHost.protocol';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { viewColumnToEditorGroup } from 'vs/workbench/api/shared/editor';
import { Schemas } from 'vs/base/common/network';
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
@@ -32,6 +31,7 @@ import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilit
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
import { notebookModeId } from 'sql/common/constants';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor';
class MainThreadNotebookEditor extends Disposable {
private _contentChangedEmitter = new Emitter<NotebookContentChange>();

View File

@@ -7,8 +7,8 @@
import { SqlExtHostContext, SqlMainContext, ExtHostObjectExplorerShape, MainThreadObjectExplorerShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
import { IObjectExplorerService, NodeInfoWithConnection } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';

View File

@@ -5,8 +5,8 @@
'use strict';
import { SqlExtHostContext, SqlMainContext, ExtHostQueryEditorShape, MainThreadQueryEditorShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IConnectionManagementService, IConnectionCompletionOptions, ConnectionType, RunQueryOnConnectionMode } from 'sql/platform/connection/common/connectionManagement';
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
import { QueryEditor } from 'sql/parts/query/editor/queryEditor';

View File

@@ -13,8 +13,8 @@ import {
SqlExtHostContext,
SqlMainContext
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
@extHostNamedCustomer(SqlMainContext.MainThreadResourceProvider)

View File

@@ -11,8 +11,8 @@ import {
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { ISerializationService } from 'sql/platform/serialization/common/serializationService';
import * as azdata from 'azdata';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
@extHostNamedCustomer(SqlMainContext.MainThreadSerializationProvider)
export class MainThreadSerializationProvider implements MainThreadSerializationProviderShape {

View File

@@ -5,7 +5,7 @@
'use strict';
import * as extHostApi from 'vs/workbench/api/node/extHost.api.impl';
import { IInitData, IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IInitData, IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService';
import * as extHostTypes from 'vs/workbench/api/node/extHostTypes';
import { URI } from 'vs/base/common/uri';

View File

@@ -6,9 +6,8 @@
import {
createMainContextProxyIdentifier as createMainId,
createExtHostContextProxyIdentifier as createExtId,
ProxyIdentifier, IRPCProtocol
} from 'vs/workbench/services/extensions/node/proxyIdentifier';
createExtHostContextProxyIdentifier as createExtId
} from 'vs/workbench/services/extensions/common/proxyIdentifier';
import { UriComponents } from 'vs/base/common/uri';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -22,8 +21,8 @@ import {
IItemConfig, ModelComponentTypes, IComponentShape, IModelViewDialogDetails, IModelViewTabDetails, IModelViewButtonDetails,
IModelViewWizardDetails, IModelViewWizardPageDetails, INotebookManagerDetails, INotebookSessionDetails, INotebookKernelDetails, INotebookFutureDetails, FutureMessageType, INotebookFutureDone, ISingleNotebookEditOperation
} from 'sql/workbench/api/common/sqlExtHostTypes';
import { EditorViewColumn } from 'vs/workbench/api/shared/editor';
import { IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol';
import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor';
import { IUndoStopOptions } from 'vs/workbench/api/common/extHost.protocol';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
export abstract class ExtHostAccountManagementShape {

View File

@@ -12,7 +12,7 @@ import { AccountProviderStub, AccountManagementTestService } from 'sqltest/stubs
import { ExtHostAccountManagement } from 'sql/workbench/api/node/extHostAccountManagement';
import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCProtocol';
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier';
import { IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { MainThreadAccountManagement } from 'sql/workbench/api/node/mainThreadAccountManagement';
import { IAccountManagementService, AzureResource } from 'sql/platform/accountManagement/common/interfaces';
@@ -453,4 +453,4 @@ function getMockAccountManagementService(accounts: azdata.Account[]): TypeMoq.Mo
.returns(() => () => { return undefined; });
return mockAccountManagementService;
}
}

View File

@@ -10,7 +10,7 @@ import * as assert from 'assert';
import { Mock, It, Times } from 'typemoq';
import { ExtHostBackgroundTaskManagement, TaskStatus } from 'sql/workbench/api/node/extHostBackgroundTaskManagement';
import { MainThreadBackgroundTaskManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
suite('ExtHostBackgroundTaskManagement Tests', () => {
@@ -105,4 +105,4 @@ suite('ExtHostBackgroundTaskManagement Tests', () => {
extHostBackgroundTaskManagement.$removeTask(operationId);
});
});
});

View File

@@ -10,7 +10,7 @@ import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCP
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { ExtHostCredentialManagement } from 'sql/workbench/api/node/extHostCredentialManagement';
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IRPCProtocol } from 'vs/workbench/services/extensions/node/proxyIdentifier';
import { IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
import { MainThreadCredentialManagement } from 'sql/workbench/api/node/mainThreadCredentialManagement';
import { CredentialsTestProvider, CredentialsTestService } from 'sqltest/stubs/credentialsTestStubs';
import { ICredentialsService } from 'sql/platform/credentials/common/credentialsService';

View File

@@ -10,7 +10,7 @@ import { Mock, It, Times, MockBehavior } from 'typemoq';
import * as azdata from 'azdata';
import { ExtHostModelView } from 'sql/workbench/api/node/extHostModelView';
import { MainThreadModelViewShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { IComponentShape, IItemConfig, ComponentEventType, IComponentEventArgs, ModelComponentTypes } from 'sql/workbench/api/common/sqlExtHostTypes';
import { TitledFormItemLayout } from 'sql/parts/modelComponents/formContainer.component';
@@ -380,4 +380,4 @@ suite('ExtHostModelView Validation Tests', () => {
assert.equal((form as IWithItemConfig).itemConfigs.length, 2);
assert.equal((form as IWithItemConfig).itemConfigs[1].toIItemConfig().componentShape.type, ModelComponentTypes.ListBox);
});
});
});

View File

@@ -10,7 +10,7 @@ import * as assert from 'assert';
import { Mock, It, Times } from 'typemoq';
import { ExtHostModelViewDialog } from 'sql/workbench/api/node/extHostModelViewDialog';
import { MainThreadModelViewDialogShape, ExtHostModelViewShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { MessageLevel } from 'sql/workbench/api/common/sqlExtHostTypes';
@@ -328,4 +328,4 @@ suite('ExtHostModelViewDialog Tests', () => {
extHostModelViewDialog.$validateDialogClose(dialogHandle);
assert.equal(callCount, 1);
});
});
});

View File

@@ -10,7 +10,7 @@ import * as assert from 'assert';
import * as TypeMoq from 'typemoq';
import { URI } from 'vs/base/common/uri';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostNotebook } from 'sql/workbench/api/node/extHostNotebook';
import { MainThreadNotebookShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
@@ -144,4 +144,4 @@ class NotebookManagerStub implements azdata.nb.NotebookManager {
get serverManager(): azdata.nb.ServerManager {
return undefined;
}
}
}

View File

@@ -10,7 +10,7 @@ import { Mock, It, Times } from 'typemoq';
import { MainThreadBackgroundTaskManagement, TaskStatus } from 'sql/workbench/api/node/mainThreadBackgroundTaskManagement';
import { ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { ITaskService } from 'sql/platform/taskHistory/common/taskService';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { TaskNode } from 'sql/parts/taskHistory/common/taskNode';
import { Emitter } from 'vs/base/common/event';
@@ -94,4 +94,4 @@ suite('MainThreadBackgroundTaskManagement Tests', () => {
mockProxy.verify(x => x.$onTaskCanceled(It.is(t => t === operationId)), Times.once());
});
});
});

View File

@@ -8,7 +8,7 @@
import * as assert from 'assert';
import { Mock, It, Times } from 'typemoq';
import { MainThreadModelViewDialog } from 'sql/workbench/api/node/mainThreadModelViewDialog';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { IModelViewButtonDetails, IModelViewTabDetails, IModelViewDialogDetails, IModelViewWizardPageDetails, IModelViewWizardDetails, DialogMessage, MessageLevel } from 'sql/workbench/api/common/sqlExtHostTypes';
import { CustomDialogService } from 'sql/platform/dialog/customDialogService';
import { Dialog, DialogTab, Wizard } from 'sql/platform/dialog/dialogTypes';
@@ -367,4 +367,4 @@ suite('MainThreadModelViewDialog Tests', () => {
// Then the call gets forwarded to the extension host
mockExtHostModelViewDialog.verify(x => x.$validateDialogClose(It.is(handle => handle === dialogHandle)), Times.once());
});
});
});

View File

@@ -10,7 +10,7 @@ import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { URI, UriComponents } from 'vs/base/common/uri';
import { IExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostNotebookShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
import { MainThreadNotebook } from 'sql/workbench/api/node/mainThreadNotebook';

View File

@@ -10,6 +10,7 @@
"noImplicitThis": true,
"alwaysStrict": true,
"strictBindCallApply": true,
"strictNullChecks": false,
"baseUrl": ".",
"paths": {
"vs/*": [

View File

@@ -1,474 +0,0 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"noEmit": true,
"strictNullChecks": true
},
"include": [
"./typings",
"./vs/base/**/*.ts",
"./vs/code/**/*.ts",
"./vs/editor/**/*.ts",
"./vs/platform/**/*.ts",
"./vs/workbench/common/**/*",
"./vs/workbench/browser/**/*",
"./vs/workbench/electron-browser/**/*",
"./vs/workbench/contrib/emmet/**/*",
"./vs/workbench/contrib/externalTerminal/**/*",
"./vs/workbench/contrib/scm/**/*.ts",
"./vs/workbench/contrib/snippets/**/*.ts",
"./vs/workbench/contrib/outline/**/*.ts",
"./vs/workbench/contrib/performance/**/*.ts",
"./vs/workbench/contrib/welcome/**/*.ts",
"./vs/workbench/contrib/issue/**/*",
"./vs/workbench/contrib/splash/**/*.ts",
"./vs/workbench/contrib/tasks/**/*.ts",
"./vs/workbench/services/commands/**/*",
"./vs/workbench/services/configuration/common/**/*",
"./vs/workbench/services/files/node/watcher/**/*",
"./vs/workbench/services/themes/**/*.ts",
"./vs/workbench/services/bulkEdit/**/*.ts",
"./vs/workbench/services/output/**/*.ts",
"./vs/workbench/services/preferences/**/*.ts",
"./vs/workbench/services/timer/**/*.ts",
"./vs/workbench/contrib/debug/**/*.ts",
"./vs/workbench/contrib/files/**/*.ts",
"./vs/workbench/contrib/webview/**/*.ts",
"./vs/workbench/contrib/preferences/common/**/*.ts",
"./vs/workbench/contrib/preferences/**/settings*.ts",
"./vs/workbench/contrib/terminal/**/*"
],
"files": [
"./vs/monaco.d.ts",
"./vs/nls.d.ts",
"./vs/nls.mock.ts",
"./vs/vscode.d.ts",
"./vs/vscode.proposed.d.ts",
"./vs/workbench/api/browser/viewsExtensionPoint.ts",
"./vs/workbench/api/common/configurationExtensionPoint.ts",
"./vs/workbench/api/common/jsonValidationExtensionPoint.ts",
"./vs/workbench/api/common/menusExtensionPoint.ts",
"./vs/workbench/api/electron-browser/extHostCustomers.ts",
"./vs/workbench/api/electron-browser/mainThreadClipboard.ts",
"./vs/workbench/api/electron-browser/mainThreadCommands.ts",
"./vs/workbench/api/electron-browser/mainThreadConfiguration.ts",
"./vs/workbench/api/electron-browser/mainThreadConsole.ts",
"./vs/workbench/api/electron-browser/mainThreadDebugService.ts",
"./vs/workbench/api/electron-browser/mainThreadDecorations.ts",
"./vs/workbench/api/electron-browser/mainThreadDiagnostics.ts",
"./vs/workbench/api/electron-browser/mainThreadDialogs.ts",
"./vs/workbench/api/electron-browser/mainThreadDocumentContentProviders.ts",
"./vs/workbench/api/electron-browser/mainThreadDocuments.ts",
"./vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts",
"./vs/workbench/api/electron-browser/mainThreadEditor.ts",
"./vs/workbench/api/electron-browser/mainThreadEditors.ts",
"./vs/workbench/api/electron-browser/mainThreadErrors.ts",
"./vs/workbench/api/electron-browser/mainThreadExtensionService.ts",
"./vs/workbench/api/electron-browser/mainThreadFileSystem.ts",
"./vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts",
"./vs/workbench/api/electron-browser/mainThreadHeapService.ts",
"./vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts",
"./vs/workbench/api/electron-browser/mainThreadLanguages.ts",
"./vs/workbench/api/electron-browser/mainThreadLogService.ts",
"./vs/workbench/api/electron-browser/mainThreadMessageService.ts",
"./vs/workbench/api/electron-browser/mainThreadOutputService.ts",
"./vs/workbench/api/electron-browser/mainThreadProgress.ts",
"./vs/workbench/api/electron-browser/mainThreadQuickOpen.ts",
"./vs/workbench/api/electron-browser/mainThreadSCM.ts",
"./vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts",
"./vs/workbench/api/electron-browser/mainThreadSearch.ts",
"./vs/workbench/api/electron-browser/mainThreadStatusBar.ts",
"./vs/workbench/api/electron-browser/mainThreadStorage.ts",
"./vs/workbench/api/electron-browser/mainThreadTask.ts",
"./vs/workbench/api/electron-browser/mainThreadTelemetry.ts",
"./vs/workbench/api/electron-browser/mainThreadTerminalService.ts",
"./vs/workbench/api/electron-browser/mainThreadTreeViews.ts",
"./vs/workbench/api/electron-browser/mainThreadUrls.ts",
"./vs/workbench/api/electron-browser/mainThreadWebview.ts",
"./vs/workbench/api/electron-browser/mainThreadWindow.ts",
"./vs/workbench/api/electron-browser/mainThreadWorkspace.ts",
"./vs/workbench/api/node/apiCommands.ts",
"./vs/workbench/api/node/extHost.protocol.ts",
"./vs/workbench/api/node/extHostApiCommands.ts",
"./vs/workbench/api/node/extHostCLIServer.ts",
"./vs/workbench/api/node/extHostClipboard.ts",
"./vs/workbench/api/node/extHostCommands.ts",
"./vs/workbench/api/node/extHostComments.ts",
"./vs/workbench/api/node/extHostConfiguration.ts",
// "./vs/workbench/api/node/extHostDebugService.ts",
"./vs/workbench/api/node/extHostDecorations.ts",
"./vs/workbench/api/node/extHostDiagnostics.ts",
"./vs/workbench/api/node/extHostDialogs.ts",
"./vs/workbench/api/node/extHostDocumentContentProviders.ts",
"./vs/workbench/api/node/extHostDocumentData.ts",
"./vs/workbench/api/node/extHostDocumentSaveParticipant.ts",
"./vs/workbench/api/node/extHostDocuments.ts",
"./vs/workbench/api/node/extHostDocumentsAndEditors.ts",
"./vs/workbench/api/node/extHostExtensionActivator.ts",
"./vs/workbench/api/node/extHostFileSystem.ts",
"./vs/workbench/api/node/extHostFileSystemEventService.ts",
"./vs/workbench/api/node/extHostHeapService.ts",
"./vs/workbench/api/node/extHostLanguageFeatures.ts",
"./vs/workbench/api/node/extHostLanguages.ts",
"./vs/workbench/api/node/extHostLogService.ts",
"./vs/workbench/api/node/extHostMessageService.ts",
"./vs/workbench/api/node/extHostOutputService.ts",
"./vs/workbench/api/node/extHostProgress.ts",
"./vs/workbench/api/node/extHostQuickOpen.ts",
"./vs/workbench/api/node/extHostSCM.ts",
"./vs/workbench/api/node/extHostSearch.ts",
"./vs/workbench/api/node/extHostStatusBar.ts",
"./vs/workbench/api/node/extHostStorage.ts",
// "./vs/workbench/api/node/extHostTask.ts",
"./vs/workbench/api/node/extHostTerminalService.ts",
"./vs/workbench/api/node/extHostTextEditor.ts",
"./vs/workbench/api/node/extHostTextEditors.ts",
"./vs/workbench/api/node/extHostTreeViews.ts",
"./vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts",
"./vs/workbench/api/node/extHostTypeConverters.ts",
"./vs/workbench/api/node/extHostTypes.ts",
"./vs/workbench/api/node/extHostUrls.ts",
"./vs/workbench/api/node/extHostWebview.ts",
"./vs/workbench/api/node/extHostWindow.ts",
"./vs/workbench/api/node/extHostWorkspace.ts",
"./vs/workbench/api/shared/editor.ts",
"./vs/workbench/api/shared/tasks.ts",
"./vs/workbench/contrib/backup/common/backup.contribution.ts",
"./vs/workbench/contrib/backup/common/backupModelTracker.ts",
"./vs/workbench/contrib/backup/common/backupRestorer.ts",
"./vs/workbench/contrib/cli/node/cli.contribution.ts",
"./vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.ts",
"./vs/workbench/contrib/codeEditor/browser/codeEditor.contribution.ts",
"./vs/workbench/contrib/codeEditor/browser/inspectKeybindings.ts",
"./vs/workbench/contrib/codeEditor/browser/inspectTMScopes/inspectTMScopes.ts",
"./vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.ts",
"./vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts",
"./vs/workbench/contrib/codeEditor/browser/menuPreventer.ts",
"./vs/workbench/contrib/codeEditor/browser/selectionClipboard.ts",
"./vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts",
"./vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts",
"./vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts",
"./vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.ts",
"./vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.ts",
"./vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts",
"./vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts",
"./vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.ts",
"./vs/workbench/contrib/codeEditor/electron-browser/codeEditor.contribution.ts",
"./vs/workbench/contrib/codeEditor/electron-browser/sleepResumeRepaintMinimap.ts",
"./vs/workbench/contrib/codeinset/common/codeInset.ts",
"./vs/workbench/contrib/codeinset/electron-browser/codeInset.contribution.ts",
"./vs/workbench/contrib/codeinset/electron-browser/codeInsetWidget.ts",
"./vs/workbench/contrib/comments/common/commentModel.ts",
"./vs/workbench/contrib/comments/common/commentThreadWidget.ts",
"./vs/workbench/contrib/comments/electron-browser/commentGlyphWidget.ts",
"./vs/workbench/contrib/comments/electron-browser/commentsTreeViewer.ts",
"./vs/workbench/contrib/comments/electron-browser/reactionsAction.ts",
"./vs/workbench/contrib/comments/electron-browser/simpleCommentEditor.ts",
"./vs/workbench/contrib/experiments/electron-browser/experimentalPrompt.ts",
"./vs/workbench/contrib/experiments/electron-browser/experiments.contribution.ts",
"./vs/workbench/contrib/experiments/node/experimentService.ts",
"./vs/workbench/contrib/experiments/test/electron-browser/experimentService.test.ts",
"./vs/workbench/contrib/experiments/test/electron-browser/experimentalPrompts.test.ts",
"./vs/workbench/contrib/extensions/browser/extensionsQuickOpen.ts",
"./vs/workbench/contrib/extensions/browser/extensionsViewer.ts",
"./vs/workbench/contrib/extensions/common/extensionQuery.ts",
"./vs/workbench/contrib/extensions/common/extensions.ts",
"./vs/workbench/contrib/extensions/common/extensionsFileTemplate.ts",
"./vs/workbench/contrib/extensions/common/extensionsInput.ts",
"./vs/workbench/contrib/extensions/common/extensionsUtils.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionTipsService.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsActions.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsActivationProgress.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsList.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsViewlet.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts",
"./vs/workbench/contrib/extensions/electron-browser/extensionsWidgets.ts",
"./vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts",
"./vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts",
"./vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts",
"./vs/workbench/contrib/extensions/test/common/extensionQuery.test.ts",
"./vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts",
"./vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts",
"./vs/workbench/contrib/extensions/test/electron-browser/extensionsViews.test.ts",
"./vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts",
"./vs/workbench/contrib/feedback/electron-browser/feedback.contribution.ts",
"./vs/workbench/contrib/feedback/electron-browser/feedback.ts",
"./vs/workbench/contrib/feedback/electron-browser/feedbackStatusbarItem.ts",
"./vs/workbench/contrib/format/browser/format.contribution.ts",
"./vs/workbench/contrib/localizations/browser/localizations.contribution.ts",
"./vs/workbench/contrib/localizations/browser/localizationsActions.ts",
"./vs/workbench/contrib/localizations/browser/minimalTranslations.ts",
"./vs/workbench/contrib/logs/common/logConstants.ts",
"./vs/workbench/contrib/logs/common/logs.contribution.ts",
"./vs/workbench/contrib/logs/common/logsActions.ts",
"./vs/workbench/contrib/markers/browser/constants.ts",
"./vs/workbench/contrib/markers/browser/markers.contribution.ts",
"./vs/workbench/contrib/markers/browser/markers.ts",
"./vs/workbench/contrib/markers/browser/markersFileDecorations.ts",
"./vs/workbench/contrib/markers/browser/markersFilterOptions.ts",
"./vs/workbench/contrib/markers/browser/markersModel.ts",
"./vs/workbench/contrib/markers/browser/markersPanel.ts",
"./vs/workbench/contrib/markers/browser/markersPanelActions.ts",
"./vs/workbench/contrib/markers/browser/markersTreeViewer.ts",
"./vs/workbench/contrib/markers/browser/messages.ts",
"./vs/workbench/contrib/markers/test/electron-browser/markersModel.test.ts",
"./vs/workbench/contrib/output/browser/logViewer.ts",
"./vs/workbench/contrib/output/browser/output.contribution.ts",
"./vs/workbench/contrib/output/browser/outputActions.ts",
"./vs/workbench/contrib/output/browser/outputPanel.ts",
"./vs/workbench/contrib/output/browser/outputServices.ts",
"./vs/workbench/contrib/output/common/output.ts",
"./vs/workbench/contrib/output/common/outputLinkComputer.ts",
"./vs/workbench/contrib/output/common/outputLinkProvider.ts",
"./vs/workbench/contrib/output/test/outputLinkProvider.test.ts",
"./vs/workbench/contrib/preferences/browser/preferencesEditor.ts",
"./vs/workbench/contrib/preferences/browser/preferencesRenderers.ts",
"./vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.ts",
"./vs/workbench/contrib/preferences/browser/keybindingWidgets.ts",
"./vs/workbench/contrib/preferences/browser/preferencesActions.ts",
"./vs/workbench/contrib/preferences/browser/preferencesWidgets.ts",
"./vs/workbench/contrib/preferences/browser/settingsLayout.ts",
"./vs/workbench/contrib/preferences/browser/settingsWidgets.ts",
"./vs/workbench/contrib/preferences/browser/tocTree.ts",
"./vs/workbench/contrib/preferences/common/preferences.ts",
"./vs/workbench/contrib/preferences/common/preferencesContribution.ts",
"./vs/workbench/contrib/preferences/common/smartSnippetInserter.ts",
"./vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts",
"./vs/workbench/contrib/preferences/test/common/smartSnippetInserter.test.ts",
"./vs/workbench/contrib/quickopen/browser/commandsHandler.ts",
"./vs/workbench/contrib/quickopen/browser/gotoLineHandler.ts",
"./vs/workbench/contrib/quickopen/browser/gotoSymbolHandler.ts",
"./vs/workbench/contrib/quickopen/browser/helpHandler.ts",
"./vs/workbench/contrib/quickopen/browser/quickopen.contribution.ts",
"./vs/workbench/contrib/quickopen/browser/viewPickerHandler.ts",
"./vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts",
"./vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts",
"./vs/workbench/contrib/scm/browser/scmActivity.ts",
"./vs/workbench/contrib/scm/browser/scmMenus.ts",
"./vs/workbench/contrib/scm/browser/scmUtil.ts",
"./vs/workbench/contrib/scm/common/scm.ts",
"./vs/workbench/contrib/scm/common/scmService.ts",
"./vs/workbench/contrib/search/browser/openAnythingHandler.ts",
"./vs/workbench/contrib/search/browser/openFileHandler.ts",
"./vs/workbench/contrib/search/browser/openSymbolHandler.ts",
"./vs/workbench/contrib/search/browser/patternInputWidget.ts",
"./vs/workbench/contrib/search/browser/replaceContributions.ts",
"./vs/workbench/contrib/search/browser/replaceService.ts",
"./vs/workbench/contrib/search/common/constants.ts",
"./vs/workbench/contrib/search/common/queryBuilder.ts",
"./vs/workbench/contrib/search/common/replace.ts",
"./vs/workbench/contrib/search/common/search.ts",
"./vs/workbench/contrib/search/common/searchHistoryService.ts",
"./vs/workbench/contrib/search/common/searchModel.ts",
"./vs/workbench/contrib/search/test/browser/mockSearchTree.ts",
"./vs/workbench/contrib/search/test/browser/openFileHandler.test.ts",
"./vs/workbench/contrib/search/test/browser/searchViewlet.test.ts",
"./vs/workbench/contrib/search/test/common/queryBuilder.test.ts",
"./vs/workbench/contrib/search/test/common/searchModel.test.ts",
"./vs/workbench/contrib/search/test/common/searchResult.test.ts",
"./vs/workbench/contrib/stats/node/workspaceStats.ts",
"./vs/workbench/contrib/stats/test/workspaceStats.test.ts",
"./vs/workbench/contrib/surveys/electron-browser/languageSurveys.contribution.ts",
"./vs/workbench/contrib/surveys/electron-browser/nps.contribution.ts",
"./vs/workbench/contrib/telemetry/browser/telemetry.contribution.ts",
"./vs/workbench/contrib/themes/browser/themes.contribution.ts",
"./vs/workbench/contrib/themes/test/electron-browser/themes.test.contribution.ts",
"./vs/workbench/contrib/update/electron-browser/releaseNotesEditor.ts",
"./vs/workbench/contrib/update/electron-browser/update.contribution.ts",
"./vs/workbench/contrib/update/electron-browser/update.ts",
"./vs/workbench/contrib/url/common/url.contribution.ts",
"./vs/workbench/contrib/watermark/browser/watermark.ts",
"./vs/workbench/services/activity/browser/activityService.ts",
"./vs/workbench/services/activity/common/activity.ts",
"./vs/workbench/services/activityBar/browser/activityBarService.ts",
"./vs/workbench/services/backup/common/backup.ts",
"./vs/workbench/services/backup/node/backupFileService.ts",
"./vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts",
"./vs/workbench/services/broadcast/electron-browser/broadcastService.ts",
"./vs/workbench/services/configuration/common/configurationEditingService.ts",
"./vs/workbench/services/configuration/common/jsonEditingService.ts",
"./vs/workbench/services/configuration/node/configuration.ts",
"./vs/workbench/services/configuration/node/configurationService.ts",
"./vs/workbench/services/configuration/test/common/configurationModels.test.ts",
"./vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts",
"./vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts",
"./vs/workbench/services/configurationResolver/common/configurationResolver.ts",
"./vs/workbench/services/configurationResolver/common/configurationResolverSchema.ts",
"./vs/workbench/services/configurationResolver/common/configurationResolverUtils.ts",
"./vs/workbench/services/contextmenu/electron-browser/contextmenuService.ts",
"./vs/workbench/services/decorations/browser/decorations.ts",
"./vs/workbench/services/decorations/browser/decorationsService.ts",
"./vs/workbench/services/decorations/test/browser/decorationsService.test.ts",
"./vs/workbench/services/dialogs/browser/remoteFileDialog.ts",
"./vs/workbench/services/dialogs/browser/fileDialogService.ts",
"./vs/workbench/services/dialogs/electron-browser/dialogService.ts",
"./vs/workbench/services/editor/browser/codeEditorService.ts",
"./vs/workbench/services/editor/browser/editorService.ts",
"./vs/workbench/services/editor/common/editorGroupsService.ts",
"./vs/workbench/services/editor/common/editorService.ts",
"./vs/workbench/services/editor/test/browser/editorGroupsService.test.ts",
"./vs/workbench/services/editor/test/browser/editorService.test.ts",
"./vs/workbench/services/extensionManagement/node/multiExtensionManagement.ts",
"./vs/workbench/services/extensions/common/extensions.ts",
"./vs/workbench/services/extensions/common/extensionsRegistry.ts",
"./vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts",
"./vs/workbench/services/extensions/electron-browser/extensionHost.ts",
"./vs/workbench/services/extensions/electron-browser/extensionHostProcessManager.ts",
"./vs/workbench/services/extensions/electron-browser/extensionHostProfiler.ts",
"./vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts",
"./vs/workbench/services/extensions/electron-browser/extensionService.ts",
"./vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts",
"./vs/workbench/services/extensions/node/extensionDescriptionRegistry.ts",
"./vs/workbench/services/extensions/node/extensionHostProtocol.ts",
"./vs/workbench/services/extensions/node/extensionPoints.ts",
"./vs/workbench/services/extensions/node/extensionsUtil.ts",
"./vs/workbench/services/extensions/node/lazyPromise.ts",
"./vs/workbench/services/extensions/node/proxyIdentifier.ts",
"./vs/workbench/services/extensions/node/rpcProtocol.ts",
"./vs/workbench/services/extensions/test/node/rpcProtocol.test.ts",
"./vs/workbench/services/files/node/encoding.ts",
"./vs/workbench/services/files/node/fileService.ts",
"./vs/workbench/services/files/node/remoteFileService.ts",
"./vs/workbench/services/files/node/streams.ts",
"./vs/workbench/services/files/test/electron-browser/fileService.test.ts",
"./vs/workbench/services/files/test/electron-browser/resolver.test.ts",
"./vs/workbench/services/files/test/electron-browser/utils.ts",
"./vs/workbench/services/files/test/electron-browser/watcher.test.ts",
"./vs/workbench/services/hash/common/hashService.ts",
"./vs/workbench/services/hash/node/hashService.ts",
"./vs/workbench/services/hash/test/hashService.test.ts",
"./vs/workbench/services/history/browser/history.ts",
"./vs/workbench/services/history/common/history.ts",
"./vs/workbench/services/integrity/common/integrity.ts",
"./vs/workbench/services/integrity/node/integrityService.ts",
"./vs/workbench/services/keybinding/common/keybindingEditing.ts",
"./vs/workbench/services/keybinding/common/keybindingIO.ts",
"./vs/workbench/services/keybinding/common/keyboardMapper.ts",
"./vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper.ts",
"./vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts",
"./vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts",
"./vs/workbench/services/keybinding/electron-browser/keybindingService.ts",
"./vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts",
"./vs/workbench/services/keybinding/test/keybindingIO.test.ts",
"./vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts",
"./vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts",
"./vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts",
"./vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts",
"./vs/workbench/services/label/common/labelService.ts",
"./vs/workbench/services/label/test/label.test.ts",
"./vs/workbench/services/layout/browser/layoutService.ts",
"./vs/workbench/services/mode/common/workbenchModeService.ts",
"./vs/workbench/services/notification/common/notificationService.ts",
"./vs/workbench/services/panel/common/panelService.ts",
"./vs/workbench/services/preferences/common/preferencesModels.ts",
"./vs/workbench/services/preferences/common/keybindingsEditorModel.ts",
"./vs/workbench/services/preferences/test/common/keybindingsEditorModel.test.ts",
"./vs/workbench/services/progress/browser/progressService.ts",
"./vs/workbench/services/progress/browser/progressService2.ts",
"./vs/workbench/services/progress/test/progressService.test.ts",
"./vs/workbench/services/remote/common/remoteAgentService.ts",
"./vs/workbench/services/remote/common/remoteEnvironmentService.ts",
"./vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl.ts",
"./vs/workbench/services/remote/node/remoteAgentEnvironmentChannel.ts",
"./vs/workbench/services/search/common/replace.ts",
"./vs/workbench/services/search/common/search.ts",
"./vs/workbench/services/search/common/searchHelpers.ts",
"./vs/workbench/services/search/node/fileSearch.ts",
"./vs/workbench/services/search/node/fileSearchManager.ts",
"./vs/workbench/services/search/node/rawSearchService.ts",
"./vs/workbench/services/search/node/ripgrepFileSearch.ts",
"./vs/workbench/services/search/node/ripgrepSearchProvider.ts",
"./vs/workbench/services/search/node/ripgrepSearchUtils.ts",
"./vs/workbench/services/search/node/ripgrepTextSearchEngine.ts",
"./vs/workbench/services/search/node/searchApp.ts",
"./vs/workbench/services/search/node/searchIpc.ts",
"./vs/workbench/services/search/node/textSearchAdapter.ts",
"./vs/workbench/services/search/node/textSearchManager.ts",
"./vs/workbench/services/search/test/common/replace.test.ts",
"./vs/workbench/services/search/test/common/search.test.ts",
"./vs/workbench/services/search/test/common/searchHelpers.test.ts",
"./vs/workbench/services/search/test/node/ripgrepFileSearch.test.ts",
"./vs/workbench/services/search/test/node/ripgrepTextSearchEngine.test.ts",
"./vs/workbench/services/search/test/node/search.test.ts",
"./vs/workbench/services/search/test/node/textSearch.integrationTest.ts",
"./vs/workbench/services/search/test/node/textSearchManager.test.ts",
"./vs/workbench/services/textMate/common/TMGrammars.ts",
"./vs/workbench/services/textMate/common/TMHelper.ts",
"./vs/workbench/services/textMate/common/textMateService.ts",
"./vs/workbench/services/textMate/electron-browser/textMateService.ts",
"./vs/workbench/services/textfile/common/textFileEditorModel.ts",
"./vs/workbench/services/textfile/common/textFileEditorModelManager.ts",
"./vs/workbench/services/textfile/common/textFileService.ts",
"./vs/workbench/services/textfile/common/textfiles.ts",
"./vs/workbench/services/textfile/node/textResourcePropertiesService.ts",
"./vs/workbench/services/textfile/test/textFileEditorModel.test.ts",
"./vs/workbench/services/textfile/test/textFileEditorModelManager.test.ts",
"./vs/workbench/services/textfile/test/textFileService.test.ts",
"./vs/workbench/services/textmodelResolver/common/textModelResolverService.ts",
"./vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts",
"./vs/workbench/services/timer/electron-browser/timerService.ts",
"./vs/workbench/services/title/common/titleService.ts",
"./vs/workbench/services/untitled/common/untitledEditorService.ts",
"./vs/workbench/services/viewlet/browser/viewlet.ts",
"./vs/workbench/services/workspace/common/workspaceEditing.ts",
"./vs/workbench/services/configurationResolver/common/variableResolver.ts",
"./vs/workbench/services/workspace/node/workspaceEditingService.ts",
"./vs/workbench/test/browser/actionRegistry.test.ts",
"./vs/workbench/test/browser/part.test.ts",
"./vs/workbench/test/browser/parts/editor/baseEditor.test.ts",
"./vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts",
"./vs/workbench/test/browser/parts/editor/rangeDecorations.test.ts",
"./vs/workbench/test/browser/parts/views/views.test.ts",
"./vs/workbench/test/browser/quickopen.test.ts",
"./vs/workbench/test/browser/viewlet.test.ts",
"./vs/workbench/test/common/editor/dataUriEditorInput.test.ts",
"./vs/workbench/test/common/editor/editor.test.ts",
"./vs/workbench/test/common/editor/editorDiffModel.test.ts",
"./vs/workbench/test/common/editor/editorGroups.test.ts",
"./vs/workbench/test/common/editor/editorInput.test.ts",
"./vs/workbench/test/common/editor/editorModel.test.ts",
"./vs/workbench/test/common/editor/editorOptions.test.ts",
"./vs/workbench/test/common/editor/resourceEditorInput.test.ts",
"./vs/workbench/test/common/editor/untitledEditor.test.ts",
"./vs/workbench/test/common/memento.test.ts",
"./vs/workbench/test/common/notifications.test.ts",
"./vs/workbench/test/electron-browser/api/extHost.api.impl.test.ts",
"./vs/workbench/test/electron-browser/api/extHostCommands.test.ts",
"./vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts",
"./vs/workbench/test/electron-browser/api/extHostDiagnostics.test.ts",
"./vs/workbench/test/electron-browser/api/extHostDocumentData.test.ts",
"./vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts",
"./vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts",
"./vs/workbench/test/electron-browser/api/extHostFileSystemEventService.test.ts",
"./vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts",
"./vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts",
"./vs/workbench/test/electron-browser/api/extHostSearch.test.ts",
"./vs/workbench/test/electron-browser/api/extHostTextEditor.test.ts",
"./vs/workbench/test/electron-browser/api/extHostTextEditors.test.ts",
"./vs/workbench/test/electron-browser/api/extHostTypeConverter.test.ts",
"./vs/workbench/test/electron-browser/api/extHostTypes.test.ts",
"./vs/workbench/test/electron-browser/api/extHostWebview.test.ts",
"./vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadConfiguration.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadDiagnostics.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadDocumentContentProviders.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadDocuments.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadEditors.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts",
"./vs/workbench/test/electron-browser/api/mainThreadWorkspace.test.ts",
"./vs/workbench/test/electron-browser/api/mock.ts",
"./vs/workbench/test/electron-browser/api/testRPCProtocol.ts",
"./vs/workbench/test/electron-browser/colorRegistry.releaseTest.ts",
"./vs/workbench/test/workbenchTestServices.ts"
],
"exclude": [
"./typings/require-monaco.d.ts",
"./vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts"
]
}

View File

@@ -16,6 +16,7 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
import { Event, Emitter } from 'vs/base/common/event';
import { asArray } from 'vs/base/common/arrays';
export interface IActionItem {
actionRunner: IActionRunner;
@@ -593,7 +594,7 @@ export class ActionBar extends Disposable implements IActionRunner {
}
push(arg: IAction | IAction[], options: IActionOptions = {}): void {
const actions: IAction[] = !Array.isArray(arg) ? [arg] : arg;
const actions: IAction[] = asArray(arg);
let index = types.isNumber(options.index) ? options.index : null;

View File

@@ -17,6 +17,7 @@ import { Event, Emitter } from 'vs/base/common/event';
import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes';
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
import { withNullAsUndefined } from 'vs/base/common/types';
import { asArray } from 'vs/base/common/arrays';
const $ = DOM.$;
@@ -184,7 +185,7 @@ export class MenuBar extends Disposable {
}
push(arg: MenuBarMenu | MenuBarMenu[]): void {
const menus: MenuBarMenu[] = !Array.isArray(arg) ? [arg] : arg;
const menus: MenuBarMenu[] = asArray(arg);
menus.forEach((menuBarMenu) => {
const menuIndex = this.menuCache.length;
@@ -993,4 +994,4 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
super.dispose();
this._subscriptions = dispose(this._subscriptions);
}
}
}

View File

@@ -549,3 +549,7 @@ export function mapArrayOrNot<T, U>(items: T | T[], fn: (_: T) => U): U | U[] {
items.map(fn) :
fn(items);
}
export function asArray<T>(x: T | T[]): T[] {
return Array.isArray(x) ? x : [x];
}

View File

@@ -8,6 +8,7 @@ import { Event, Emitter } from 'vs/base/common/event';
import { IMessagePassingProtocol, ClientConnectionEvent, IPCServer, IPCClient } from 'vs/base/parts/ipc/node/ipc';
import { join } from 'vs/base/common/path';
import { tmpdir } from 'os';
import * as fs from 'fs';
import { generateUuid } from 'vs/base/common/uuid';
import { IDisposable } from 'vs/base/common/lifecycle';
@@ -21,6 +22,18 @@ export function generateRandomPipeName(): string {
}
}
function log(fd: number, msg: string, data?: Buffer): void {
const date = new Date();
fs.writeSync(fd, `[${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}.${date.getMilliseconds()}] ${msg}\n`);
if (data) {
fs.writeSync(fd, data);
fs.writeSync(fd, `\n---------------------------------------------------------------------------------------------------------\n`);
}
fs.fdatasyncSync(fd);
}
const EMPTY_BUFFER = Buffer.allocUnsafe(0);
class ChunkStream {
private _chunks: Buffer[];
@@ -40,14 +53,9 @@ class ChunkStream {
this._totalLength += buff.byteLength;
}
public readUInt32BE(): number {
let tmp = this.read(4);
return tmp.readUInt32BE(0);
}
public read(byteCount: number): Buffer {
if (byteCount === 0) {
return Buffer.allocUnsafe(0);
return EMPTY_BUFFER;
}
if (byteCount > this._totalLength) {
@@ -95,23 +103,250 @@ class ChunkStream {
}
}
const enum ProtocolMessageType {
None = 0,
Regular = 1,
Control = 2,
Ack = 3,
KeepAlive = 4
}
function ProtocolMessageTypeToString(type: ProtocolMessageType): string {
switch (type) {
case ProtocolMessageType.None: return 'None';
case ProtocolMessageType.Regular: return 'Regular';
case ProtocolMessageType.Control: return 'Control';
case ProtocolMessageType.Ack: return 'Ack';
case ProtocolMessageType.KeepAlive: return 'KeepAlive';
}
}
export const enum ProtocolConstants {
HeaderLength = 13,
/**
* Send an Acknowledge message at most 2 seconds later...
*/
AcknowledgeTime = 2000, // 2 seconds
/**
* If there is a message that has been unacknowledged for 10 seconds, consider the connection closed...
*/
AcknowledgeTimeoutTime = 10000, // 10 seconds
/**
* Send at least a message every 30s for keep alive reasons.
*/
KeepAliveTime = 30000, // 30 seconds
/**
* If there is no message received for 60 seconds, consider the connection closed...
*/
KeepAliveTimeoutTime = 60000, // 60 seconds
/**
* If there is no reconnection within this time-frame, consider the connection permanently closed...
*/
ReconnectionGraceTime = 60 * 60 * 1000, // 1hr
}
class ProtocolMessage {
public writtenTime: number;
constructor(
public readonly type: ProtocolMessageType,
public readonly id: number,
public readonly ack: number,
public readonly data: Buffer
) {
this.writtenTime = 0;
}
public get size(): number {
return this.data.byteLength;
}
}
class ProtocolReader {
private readonly _socket: Socket;
private _isDisposed: boolean;
private readonly _incomingData: ChunkStream;
private readonly _socketDataListener: (data: Buffer) => void;
public lastReadTime: number;
private readonly _onMessage = new Emitter<ProtocolMessage>();
public readonly onMessage: Event<ProtocolMessage> = this._onMessage.event;
private readonly _state = {
readHead: true,
readLen: ProtocolConstants.HeaderLength,
messageType: ProtocolMessageType.None,
id: 0,
ack: 0
};
constructor(socket: Socket) {
this._socket = socket;
this._isDisposed = false;
this._incomingData = new ChunkStream();
this._socketDataListener = (data: Buffer) => this.acceptChunk(data);
this._socket.on('data', this._socketDataListener);
this.lastReadTime = Date.now();
}
public acceptChunk(data: Buffer | null): void {
if (!data || data.byteLength === 0) {
return;
}
this.lastReadTime = Date.now();
this._incomingData.acceptChunk(data);
while (this._incomingData.byteLength >= this._state.readLen) {
const buff = this._incomingData.read(this._state.readLen);
if (this._state.readHead) {
// buff is the header
// save new state => next time will read the body
this._state.readHead = false;
this._state.readLen = buff.readUInt32BE(9, true);
this._state.messageType = <ProtocolMessageType>buff.readUInt8(0, true);
this._state.id = buff.readUInt32BE(1, true);
this._state.ack = buff.readUInt32BE(5, true);
} else {
// buff is the body
const messageType = this._state.messageType;
const id = this._state.id;
const ack = this._state.ack;
// save new state => next time will read the header
this._state.readHead = true;
this._state.readLen = ProtocolConstants.HeaderLength;
this._state.messageType = ProtocolMessageType.None;
this._state.id = 0;
this._state.ack = 0;
this._onMessage.fire(new ProtocolMessage(messageType, id, ack, buff));
if (this._isDisposed) {
// check if an event listener lead to our disposal
break;
}
}
}
}
public readEntireBuffer(): Buffer {
return this._incomingData.read(this._incomingData.byteLength);
}
public dispose(): void {
this._isDisposed = true;
this._socket.removeListener('data', this._socketDataListener);
}
}
class ProtocolWriter {
private readonly _socket: Socket;
private readonly _logFile: number;
private _data: Buffer[];
private _totalLength;
public lastWriteTime: number;
constructor(socket: Socket, logFile: number) {
this._socket = socket;
this._logFile = logFile;
this._data = [];
this._totalLength = 0;
this.lastWriteTime = 0;
}
public dispose(): void {
this.flush();
}
public flush(): void {
// flush
this._writeNow();
}
public write(msg: ProtocolMessage) {
if (this._logFile) {
log(this._logFile, `send-${ProtocolMessageTypeToString(msg.type)}-${msg.id}-${msg.ack}-`, msg.data);
}
msg.writtenTime = Date.now();
this.lastWriteTime = Date.now();
const header = Buffer.allocUnsafe(ProtocolConstants.HeaderLength);
header.writeUInt8(msg.type, 0, true);
header.writeUInt32BE(msg.id, 1, true);
header.writeUInt32BE(msg.ack, 5, true);
header.writeUInt32BE(msg.data.length, 9, true);
this._writeSoon(header, msg.data);
}
private _bufferAdd(head: Buffer, body: Buffer): boolean {
const wasEmpty = this._totalLength === 0;
this._data.push(head, body);
this._totalLength += head.length + body.length;
return wasEmpty;
}
private _bufferTake(): Buffer {
const ret = Buffer.concat(this._data, this._totalLength);
this._data.length = 0;
this._totalLength = 0;
return ret;
}
private _writeSoon(header: Buffer, data: Buffer): void {
if (this._bufferAdd(header, data)) {
setImmediate(() => {
this._writeNow();
});
}
}
private _writeNow(): void {
if (this._totalLength === 0) {
return;
}
// return early if socket has been destroyed in the meantime
if (this._socket.destroyed) {
return;
}
// we ignore the returned value from `write` because we would have to cached the data
// anyways and nodejs is already doing that for us:
// > https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback
// > However, the false return value is only advisory and the writable stream will unconditionally
// > accept and buffer chunk even if it has not not been allowed to drain.
this._socket.write(this._bufferTake());
}
}
/**
* A message has the following format:
* ```
* /-------------------------------|------\
* | HEADER | |
* |-------------------------------| DATA |
* | TYPE | ID | ACK | DATA_LENGTH | |
* \-------------------------------|------/
* ```
* The header is 9 bytes and consists of:
* - TYPE is 1 byte (ProtocolMessageType) - the message type
* - ID is 4 bytes (u32be) - the message id (can be 0 to indicate to be ignored)
* - ACK is 4 bytes (u32be) - the acknowledged message id (can be 0 to indicate to be ignored)
* - DATA_LENGTH is 4 bytes (u32be) - the length in bytes of DATA
*
* [bodyLen|message]
* [header^|data^^^]
* [u32be^^|buffer^]
* Only Regular messages are counted, other messages are not counted, nor acknowledged.
*/
export class Protocol implements IDisposable, IMessagePassingProtocol {
private static readonly _headerLen = 4;
private _socket: Socket;
private _socketWriter: ProtocolWriter;
private _socketReader: ProtocolReader;
private _isDisposed: boolean;
private _incomingData: ChunkStream;
private _socketDataListener: (data: Buffer) => void;
private _socketEndListener: () => void;
private _socketCloseListener: () => void;
private _onMessage = new Emitter<Buffer>();
@@ -120,72 +355,25 @@ export class Protocol implements IDisposable, IMessagePassingProtocol {
private _onClose = new Emitter<void>();
readonly onClose: Event<void> = this._onClose.event;
constructor(private _socket: Socket) {
this._isDisposed = false;
this._incomingData = new ChunkStream();
constructor(socket: Socket) {
this._socket = socket;
this._socketWriter = new ProtocolWriter(this._socket, 0);
this._socketReader = new ProtocolReader(this._socket);
const state = {
readHead: true,
bodyLen: -1,
};
const acceptChunk = (data: Buffer) => {
this._incomingData.acceptChunk(data);
while (this._incomingData.byteLength > 0) {
if (state.readHead) {
// expecting header -> read header
if (this._incomingData.byteLength >= Protocol._headerLen) {
state.bodyLen = this._incomingData.readUInt32BE();
state.readHead = false;
} else {
break;
}
}
if (!state.readHead) {
// expecting body -> read bodyLen-bytes for
// the actual message or wait for more data
if (this._incomingData.byteLength >= state.bodyLen) {
const buffer = this._incomingData.read(state.bodyLen);
state.bodyLen = -1;
state.readHead = true;
this._onMessage.fire(buffer);
if (this._isDisposed) {
// check if an event listener lead to our disposal
break;
}
} else {
break;
}
}
this._socketReader.onMessage((msg) => {
if (msg.type === ProtocolMessageType.Regular) {
this._onMessage.fire(msg.data);
}
};
this._socketDataListener = (data: Buffer) => {
acceptChunk(data);
};
_socket.on('data', this._socketDataListener);
this._socketEndListener = () => {
};
_socket.on('end', this._socketEndListener);
});
this._socketCloseListener = () => {
this._onClose.fire();
};
_socket.once('close', this._socketCloseListener);
this._socket.once('close', this._socketCloseListener);
}
dispose(): void {
this._isDisposed = true;
this._socket.removeListener('data', this._socketDataListener);
this._socket.removeListener('end', this._socketEndListener);
this._socketReader.dispose();
this._socket.removeListener('close', this._socketCloseListener);
}
@@ -193,51 +381,8 @@ export class Protocol implements IDisposable, IMessagePassingProtocol {
this._socket.end();
}
readEntireBuffer(): Buffer {
return this._incomingData.read(this._incomingData.byteLength);
}
send(buffer: Buffer): void {
const header = Buffer.allocUnsafe(Protocol._headerLen);
header.writeUInt32BE(buffer.length, 0, true);
this._writeSoon(header, buffer);
}
private _writeBuffer = new class {
private _data: Buffer[] = [];
private _totalLength = 0;
add(head: Buffer, body: Buffer): boolean {
const wasEmpty = this._totalLength === 0;
this._data.push(head, body);
this._totalLength += head.length + body.length;
return wasEmpty;
}
take(): Buffer {
const ret = Buffer.concat(this._data, this._totalLength);
this._data.length = 0;
this._totalLength = 0;
return ret;
}
};
private _writeSoon(header: Buffer, data: Buffer): void {
if (this._writeBuffer.add(header, data)) {
setImmediate(() => {
// return early if socket has been destroyed in the meantime
if (this._socket.destroyed) {
return;
}
// we ignore the returned value from `write` because we would have to cached the data
// anyways and nodejs is already doing that for us:
// > https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback
// > However, the false return value is only advisory and the writable stream will unconditionally
// > accept and buffer chunk even if it has not not been allowed to drain.
this._socket.write(this._writeBuffer.take());
});
}
this._socketWriter.write(new ProtocolMessage(ProtocolMessageType.Regular, 0, 0, buffer));
}
}
@@ -276,13 +421,14 @@ export class Client<TContext = string> extends IPCClient<TContext> {
get onClose(): Event<void> { return this.protocol.onClose; }
constructor(private protocol: Protocol | BufferedProtocol, id: TContext) {
constructor(private protocol: Protocol | PersistentProtocol, id: TContext) {
super(protocol, id);
}
dispose(): void {
super.dispose();
this.protocol.end();
this.protocol.dispose();
}
}
@@ -355,26 +501,396 @@ function createBufferedEvent<T>(source: Event<T>): Event<T> {
return emitter.event;
}
/**
* Will ensure no messages are lost if there are no event listeners.
*/
export class BufferedProtocol implements IMessagePassingProtocol {
class QueueElement<T> {
public readonly data: T;
public next: QueueElement<T> | null;
private readonly _actual: Protocol;
public readonly onMessage: Event<Buffer>;
public readonly onClose: Event<void>;
constructor(actual: Protocol) {
this._actual = actual;
this.onMessage = createBufferedEvent(this._actual.onMessage);
this.onClose = createBufferedEvent(this._actual.onClose);
}
public send(buffer: Buffer): void {
this._actual.send(buffer);
}
public end(): void {
this._actual.end();
constructor(data: T) {
this.data = data;
this.next = null;
}
}
class Queue<T> {
private _first: QueueElement<T> | null;
private _last: QueueElement<T> | null;
constructor() {
this._first = null;
this._last = null;
}
public peek(): T | null {
if (!this._first) {
return null;
}
return this._first.data;
}
public toArray(): T[] {
let result: T[] = [], resultLen = 0;
let it = this._first;
while (it) {
result[resultLen++] = it.data;
it = it.next;
}
return result;
}
public pop(): void {
if (!this._first) {
return;
}
if (this._first === this._last) {
this._first = null;
this._last = null;
return;
}
this._first = this._first.next;
}
public push(item: T): void {
const element = new QueueElement(item);
if (!this._first) {
this._first = element;
this._last = element;
return;
}
this._last!.next = element;
this._last = element;
}
}
/**
* Same as Protocol, but will actually track messages and acks.
* Moreover, it will ensure no messages are lost if there are no event listeners.
*/
export class PersistentProtocol {
private _logFile: number;
private _isReconnecting: boolean;
private _outgoingUnackMsg: Queue<ProtocolMessage>;
private _outgoingMsgId: number;
private _outgoingAckId: number;
private _outgoingAckTimeout: NodeJS.Timeout | null;
private _incomingMsgId: number;
private _incomingAckId: number;
private _incomingMsgLastTime: number;
private _incomingAckTimeout: NodeJS.Timeout | null;
private _outgoingKeepAliveTimeout: NodeJS.Timeout | null;
private _incomingKeepAliveTimeout: NodeJS.Timeout | null;
private _socket: Socket;
private _socketWriter: ProtocolWriter;
private _socketReader: ProtocolReader;
private _socketReaderListener: IDisposable;
private readonly _socketCloseListener: () => void;
private readonly _socketEndListener: () => void;
private readonly _socketErrorListener: (err: any) => void;
private _onControlMessage = new Emitter<Buffer>();
readonly onControlMessage: Event<Buffer> = createBufferedEvent(this._onControlMessage.event);
private _onMessage = new Emitter<Buffer>();
readonly onMessage: Event<Buffer> = createBufferedEvent(this._onMessage.event);
private _onClose = new Emitter<void>();
readonly onClose: Event<void> = createBufferedEvent(this._onClose.event);
private _onSocketClose = new Emitter<void>();
readonly onSocketClose: Event<void> = createBufferedEvent(this._onSocketClose.event);
private _onSocketTimeout = new Emitter<void>();
readonly onSocketTimeout: Event<void> = createBufferedEvent(this._onSocketTimeout.event);
public get unacknowledgedCount(): number {
return this._outgoingMsgId - this._outgoingAckId;
}
constructor(socket: Socket, initialChunk: Buffer | null = null, logFileName: string | null = null) {
this._logFile = 0;
this._isReconnecting = false;
if (logFileName) {
console.log(`PersistentProtocol log file: ${logFileName}`);
this._logFile = fs.openSync(logFileName, 'a');
}
this._outgoingUnackMsg = new Queue<ProtocolMessage>();
this._outgoingMsgId = 0;
this._outgoingAckId = 0;
this._outgoingAckTimeout = null;
this._incomingMsgId = 0;
this._incomingAckId = 0;
this._incomingMsgLastTime = 0;
this._incomingAckTimeout = null;
this._outgoingKeepAliveTimeout = null;
this._incomingKeepAliveTimeout = null;
this._socketCloseListener = () => {
console.log(`socket triggered close event!`);
this._onSocketClose.fire();
};
this._socketEndListener = () => {
// received FIN
this._onClose.fire();
};
this._socketErrorListener = (err) => {
console.log(`socket had an error: `, err);
};
this._socket = socket;
this._socketWriter = new ProtocolWriter(this._socket, this._logFile);
this._socketReader = new ProtocolReader(this._socket);
this._socketReaderListener = this._socketReader.onMessage(msg => this._receiveMessage(msg));
this._socket.on('close', this._socketCloseListener);
this._socket.on('end', this._socketEndListener);
this._socket.on('error', this._socketErrorListener);
if (initialChunk) {
this._socketReader.acceptChunk(initialChunk);
}
this._sendKeepAliveCheck();
this._recvKeepAliveCheck();
}
dispose(): void {
if (this._outgoingAckTimeout) {
clearTimeout(this._outgoingAckTimeout);
this._outgoingAckTimeout = null;
}
if (this._incomingAckTimeout) {
clearTimeout(this._incomingAckTimeout);
this._incomingAckTimeout = null;
}
if (this._outgoingKeepAliveTimeout) {
clearTimeout(this._outgoingKeepAliveTimeout);
this._outgoingKeepAliveTimeout = null;
}
if (this._incomingKeepAliveTimeout) {
clearTimeout(this._incomingKeepAliveTimeout);
this._incomingKeepAliveTimeout = null;
}
if (this._logFile) {
fs.closeSync(this._logFile);
}
this._socketWriter.dispose();
this._socketReader.dispose();
this._socketReaderListener.dispose();
this._socket.removeListener('close', this._socketCloseListener);
this._socket.removeListener('end', this._socketEndListener);
this._socket.removeListener('error', this._socketErrorListener);
}
private _sendKeepAliveCheck(): void {
if (this._outgoingKeepAliveTimeout) {
// there will be a check in the near future
return;
}
const timeSinceLastOutgoingMsg = Date.now() - this._socketWriter.lastWriteTime;
if (timeSinceLastOutgoingMsg >= ProtocolConstants.KeepAliveTime) {
// sufficient time has passed since last message was written,
// and no message from our side needed to be sent in the meantime,
// so we will send a message containing only a keep alive.
const msg = new ProtocolMessage(ProtocolMessageType.KeepAlive, 0, 0, EMPTY_BUFFER);
this._socketWriter.write(msg);
this._sendKeepAliveCheck();
return;
}
this._outgoingKeepAliveTimeout = setTimeout(() => {
this._outgoingKeepAliveTimeout = null;
this._sendKeepAliveCheck();
}, ProtocolConstants.KeepAliveTime - timeSinceLastOutgoingMsg + 5);
}
private _recvKeepAliveCheck(): void {
if (this._incomingKeepAliveTimeout) {
// there will be a check in the near future
return;
}
const timeSinceLastIncomingMsg = Date.now() - this._socketReader.lastReadTime;
if (timeSinceLastIncomingMsg >= ProtocolConstants.KeepAliveTimeoutTime) {
// Trash the socket
this._onSocketTimeout.fire(undefined);
return;
}
this._incomingKeepAliveTimeout = setTimeout(() => {
this._incomingKeepAliveTimeout = null;
this._recvKeepAliveCheck();
}, ProtocolConstants.KeepAliveTimeoutTime - timeSinceLastIncomingMsg + 5);
}
public getSocket(): Socket {
return this._socket;
}
public beginAcceptReconnection(socket: Socket, initialDataChunk: Buffer | null): void {
this._isReconnecting = true;
this._socketWriter.dispose();
this._socketReader.dispose();
this._socketReaderListener.dispose();
this._socket.removeListener('close', this._socketCloseListener);
this._socket.removeListener('end', this._socketEndListener);
this._socket.removeListener('error', this._socketErrorListener);
this._socket = socket;
this._socketWriter = new ProtocolWriter(this._socket, this._logFile);
this._socketReader = new ProtocolReader(this._socket);
this._socketReaderListener = this._socketReader.onMessage(msg => this._receiveMessage(msg));
this._socketReader.acceptChunk(initialDataChunk);
this._socket.on('close', this._socketCloseListener);
this._socket.on('end', this._socketEndListener);
this._socket.on('error', this._socketErrorListener);
}
public endAcceptReconnection(): void {
this._isReconnecting = false;
// Send again all unacknowledged messages
const toSend = this._outgoingUnackMsg.toArray();
for (let i = 0, len = toSend.length; i < len; i++) {
this._socketWriter.write(toSend[i]);
}
this._recvAckCheck();
this._sendKeepAliveCheck();
this._recvKeepAliveCheck();
}
private _receiveMessage(msg: ProtocolMessage): void {
if (this._logFile) {
log(this._logFile, `recv-${ProtocolMessageTypeToString(msg.type)}-${msg.id}-${msg.ack}-`, msg.data);
}
if (msg.ack > this._outgoingAckId) {
this._outgoingAckId = msg.ack;
do {
const first = this._outgoingUnackMsg.peek();
if (first && first.id <= msg.ack) {
// this message has been confirmed, remove it
this._outgoingUnackMsg.pop();
} else {
break;
}
} while (true);
}
if (msg.type === ProtocolMessageType.Regular) {
if (msg.id > this._incomingMsgId) {
if (msg.id !== this._incomingMsgId + 1) {
console.error(`PROTOCOL CORRUPTION, LAST SAW MSG ${this._incomingMsgId} AND HAVE NOW RECEIVED MSG ${msg.id}`);
}
this._incomingMsgId = msg.id;
this._incomingMsgLastTime = Date.now();
this._sendAckCheck();
this._onMessage.fire(msg.data);
}
} else if (msg.type === ProtocolMessageType.Control) {
this._onControlMessage.fire(msg.data);
}
}
end(): void {
this._socket.end();
}
readEntireBuffer(): Buffer {
return this._socketReader.readEntireBuffer();
}
flush(): void {
this._socketWriter.flush();
}
send(buffer: Buffer): void {
const myId = ++this._outgoingMsgId;
this._incomingAckId = this._incomingMsgId;
const msg = new ProtocolMessage(ProtocolMessageType.Regular, myId, this._incomingAckId, buffer);
this._outgoingUnackMsg.push(msg);
if (!this._isReconnecting) {
this._socketWriter.write(msg);
this._recvAckCheck();
}
}
/**
* Send a message which will not be part of the regular acknowledge flow.
* Use this for early control messages which are repeated in case of reconnection.
*/
sendControl(buffer: Buffer): void {
const msg = new ProtocolMessage(ProtocolMessageType.Control, 0, 0, buffer);
this._socketWriter.write(msg);
}
private _sendAckCheck(): void {
if (this._incomingMsgId <= this._incomingAckId) {
// nothink to acknowledge
return;
}
if (this._incomingAckTimeout) {
// there will be a check in the near future
return;
}
const timeSinceLastIncomingMsg = Date.now() - this._incomingMsgLastTime;
if (timeSinceLastIncomingMsg >= ProtocolConstants.AcknowledgeTime) {
// sufficient time has passed since this message has been received,
// and no message from our side needed to be sent in the meantime,
// so we will send a message containing only an ack.
this._sendAck();
return;
}
this._incomingAckTimeout = setTimeout(() => {
this._incomingAckTimeout = null;
this._sendAckCheck();
}, ProtocolConstants.AcknowledgeTime - timeSinceLastIncomingMsg + 5);
}
private _recvAckCheck(): void {
if (this._outgoingMsgId <= this._outgoingAckId) {
// everything has been acknowledged
return;
}
if (this._outgoingAckTimeout) {
// there will be a check in the near future
return;
}
const oldestUnacknowledgedMsg = this._outgoingUnackMsg.peek()!;
const timeSinceOldestUnacknowledgedMsg = Date.now() - oldestUnacknowledgedMsg.writtenTime;
if (timeSinceOldestUnacknowledgedMsg >= ProtocolConstants.AcknowledgeTimeoutTime) {
// Trash the socket
this._onSocketTimeout.fire(undefined);
return;
}
this._outgoingAckTimeout = setTimeout(() => {
this._outgoingAckTimeout = null;
this._recvAckCheck();
}, ProtocolConstants.AcknowledgeTimeoutTime - timeSinceOldestUnacknowledgedMsg + 5);
}
private _sendAck(): void {
if (this._incomingMsgId <= this._incomingAckId) {
// nothink to acknowledge
return;
}
this._incomingAckId = this._incomingMsgId;
const msg = new ProtocolMessage(ProtocolMessageType.Ack, 0, this._incomingAckId, EMPTY_BUFFER);
this._socketWriter.write(msg);
}
}

View File

@@ -6,68 +6,143 @@
import * as assert from 'assert';
import { Socket } from 'net';
import { EventEmitter } from 'events';
import { Protocol } from 'vs/base/parts/ipc/node/ipc.net';
import { Protocol, PersistentProtocol } from 'vs/base/parts/ipc/node/ipc.net';
class MockDuplex extends EventEmitter {
class MessageStream {
private _cache: Buffer[] = [];
private _currentComplete: ((data: Buffer) => void) | null;
private _messages: Buffer[];
readonly destroyed = false;
constructor(x: Protocol | PersistentProtocol) {
this._currentComplete = null;
this._messages = [];
x.onMessage(data => {
this._messages.push(data);
this._trigger();
});
}
private _deliver(): void {
if (this._cache.length) {
const data = Buffer.concat(this._cache);
this._cache.length = 0;
this.emit('data', data);
private _trigger(): void {
if (!this._currentComplete) {
return;
}
if (this._messages.length === 0) {
return;
}
const complete = this._currentComplete;
const msg = this._messages.shift()!;
this._currentComplete = null;
complete(msg);
}
public waitForOne(): Promise<Buffer> {
return new Promise<Buffer>((complete) => {
this._currentComplete = complete;
this._trigger();
});
}
}
class EtherStream extends EventEmitter {
constructor(
private readonly _ether: Ether,
private readonly _name: 'a' | 'b'
) {
super();
}
write(data: Buffer, cb?: Function): boolean {
this._cache.push(data);
setImmediate(() => this._deliver());
this._ether.write(this._name, data);
return true;
}
}
class Ether {
private readonly _a: EtherStream;
private readonly _b: EtherStream;
private _ab: Buffer[];
private _ba: Buffer[];
public get a(): Socket {
return <any>this._a;
}
public get b(): Socket {
return <any>this._b;
}
constructor() {
this._a = new EtherStream(this, 'a');
this._b = new EtherStream(this, 'b');
this._ab = [];
this._ba = [];
}
public write(from: 'a' | 'b', data: Buffer): void {
if (from === 'a') {
this._ab.push(data);
} else {
this._ba.push(data);
}
setImmediate(() => this._deliver());
}
private _deliver(): void {
if (this._ab.length > 0) {
const data = Buffer.concat(this._ab);
this._ab.length = 0;
this._b.emit('data', data);
setImmediate(() => this._deliver());
return;
}
if (this._ba.length > 0) {
const data = Buffer.concat(this._ba);
this._ba.length = 0;
this._a.emit('data', data);
setImmediate(() => this._deliver());
return;
}
}
}
suite('IPC, Socket Protocol', () => {
let stream: Socket;
let ether: Ether;
setup(() => {
stream = <any>new MockDuplex();
ether = new Ether();
});
test('read/write', async () => {
const a = new Protocol(stream);
const b = new Protocol(stream);
const a = new Protocol(ether.a);
const b = new Protocol(ether.b);
const bMessages = new MessageStream(b);
await new Promise(resolve => {
const sub = b.onMessage(data => {
sub.dispose();
assert.equal(data.toString(), 'foobarfarboo');
resolve(undefined);
});
a.send(Buffer.from('foobarfarboo'));
});
return new Promise(resolve => {
const sub_1 = b.onMessage(data => {
sub_1.dispose();
assert.equal(data.readInt8(0), 123);
resolve(undefined);
});
const buffer = Buffer.allocUnsafe(1);
buffer.writeInt8(123, 0);
a.send(buffer);
});
a.send(Buffer.from('foobarfarboo'));
const msg1 = await bMessages.waitForOne();
assert.equal(msg1.toString(), 'foobarfarboo');
const buffer = Buffer.allocUnsafe(1);
buffer.writeInt8(123, 0);
a.send(buffer);
const msg2 = await bMessages.waitForOne();
assert.equal(msg2.readInt8(0), 123);
});
test('read/write, object data', () => {
test('read/write, object data', async () => {
const a = new Protocol(stream);
const b = new Protocol(stream);
const a = new Protocol(ether.a);
const b = new Protocol(ether.b);
const bMessages = new MessageStream(b);
const data = {
pi: Math.PI,
@@ -77,12 +152,68 @@ suite('IPC, Socket Protocol', () => {
};
a.send(Buffer.from(JSON.stringify(data)));
const msg = await bMessages.waitForOne();
assert.deepEqual(JSON.parse(msg.toString()), data);
});
return new Promise(resolve => {
b.onMessage(msg => {
assert.deepEqual(JSON.parse(msg.toString()), data);
resolve(undefined);
});
});
});
suite('PersistentProtocol reconnection', () => {
let ether: Ether;
setup(() => {
ether = new Ether();
});
test('acks get piggybacked with messages', async () => {
const a = new PersistentProtocol(ether.a);
const aMessages = new MessageStream(a);
const b = new PersistentProtocol(ether.b);
const bMessages = new MessageStream(b);
a.send(Buffer.from('a1'));
assert.equal(a.unacknowledgedCount, 1);
assert.equal(b.unacknowledgedCount, 0);
a.send(Buffer.from('a2'));
assert.equal(a.unacknowledgedCount, 2);
assert.equal(b.unacknowledgedCount, 0);
a.send(Buffer.from('a3'));
assert.equal(a.unacknowledgedCount, 3);
assert.equal(b.unacknowledgedCount, 0);
const a1 = await bMessages.waitForOne();
assert.equal(a1.toString(), 'a1');
assert.equal(a.unacknowledgedCount, 3);
assert.equal(b.unacknowledgedCount, 0);
const a2 = await bMessages.waitForOne();
assert.equal(a2.toString(), 'a2');
assert.equal(a.unacknowledgedCount, 3);
assert.equal(b.unacknowledgedCount, 0);
const a3 = await bMessages.waitForOne();
assert.equal(a3.toString(), 'a3');
assert.equal(a.unacknowledgedCount, 3);
assert.equal(b.unacknowledgedCount, 0);
b.send(Buffer.from('b1'));
assert.equal(a.unacknowledgedCount, 3);
assert.equal(b.unacknowledgedCount, 1);
const b1 = await aMessages.waitForOne();
assert.equal(b1.toString(), 'b1');
assert.equal(a.unacknowledgedCount, 0);
assert.equal(b.unacknowledgedCount, 1);
a.send(Buffer.from('a4'));
assert.equal(a.unacknowledgedCount, 1);
assert.equal(b.unacknowledgedCount, 1);
const b2 = await bMessages.waitForOne();
assert.equal(b2.toString(), 'a4');
assert.equal(a.unacknowledgedCount, 1);
assert.equal(b.unacknowledgedCount, 0);
});
});

View File

@@ -55,7 +55,7 @@ import { LogLevelSetterChannel } from 'vs/platform/log/node/logIpc';
import * as errors from 'vs/base/common/errors';
import { ElectronURLListener } from 'vs/platform/url/electron-main/electronUrlListener';
import { serve as serveDriver } from 'vs/platform/driver/electron-main/driver';
import { connectRemoteAgentManagement } from 'vs/platform/remote/node/remoteAgentConnection';
import { connectRemoteAgentManagement, ManagementPersistentConnection } from 'vs/platform/remote/node/remoteAgentConnection';
import { IMenubarService } from 'vs/platform/menubar/common/menubar';
import { MenubarService } from 'vs/platform/menubar/electron-main/menubarService';
import { MenubarChannel } from 'vs/platform/menubar/node/menubarIpc';
@@ -650,26 +650,27 @@ export class CodeApplication extends Disposable {
class ActiveConnection {
private readonly _authority: string;
private readonly _client: Promise<Client<RemoteAgentConnectionContext>>;
private readonly _connection: Promise<ManagementPersistentConnection>;
private readonly _disposeRunner: RunOnceScheduler;
constructor(authority: string, host: string, port: number) {
this._authority = authority;
this._client = connectRemoteAgentManagement(authority, host, port, `main`, isBuilt);
this._connection = connectRemoteAgentManagement(authority, host, port, `main`, isBuilt);
this._disposeRunner = new RunOnceScheduler(() => this.dispose(), 5000);
}
dispose(): void {
this._disposeRunner.dispose();
connectionPool.delete(this._authority);
this._client.then((connection) => {
this._connection.then((connection) => {
connection.dispose();
});
}
getClient(): Promise<Client<RemoteAgentConnectionContext>> {
async getClient(): Promise<Client<RemoteAgentConnectionContext>> {
this._disposeRunner.schedule();
return this._client;
const connection = await this._connection;
return connection.client;
}
}
@@ -734,4 +735,3 @@ export class CodeApplication extends Disposable {
});
}
}

View File

@@ -422,7 +422,7 @@ export class WindowsManager implements IWindowsMainService {
// When run with --wait, make sure we keep the paths to wait for
if (fileInputs && openConfig.cli.wait && openConfig.cli.waitMarkerFilePath) {
fileInputs.filesToWait = { paths: [...fileInputs.filesToDiff, ...fileInputs.filesToOpen, ...fileInputs.filesToCreate], waitMarkerFilePath: openConfig.cli.waitMarkerFilePath };
fileInputs.filesToWait = { paths: [...fileInputs.filesToDiff, ...fileInputs.filesToOpen, ...fileInputs.filesToCreate], waitMarkerFileUri: URI.file(openConfig.cli.waitMarkerFilePath) };
}
//

View File

@@ -1270,6 +1270,7 @@ export interface CommentThread2 {
onDidChangeInput: Event<CommentInput | undefined>;
acceptInputCommand?: Command;
additionalCommands: Command[];
deleteCommand?: Command;
onDidChangeAcceptInputCommand: Event<Command>;
onDidChangeAdditionalCommands: Event<Command[]>;
onDidChangeRange: Event<IRange>;
@@ -1285,7 +1286,7 @@ export interface CommentingRanges {
readonly resource: URI;
ranges: IRange[];
newCommentThreadCommand?: Command;
newCommentThreadCallback?: (uri: UriComponents, range: IRange) => void;
newCommentThreadCallback?: (uri: UriComponents, range: IRange) => Promise<void>;
}
/**

View File

@@ -23,7 +23,7 @@ import { HoverOperation, HoverStartMode, IHoverComputer } from 'vs/editor/contri
import { ContentHoverWidget } from 'vs/editor/contrib/hover/hoverWidgets';
import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { coalesce, isNonEmptyArray } from 'vs/base/common/arrays';
import { coalesce, isNonEmptyArray, asArray } from 'vs/base/common/arrays';
import { IMarker, IMarkerData, MarkerSeverity } from 'vs/platform/markers/common/markers';
import { basename } from 'vs/base/common/resources';
import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDecorationService';
@@ -148,16 +148,7 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
return null;
}
let contents: IMarkdownString[] = [];
if (d.options.hoverMessage) {
if (Array.isArray(d.options.hoverMessage)) {
contents = [...d.options.hoverMessage];
} else {
contents = [d.options.hoverMessage];
}
}
const contents: IMarkdownString[] = d.options.hoverMessage ? asArray(d.options.hoverMessage) : [];
return { contents, range };
}
});

View File

@@ -12,6 +12,7 @@ import { GlyphHoverWidget } from 'vs/editor/contrib/hover/hoverWidgets';
import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IOpenerService, NullOpenerService } from 'vs/platform/opener/common/opener';
import { asArray } from 'vs/base/common/arrays';
export interface IHoverMessage {
value: IMarkdownString;
@@ -62,11 +63,7 @@ class MarginComputer implements IHoverComputer<IHoverMessage[]> {
continue;
}
if (Array.isArray(hoverMessage)) {
result.push(...hoverMessage.map(toHoverMessage));
} else {
result.push(toHoverMessage(hoverMessage));
}
result.push(...asArray(hoverMessage).map(toHoverMessage));
}
return result;

View File

@@ -11,6 +11,7 @@ import { registerLanguageCommand } from 'vs/editor/browser/editorExtensions';
import { DocumentSymbol, DocumentSymbolProviderRegistry } from 'vs/editor/common/modes';
import { IModelService } from 'vs/editor/common/services/modelService';
import { CancellationToken } from 'vs/base/common/cancellation';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
export function getDocumentSymbols(model: ITextModel, flat: boolean, token: CancellationToken): Promise<DocumentSymbol[]> {
@@ -70,8 +71,20 @@ registerLanguageCommand('_executeDocumentSymbolProvider', function (accessor, ar
throw illegalArgument('resource');
}
const model = accessor.get(IModelService).getModel(resource);
if (!model) {
throw illegalArgument('resource');
if (model) {
return getDocumentSymbols(model, false, CancellationToken.None);
}
return getDocumentSymbols(model, false, CancellationToken.None);
return accessor.get(ITextModelService).createModelReference(resource).then(reference => {
return new Promise((resolve, reject) => {
try {
const result = getDocumentSymbols(reference.object.textEditorModel, false, CancellationToken.None);
resolve(result);
} catch (err) {
reject(err);
}
}).finally(() => {
reference.dispose();
});
});
});

View File

@@ -28,26 +28,18 @@ export interface IResourceEncoding {
export interface IFileService {
_serviceBrand: any;
/**
* Helper to determine read/write encoding for resources.
*/
encoding: IResourceEncodings;
/**
* Allows to listen for file changes. The event will fire for every file within the opened workspace
* (if any) as well as all files that have been watched explicitly using the #watchFileChanges() API.
*/
onFileChanges: Event<FileChangesEvent>;
/**
* An event that is fired upon successful completion of a certain file operation.
*/
onAfterOperation: Event<FileOperationEvent>;
//#region File System Provider
/**
* An event that is fired when a file system provider is added or removed
*/
onDidChangeFileSystemProviderRegistrations: Event<IFileSystemProviderRegistrationEvent>;
readonly onDidChangeFileSystemProviderRegistrations: Event<IFileSystemProviderRegistrationEvent>;
/**
* An event that is fired when a file system provider is about to be activated. Listeners
* can join this event with a long running promise to help in the activation process.
*/
readonly onWillActivateFileSystemProvider: Event<IFileSystemProviderActivationEvent>;
/**
* Registers a file system provider for a certain scheme.
@@ -64,6 +56,24 @@ export interface IFileService {
*/
canHandleResource(resource: URI): boolean;
//#endregion
/**
* Helper to determine read/write encoding for resources.
*/
encoding: IResourceEncodings;
/**
* Allows to listen for file changes. The event will fire for every file within the opened workspace
* (if any) as well as all files that have been watched explicitly using the #watchFileChanges() API.
*/
readonly onFileChanges: Event<FileChangesEvent>;
/**
* An event that is fired upon successful completion of a certain file operation.
*/
readonly onAfterOperation: Event<FileOperationEvent>;
/**
* Resolve the properties of a file identified by the resource.
*
@@ -129,12 +139,6 @@ export interface IFileService {
*/
createFile(resource: URI, content?: string, options?: ICreateFileOptions): Promise<IFileStat>;
/**
* Reads a folder's content with the given path. The returned promise
* will have the list of children as a result.
*/
readFolder(resource: URI): Promise<string[]>;
/**
* Creates a new folder with the given path. The returned promise
* will have the stat model object as a result.
@@ -234,12 +238,88 @@ export interface IFileSystemProvider {
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
}
export enum FileSystemProviderErrorCode {
FileExists = 'EntryExists',
FileNotFound = 'EntryNotFound',
FileNotADirectory = 'EntryNotADirectory',
FileIsADirectory = 'EntryIsADirectory',
NoPermissions = 'NoPermissions',
Unavailable = 'Unavailable'
}
export class FileSystemProviderError extends Error {
constructor(message: string, public readonly code?: FileSystemProviderErrorCode) {
super(message);
}
}
export function createFileSystemProviderError(error: Error, code?: FileSystemProviderErrorCode): FileSystemProviderError {
const providerError = new FileSystemProviderError(error.toString(), code);
markAsFileSystemProviderError(providerError);
return providerError;
}
export function markAsFileSystemProviderError(error: Error, code?: FileSystemProviderErrorCode): Error {
error.name = code ? `${code} (FileSystemError)` : `FileSystemError`;
return error;
}
export function toFileSystemProviderErrorCode(error: Error): FileSystemProviderErrorCode | undefined {
// FileSystemProviderError comes with the code
if (error instanceof FileSystemProviderError) {
return error.code;
}
// Any other error, check for name match by assuming that the error
// went through the markAsFileSystemProviderError() method
const match = /^(.+) \(FileSystemError\)$/.exec(error.name);
if (!match) {
return undefined;
}
switch (match[1]) {
case FileSystemProviderErrorCode.FileExists: return FileSystemProviderErrorCode.FileExists;
case FileSystemProviderErrorCode.FileIsADirectory: return FileSystemProviderErrorCode.FileIsADirectory;
case FileSystemProviderErrorCode.FileNotADirectory: return FileSystemProviderErrorCode.FileNotADirectory;
case FileSystemProviderErrorCode.FileNotFound: return FileSystemProviderErrorCode.FileNotFound;
case FileSystemProviderErrorCode.NoPermissions: return FileSystemProviderErrorCode.NoPermissions;
case FileSystemProviderErrorCode.Unavailable: return FileSystemProviderErrorCode.Unavailable;
}
return undefined;
}
export function toFileOperationResult(error: Error): FileOperationResult {
switch (toFileSystemProviderErrorCode(error)) {
case FileSystemProviderErrorCode.FileNotFound:
return FileOperationResult.FILE_NOT_FOUND;
case FileSystemProviderErrorCode.FileIsADirectory:
return FileOperationResult.FILE_IS_DIRECTORY;
case FileSystemProviderErrorCode.NoPermissions:
return FileOperationResult.FILE_PERMISSION_DENIED;
case FileSystemProviderErrorCode.FileExists:
return FileOperationResult.FILE_MOVE_CONFLICT;
case FileSystemProviderErrorCode.FileNotADirectory:
default:
return FileOperationResult.FILE_OTHER_ERROR;
}
}
export interface IFileSystemProviderRegistrationEvent {
added: boolean;
scheme: string;
provider?: IFileSystemProvider;
}
export interface IFileSystemProviderActivationEvent {
scheme: string;
join(promise: Promise<void>): void;
}
export const enum FileOperation {
CREATE,
DELETE,
@@ -655,7 +735,8 @@ export const enum FileOperationResult {
FILE_PERMISSION_DENIED,
FILE_TOO_LARGE,
FILE_INVALID_PATH,
FILE_EXCEED_MEMORY_LIMIT
FILE_EXCEED_MEMORY_LIMIT,
FILE_OTHER_ERROR
}
export const AutoSaveConfiguration = {
@@ -942,3 +1023,38 @@ export enum FileKind {
export const MIN_MAX_MEMORY_SIZE_MB = 2048;
export const FALLBACK_MAX_MEMORY_SIZE_MB = 4096;
// TODO@ben remove traces of legacy file service
export const ILegacyFileService = createDecorator<ILegacyFileService>('legacyFileService');
export interface ILegacyFileService {
_serviceBrand: any;
encoding: IResourceEncodings;
onFileChanges: Event<FileChangesEvent>;
onAfterOperation: Event<FileOperationEvent>;
resolveFile(resource: URI, options?: IResolveFileOptions): Promise<IFileStat>;
resolveFiles(toResolve: { resource: URI, options?: IResolveFileOptions }[]): Promise<IResolveFileResult[]>;
existsFile(resource: URI): Promise<boolean>;
resolveContent(resource: URI, options?: IResolveContentOptions): Promise<IContent>;
resolveStreamContent(resource: URI, options?: IResolveContentOptions): Promise<IStreamContent>;
updateContent(resource: URI, value: string | ITextSnapshot, options?: IUpdateContentOptions): Promise<IFileStat>;
moveFile(source: URI, target: URI, overwrite?: boolean): Promise<IFileStat>;
copyFile(source: URI, target: URI, overwrite?: boolean): Promise<IFileStat>;
createFile(resource: URI, content?: string, options?: ICreateFileOptions): Promise<IFileStat>;
del(resource: URI, options?: { useTrash?: boolean, recursive?: boolean }): Promise<void>;
watchFileChanges(resource: URI): void;
unwatchFileChanges(resource: URI): void;
}

View File

@@ -3,26 +3,58 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Client, BufferedProtocol } from 'vs/base/parts/ipc/node/ipc.net';
import { Client, PersistentProtocol } from 'vs/base/parts/ipc/node/ipc.net';
import { RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment';
export function connectRemoteAgentManagement(remoteAuthority: string, host: string, port: number, clientId: string, isBuilt: boolean): Promise<Client<RemoteAgentConnectionContext>> {
throw new Error(`Not implemented`);
}
export interface IExtensionHostConnectionResult {
protocol: BufferedProtocol;
debugPort?: number;
}
import { Disposable } from 'vs/base/common/lifecycle';
export interface IRemoteExtensionHostStartParams {
language: string;
debugId?: string;
break: boolean;
port: number | null;
break?: boolean;
port?: number | null;
updatePort?: boolean;
}
export function connectRemoteAgentExtensionHost(host: string, port: number, startArguments: IRemoteExtensionHostStartParams, isBuilt: boolean): Promise<IExtensionHostConnectionResult> {
export async function connectRemoteAgentManagement(remoteAuthority: string, host: string, port: number, clientId: string, isBuilt: boolean): Promise<ManagementPersistentConnection> {
throw new Error(`Not implemented`);
}
export async function connectRemoteAgentExtensionHost(host: string, port: number, startArguments: IRemoteExtensionHostStartParams, isBuilt: boolean): Promise<ExtensionHostPersistentConnection> {
throw new Error(`Not implemented`);
}
abstract class PersistentConnection extends Disposable {
public readonly reconnectionToken: string;
public readonly protocol: PersistentProtocol;
constructor(reconnectionToken: string, protocol: PersistentProtocol) {
super();
this.reconnectionToken = reconnectionToken;
this.protocol = protocol;
}
}
export class ManagementPersistentConnection extends PersistentConnection {
public readonly client: Client<RemoteAgentConnectionContext>;
constructor(remoteAuthority: string, host: string, port: number, clientId: string, isBuilt: boolean, reconnectionToken: string, protocol: PersistentProtocol) {
super(reconnectionToken, protocol);
this.client = this._register(new Client<RemoteAgentConnectionContext>(protocol, {
remoteAuthority: remoteAuthority,
clientId: clientId
}));
}
}
export class ExtensionHostPersistentConnection extends PersistentConnection {
public readonly debugPort: number | undefined;
constructor(host: string, port: number, startArguments: IRemoteExtensionHostStartParams, isBuilt: boolean, reconnectionToken: string, protocol: PersistentProtocol, debugPort: number | undefined) {
super(reconnectionToken, protocol);
this.debugPort = debugPort;
}
}

View File

@@ -340,11 +340,12 @@ export interface IPath extends IPathData {
export interface IPathsToWaitFor extends IPathsToWaitForData {
paths: IPath[];
waitMarkerFileUri: URI;
}
export interface IPathsToWaitForData {
paths: IPathData[];
waitMarkerFilePath: string;
waitMarkerFileUri: UriComponents;
}
export interface IPathData {

60
src/vs/vscode.d.ts vendored
View File

@@ -3784,6 +3784,48 @@ declare module 'vscode' {
provideFoldingRanges(document: TextDocument, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;
}
/**
* A selection range represents a part of a selection hierarchy. A selection range
* may have a parent selection range that contains it.
*/
export class SelectionRange {
/**
* The [range](#Range) of this selection range.
*/
range: Range;
/**
* The parent selection range containing this range.
*/
parent?: SelectionRange;
/**
* Creates a new selection range.
*
* @param range The range of the selection range.
* @param parent The parent of the selection range.
*/
constructor(range: Range, parent?: SelectionRange);
}
export interface SelectionRangeProvider {
/**
* Provide selection ranges for the given positions.
*
* Selection ranges should be computed individually and independend for each postion. The editor will merge
* and deduplicate ranges but providers must return hierarchies of selection ranges so that a range
* is [contained](#Range.contains) by its parent.
*
* @param document The document in which the command was invoked.
* @param positions The positions at which the command was invoked.
* @param token A cancellation token.
* @return Selection ranges or a thenable that resolves to such. The lack of a result can be
* signaled by returning `undefined` or `null`.
*/
provideSelectionRanges(document: TextDocument, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[]>;
}
/**
* A tuple of two characters, like a pair of
* opening and closing brackets.
@@ -6883,9 +6925,10 @@ declare module 'vscode' {
shellPath?: string;
/**
* Args for the custom shell executable, this does not work on Windows (see #8429)
* Args for the custom shell executable. A string can be used on Windows only which allows
* specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6).
*/
shellArgs?: string[];
shellArgs?: string[] | string;
/**
* A path or Uri for the current working directory to be used for the terminal.
@@ -8094,6 +8137,19 @@ declare module 'vscode' {
*/
export function registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable;
/**
* Register a selection range provider.
*
* Multiple providers can be registered for a language. In that case providers are asked in
* parallel and the results are merged. A failing provider (rejected promise or exception) will
* not cause a failure of the whole operation.
*
* @param selector A selector that defines the documents this provider is applicable to.
* @param provider A selection range provider.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable;
/**
* Set a [language configuration](#LanguageConfiguration) for a language.
*

View File

@@ -16,6 +16,46 @@
declare module 'vscode' {
//#region Joh - call hierarchy
export enum CallHierarchyDirection {
CallsFrom = 1,
CallsTo = 2,
}
export class CallHierarchyItem {
kind: SymbolKind;
name: string;
detail?: string;
uri: Uri;
range: Range;
selectionRange: Range;
constructor(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range, selectionRange: Range);
}
export interface CallHierarchyItemProvider {
provideCallHierarchyItem(
document: TextDocument,
postion: Position,
token: CancellationToken
): ProviderResult<CallHierarchyItem>;
resolveCallHierarchyItem(
item: CallHierarchyItem,
direction: CallHierarchyDirection,
token: CancellationToken
): ProviderResult<[CallHierarchyItem, Location[]][]>;
}
export namespace languages {
export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyItemProvider): Disposable;
}
//#endregion
//#region Alex - resolvers
export class ResolvedAuthority {
@@ -82,68 +122,6 @@ declare module 'vscode' {
//#endregion
//#region Joh - selection range provider
/**
* A selection range represents a part of a selection hierarchy. A selection range
* may have a parent selection range that contains it.
*/
export class SelectionRange {
/**
* The [range](#Range) of this selection range.
*/
range: Range;
/**
* The parent selection range containing this range.
*/
parent?: SelectionRange;
/**
* Creates a new selection range.
*
* @param range The range of the selection range.
* @param parent The parent of the selection range.
*/
constructor(range: Range, parent?: SelectionRange);
}
export interface SelectionRangeProvider {
/**
* Provide selection ranges for the given positions.
*
* Selection ranges should be computed individually and independend for each postion. The editor will merge
* and deduplicate ranges but providers must return hierarchies of selection ranges so that a range
* is [contained](#Range.contains) by its parent.
*
* @param document The document in which the command was invoked.
* @param positions The positions at which the command was invoked.
* @param token A cancellation token.
* @return Selection ranges or a thenable that resolves to such. The lack of a result can be
* signaled by returning `undefined` or `null`.
*/
provideSelectionRanges(document: TextDocument, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[]>;
}
export namespace languages {
/**
* Register a selection range provider.
*
* Multiple providers can be registered for a language. In that case providers are asked in
* parallel and the results are merged. A failing provider (rejected promise or exception) will
* not cause a failure of the whole operation.
*
* @param selector A selector that defines the documents this provider is applicable to.
* @param provider A selection range provider.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable;
}
//#endregion
//#region Joh - read/write in chunks
export interface FileSystemProvider {
@@ -820,6 +798,12 @@ declare module 'vscode' {
*/
collapsibleState?: CommentThreadCollapsibleState;
/**
* The command to be executed when users try to delete the comment thread. Currently, this is only called
* when the user collapses a comment thread that has no comments in it.
*/
deleteCommand?: Command;
/**
* Dispose this comment thread.
* Once disposed, the comment thread will be removed from visible text editors and Comments Panel.

View File

@@ -3,23 +3,28 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { clipboard } from 'electron';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainContext, MainThreadClipboardShape } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { MainContext, MainThreadClipboardShape } from '../common/extHost.protocol';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
@extHostNamedCustomer(MainContext.MainThreadClipboard)
export class MainThreadCommands implements MainThreadClipboardShape {
constructor(
_context: any,
@IClipboardService private readonly _clipboardService: IClipboardService,
) { }
dispose(): void {
// nothing
}
$readText(): Promise<string> {
return Promise.resolve(clipboard.readText());
return Promise.resolve(this._clipboardService.readText());
}
$writeText(value: string): Promise<void> {
clipboard.writeText(value);
this._clipboardService.writeText(value);
return Promise.resolve();
}
}

View File

@@ -5,8 +5,8 @@
import { ICommandService, CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
import { IDisposable } from 'vs/base/common/lifecycle';
import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape, MainContext, IExtHostContext } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape, MainContext, IExtHostContext } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { revive } from 'vs/base/common/marshalling';
@extHostNamedCustomer(MainContext.MainThreadCommands)

View File

@@ -8,8 +8,8 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import { Registry } from 'vs/platform/registry/common/platform';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope, getScopes } from 'vs/platform/configuration/common/configurationRegistry';
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { MainThreadConfigurationShape, MainContext, ExtHostContext, IExtHostContext, IWorkspaceConfigurationChangeEventData, IConfigurationInitData } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainThreadConfigurationShape, MainContext, ExtHostContext, IExtHostContext, IWorkspaceConfigurationChangeEventData, IConfigurationInitData } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ConfigurationTarget, IConfigurationChangeEvent, IConfigurationModel, IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';

View File

@@ -12,10 +12,10 @@ import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunc
import {
ExtHostContext, ExtHostDebugServiceShape, MainThreadDebugServiceShape, DebugSessionUUID, MainContext,
IExtHostContext, IBreakpointsDeltaDto, ISourceMultiBreakpointDto, ISourceBreakpointDto, IFunctionBreakpointDto, IDebugSessionDto
} from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
} from 'vs/workbench/api/common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import severity from 'vs/base/common/severity';
import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/node/debugAdapter';
import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter';
import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
import { convertToVSCPaths, convertToDAPaths } from 'vs/workbench/contrib/debug/common/debugUtils';
@@ -153,7 +153,6 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
return Promise.resolve();
}
public $registerDebugConfigurationProvider(debugType: string, hasProvide: boolean, hasResolve: boolean, hasProvideDebugAdapter: boolean, handle: number): Promise<void> {
const provider = <IDebugConfigurationProvider>{
@@ -384,4 +383,3 @@ class ExtensionHostDebugAdapter extends AbstractDebugAdapter {
}
// {{SQL CARBON EDIT}}
*/

View File

@@ -6,8 +6,8 @@
import { URI, UriComponents } from 'vs/base/common/uri';
import { Emitter } from 'vs/base/common/event';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { ExtHostContext, MainContext, IExtHostContext, MainThreadDecorationsShape, ExtHostDecorationsShape, DecorationData, DecorationRequest } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { ExtHostContext, MainContext, IExtHostContext, MainThreadDecorationsShape, ExtHostDecorationsShape, DecorationData, DecorationRequest } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IDecorationsService, IDecorationData } from 'vs/workbench/services/decorations/browser/decorations';
import { values } from 'vs/base/common/collections';
import { CancellationToken } from 'vs/base/common/cancellation';

View File

@@ -5,8 +5,8 @@
import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers';
import { URI, UriComponents } from 'vs/base/common/uri';
import { MainThreadDiagnosticsShape, MainContext, IExtHostContext } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainThreadDiagnosticsShape, MainContext, IExtHostContext } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
@extHostNamedCustomer(MainContext.MainThreadDiagnostics)
export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {

View File

@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import { URI } from 'vs/base/common/uri';
import { MainThreadDiaglogsShape, MainContext, IExtHostContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainThreadDiaglogsShape, MainContext, IExtHostContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { forEach } from 'vs/base/common/collections';
import { IFileDialogService, IOpenDialogOptions, ISaveDialogOptions } from 'vs/platform/dialogs/common/dialogs';

View File

@@ -13,8 +13,8 @@ import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerServ
import { IModelService } from 'vs/editor/common/services/modelService';
import { IModeService } from 'vs/editor/common/services/modeService';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { ExtHostContext, ExtHostDocumentContentProvidersShape, IExtHostContext, MainContext, MainThreadDocumentContentProvidersShape } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ExtHostContext, ExtHostDocumentContentProvidersShape, IExtHostContext, MainContext, MainThreadDocumentContentProvidersShape } from '../common/extHost.protocol';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
@extHostNamedCustomer(MainContext.MainThreadDocumentContentProviders)

View File

@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import { SerializedError, onUnexpectedError } from 'vs/base/common/errors';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainContext, MainThreadErrorsShape } from 'vs/workbench/api/node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { MainContext, MainThreadErrorsShape } from 'vs/workbench/api/common/extHost.protocol';
@extHostNamedCustomer(MainContext.MainThreadErrors)
export class MainThreadErrors implements MainThreadErrorsShape {

View File

@@ -7,8 +7,8 @@ import { Emitter, Event } from 'vs/base/common/event';
import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle';
import { URI } from 'vs/base/common/uri';
import { FileWriteOptions, FileSystemProviderCapabilities, IFileChange, IFileService, IFileSystemProvider, IStat, IWatchOptions, FileType, FileOverwriteOptions, FileDeleteOptions, FileOpenOptions } from 'vs/platform/files/common/files';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { ExtHostContext, ExtHostFileSystemShape, IExtHostContext, IFileChangeDto, MainContext, MainThreadFileSystemShape } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ExtHostContext, ExtHostFileSystemShape, IExtHostContext, IFileChangeDto, MainContext, MainThreadFileSystemShape } from '../common/extHost.protocol';
import { ResourceLabelFormatter, ILabelService } from 'vs/platform/label/common/label';
@extHostNamedCustomer(MainContext.MainThreadFileSystem)

View File

@@ -5,8 +5,8 @@
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { FileChangeType, IFileService, FileOperation } from 'vs/platform/files/common/files';
import { extHostCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { ExtHostContext, FileSystemEvents, IExtHostContext } from '../node/extHost.protocol';
import { extHostCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ExtHostContext, FileSystemEvents, IExtHostContext } from '../common/extHost.protocol';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
@extHostCustomer

View File

@@ -6,8 +6,8 @@
import { URI, UriComponents } from 'vs/base/common/uri';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IModelService } from 'vs/editor/common/services/modelService';
import { MainThreadLanguagesShape, MainContext, IExtHostContext } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainThreadLanguagesShape, MainContext, IExtHostContext } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
@extHostNamedCustomer(MainContext.MainThreadLanguages)
export class MainThreadLanguages implements MainThreadLanguagesShape {

View File

@@ -3,10 +3,10 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { extHostCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { extHostCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { ILogService } from 'vs/platform/log/common/log';
import { Disposable } from 'vs/base/common/lifecycle';
import { IExtHostContext, ExtHostContext } from 'vs/workbench/api/node/extHost.protocol';
import { IExtHostContext, ExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
@extHostCustomer
export class MainThreadLogService extends Disposable {

View File

@@ -6,8 +6,8 @@
import * as nls from 'vs/nls';
import Severity from 'vs/base/common/severity';
import { Action, IAction } from 'vs/base/common/actions';
import { MainThreadMessageServiceShape, MainContext, IExtHostContext, MainThreadMessageOptions } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainThreadMessageServiceShape, MainContext, IExtHostContext, MainThreadMessageOptions } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { Event } from 'vs/base/common/event';

View File

@@ -7,8 +7,8 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { IOutputService, IOutputChannel, OUTPUT_PANEL_ID, Extensions, IOutputChannelRegistry } from 'vs/workbench/contrib/output/common/output';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import { MainThreadOutputServiceShape, MainContext, IExtHostContext, ExtHostOutputServiceShape, ExtHostContext } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
import { MainThreadOutputServiceShape, MainContext, IExtHostContext, ExtHostOutputServiceShape, ExtHostContext } from '../common/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { UriComponents, URI } from 'vs/base/common/uri';
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
import { Event } from 'vs/base/common/event';

Some files were not shown because too many files have changed in this diff Show More