Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
8d0228f5
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d0228f5
编写于
3月 07, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jsdoc
💄
上级
59510ed5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
6 deletion
+17
-6
src/vs/code/electron-main/main.ts
src/vs/code/electron-main/main.ts
+2
-2
src/vs/code/node/cliProcessMain.ts
src/vs/code/node/cliProcessMain.ts
+2
-2
src/vs/platform/dialogs/common/dialogs.ts
src/vs/platform/dialogs/common/dialogs.ts
+6
-0
src/vs/platform/dialogs/node/dialogService.ts
src/vs/platform/dialogs/node/dialogService.ts
+1
-1
src/vs/platform/notification/common/notification.ts
src/vs/platform/notification/common/notification.ts
+5
-0
src/vs/workbench/services/notification/common/notificationService.ts
...bench/services/notification/common/notificationService.ts
+1
-1
未找到文件。
src/vs/code/electron-main/main.ts
浏览文件 @
8d0228f5
...
...
@@ -49,7 +49,7 @@ import { BufferLogService } from 'vs/platform/log/common/bufferLog';
import
{
uploadLogs
}
from
'
vs/code/electron-main/logUploader
'
;
import
{
setUnexpectedErrorHandler
}
from
'
vs/base/common/errors
'
;
import
{
IDialogService
}
from
'
vs/platform/dialogs/common/dialogs
'
;
import
{
DialogCLI
Service
}
from
'
vs/platform/dialogs/node/dialogService
'
;
import
{
CommandLineDialog
Service
}
from
'
vs/platform/dialogs/node/dialogService
'
;
function
createServices
(
args
:
ParsedArgs
,
bufferLogService
:
BufferLogService
):
IInstantiationService
{
const
services
=
new
ServiceCollection
();
...
...
@@ -73,7 +73,7 @@ function createServices(args: ParsedArgs, bufferLogService: BufferLogService): I
services
.
set
(
IRequestService
,
new
SyncDescriptor
(
RequestService
));
services
.
set
(
IURLService
,
new
SyncDescriptor
(
URLService
,
args
[
'
open-url
'
]
?
args
.
_urls
:
[]));
services
.
set
(
IBackupMainService
,
new
SyncDescriptor
(
BackupMainService
));
services
.
set
(
IDialogService
,
new
SyncDescriptor
(
DialogCLI
Service
));
services
.
set
(
IDialogService
,
new
SyncDescriptor
(
CommandLineDialog
Service
));
return
new
InstantiationService
(
services
,
true
);
}
...
...
src/vs/code/node/cliProcessMain.ts
浏览文件 @
8d0228f5
...
...
@@ -37,7 +37,7 @@ import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
import
{
ILogService
,
getLogLevel
}
from
'
vs/platform/log/common/log
'
;
import
{
isPromiseCanceledError
}
from
'
vs/base/common/errors
'
;
import
{
IDialogService
}
from
'
vs/platform/dialogs/common/dialogs
'
;
import
{
DialogCLI
Service
}
from
'
vs/platform/dialogs/node/dialogService
'
;
import
{
CommandLineDialog
Service
}
from
'
vs/platform/dialogs/node/dialogService
'
;
const
notFound
=
(
id
:
string
)
=>
localize
(
'
notFound
'
,
"
Extension '{0}' not found.
"
,
id
);
const
notInstalled
=
(
id
:
string
)
=>
localize
(
'
notInstalled
'
,
"
Extension '{0}' is not installed.
"
,
id
);
...
...
@@ -219,7 +219,7 @@ export function main(argv: ParsedArgs): TPromise<void> {
services
.
set
(
IRequestService
,
new
SyncDescriptor
(
RequestService
));
services
.
set
(
IExtensionManagementService
,
new
SyncDescriptor
(
ExtensionManagementService
));
services
.
set
(
IExtensionGalleryService
,
new
SyncDescriptor
(
ExtensionGalleryService
));
services
.
set
(
IDialogService
,
new
SyncDescriptor
(
DialogCLI
Service
));
services
.
set
(
IDialogService
,
new
SyncDescriptor
(
CommandLineDialog
Service
));
if
(
isBuilt
&&
!
extensionDevelopmentPath
&&
!
envService
.
args
[
'
disable-telemetry
'
]
&&
product
.
enableTelemetry
)
{
const
appenders
:
AppInsightsAppender
[]
=
[];
...
...
src/vs/platform/dialogs/common/dialogs.ts
浏览文件 @
8d0228f5
...
...
@@ -41,6 +41,12 @@ export interface IConfirmationResult {
export
const
IDialogService
=
createDecorator
<
IDialogService
>
(
'
dialogService
'
);
/**
* A service to bring up modal dialogs.
*
* Note: use the `INotificationService.prompt()` method for a non-modal way to ask
* the user for input.
*/
export
interface
IDialogService
{
_serviceBrand
:
any
;
...
...
src/vs/platform/dialogs/node/dialogService.ts
浏览文件 @
8d0228f5
...
...
@@ -9,7 +9,7 @@ import { IDialogService, IConfirmation, IConfirmationResult } from 'vs/platform/
import
Severity
from
'
vs/base/common/severity
'
;
import
{
localize
}
from
'
vs/nls
'
;
export
class
DialogCLI
Service
implements
IDialogService
{
export
class
CommandLineDialog
Service
implements
IDialogService
{
_serviceBrand
:
any
;
...
...
src/vs/platform/notification/common/notification.ts
浏览文件 @
8d0228f5
...
...
@@ -142,6 +142,11 @@ export interface SecondaryPromptChoice {
export
type
PromptOption
=
PrimaryPromptChoice
|
SecondaryPromptChoice
;
/**
* A service to bring up notifications and non-modal prompts.
*
* Note: use the `IDialogService` for a modal way to ask the user for input.
*/
export
interface
INotificationService
{
_serviceBrand
:
any
;
...
...
src/vs/workbench/services/notification/common/notificationService.ts
浏览文件 @
8d0228f5
...
...
@@ -68,7 +68,7 @@ export class NotificationService implements INotificationService {
public
prompt
(
severity
:
Severity
,
message
:
string
,
choices
:
PromptOption
[]):
TPromise
<
number
>
{
let
handle
:
INotificationHandle
;
const
promise
=
new
TPromise
<
number
>
(
(
c
,
e
)
=>
{
const
promise
=
new
TPromise
<
number
>
(
c
=>
{
// Complete promise with index of action that was picked
const
callback
=
(
index
:
number
,
closeNotification
:
boolean
)
=>
()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录