Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
d7626d68
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
d7626d68
编写于
3月 31, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Never show again storage keys are registered too late for syncing (fix #93817)
上级
46679eee
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
34 addition
and
20 deletion
+34
-20
src/vs/platform/notification/common/notification.ts
src/vs/platform/notification/common/notification.ts
+1
-1
src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts
...ench/contrib/codeEditor/browser/largeFileOptimizations.ts
+6
-1
src/vs/workbench/contrib/codeEditor/browser/semanticTokensHelp.ts
...orkbench/contrib/codeEditor/browser/semanticTokensHelp.ts
+8
-2
src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts
...contrib/files/browser/editors/textFileSaveErrorHandler.ts
+5
-1
src/vs/workbench/contrib/localizations/browser/localizations.contribution.ts
...ntrib/localizations/browser/localizations.contribution.ts
+1
-0
src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts
...orkbench/contrib/terminal/browser/terminalConfigHelper.ts
+6
-1
src/vs/workbench/contrib/update/browser/update.ts
src/vs/workbench/contrib/update/browser/update.ts
+6
-1
src/vs/workbench/services/notification/common/notificationService.ts
...bench/services/notification/common/notificationService.ts
+1
-13
未找到文件。
src/vs/platform/notification/common/notification.ts
浏览文件 @
d7626d68
...
...
@@ -65,7 +65,7 @@ export interface INeverShowAgainOptions {
/**
* Whether to persist the choice in the current workspace or for all workspaces. By
* default it will be persisted for all workspaces.
* default it will be persisted for all workspaces
(= `NeverShowAgainScope.GLOBAL`)
.
*/
readonly
scope
?:
NeverShowAgainScope
;
}
...
...
src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts
浏览文件 @
d7626d68
...
...
@@ -11,6 +11,7 @@ import { registerEditorContribution } from 'vs/editor/browser/editorExtensions';
import
{
IEditorContribution
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IStorageKeysSyncRegistryService
}
from
'
vs/platform/userDataSync/common/storageKeys
'
;
/**
* Shows a message when opening a large file which has been memory optimized (and features disabled).
...
...
@@ -23,9 +24,13 @@ export class LargeFileOptimizationsWarner extends Disposable implements IEditorC
private
readonly
_editor
:
ICodeEditor
,
@
INotificationService
private
readonly
_notificationService
:
INotificationService
,
@
IConfigurationService
private
readonly
_configurationService
:
IConfigurationService
,
@
IStorageKeysSyncRegistryService
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
)
{
super
();
// opt-in to syncing
const
neverShowAgainId
=
'
editor.contrib.largeFileOptimizationsWarner
'
;
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
neverShowAgainId
,
version
:
1
});
this
.
_register
(
this
.
_editor
.
onDidChangeModel
((
e
)
=>
{
const
model
=
this
.
_editor
.
getModel
();
...
...
@@ -56,7 +61,7 @@ export class LargeFileOptimizationsWarner extends Disposable implements IEditorC
});
}
}
],
{
neverShowAgain
:
{
id
:
'
editor.contrib.largeFileOptimizationsWarner
'
}
});
],
{
neverShowAgain
:
{
id
:
neverShowAgainId
}
});
}
}));
}
...
...
src/vs/workbench/contrib/codeEditor/browser/semanticTokensHelp.ts
浏览文件 @
d7626d68
...
...
@@ -15,6 +15,7 @@ import { URI } from 'vs/base/common/uri';
import
{
ITextModel
}
from
'
vs/editor/common/model
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/workbenchThemeService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IStorageKeysSyncRegistryService
}
from
'
vs/platform/userDataSync/common/storageKeys
'
;
/**
* Shows a message when semantic tokens are shown the first time.
...
...
@@ -30,10 +31,15 @@ export class SemanticTokensHelp extends Disposable implements IEditorContributio
@
INotificationService
_notificationService
:
INotificationService
,
@
IOpenerService
_openerService
:
IOpenerService
,
@
IWorkbenchThemeService
_themeService
:
IWorkbenchThemeService
,
@
IEditorService
_editorService
:
IEditorService
@
IEditorService
_editorService
:
IEditorService
,
@
IStorageKeysSyncRegistryService
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
)
{
super
();
// opt-in to syncing
const
neverShowAgainId
=
'
editor.contrib.semanticTokensHelp
'
;
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
neverShowAgainId
,
version
:
1
});
const
toDispose
=
this
.
_register
(
new
DisposableStore
());
const
localToDispose
=
toDispose
.
add
(
new
DisposableStore
());
const
installChangeTokenListener
=
(
model
:
ITextModel
)
=>
{
...
...
@@ -75,7 +81,7 @@ export class SemanticTokensHelp extends Disposable implements IEditorContributio
_openerService
.
open
(
URI
.
parse
(
url
));
}
}
],
{
neverShowAgain
:
{
id
:
'
editor.contrib.semanticTokensHelp
'
}
});
],
{
neverShowAgain
:
{
id
:
neverShowAgainId
}
});
}));
};
...
...
src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.ts
浏览文件 @
d7626d68
...
...
@@ -241,9 +241,13 @@ class ResolveSaveConflictAction extends Action {
@
IEditorService
private
readonly
editorService
:
IEditorService
,
@
INotificationService
private
readonly
notificationService
:
INotificationService
,
@
IInstantiationService
private
readonly
instantiationService
:
IInstantiationService
,
@
IProductService
private
readonly
productService
:
IProductService
@
IProductService
private
readonly
productService
:
IProductService
,
@
IStorageKeysSyncRegistryService
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
)
{
super
(
'
workbench.files.action.resolveConflict
'
,
nls
.
localize
(
'
compareChanges
'
,
"
Compare
"
));
// opt-in to syncing
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
LEARN_MORE_DIRTY_WRITE_IGNORE_KEY
,
version
:
1
});
}
async
run
():
Promise
<
void
>
{
...
...
src/vs/workbench/contrib/localizations/browser/localizations.contribution.ts
浏览文件 @
d7626d68
...
...
@@ -50,6 +50,7 @@ export class LocalizationWorkbenchContribution extends Disposable implements IWo
super
();
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
LANGUAGEPACK_SUGGESTION_IGNORE_STORAGE_KEY
,
version
:
1
});
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
'
langugage.update.donotask
'
,
version
:
1
});
this
.
checkAndInstall
();
this
.
_register
(
this
.
extensionManagementService
.
onDidInstallExtension
(
e
=>
this
.
onDidInstallExtension
(
e
)));
}
...
...
src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.ts
浏览文件 @
d7626d68
...
...
@@ -21,6 +21,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
InstallRecommendedExtensionAction
}
from
'
vs/workbench/contrib/extensions/browser/extensionsActions
'
;
import
{
IProductService
}
from
'
vs/platform/product/common/productService
'
;
import
{
XTermCore
}
from
'
vs/workbench/contrib/terminal/browser/xterm-private
'
;
import
{
IStorageKeysSyncRegistryService
}
from
'
vs/platform/userDataSync/common/storageKeys
'
;
const
MINIMUM_FONT_SIZE
=
6
;
const
MAXIMUM_FONT_SIZE
=
25
;
...
...
@@ -47,7 +48,8 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
@
IStorageService
private
readonly
_storageService
:
IStorageService
,
@
ITelemetryService
private
readonly
telemetryService
:
ITelemetryService
,
@
IInstantiationService
private
readonly
instantiationService
:
IInstantiationService
,
@
IProductService
private
readonly
productService
:
IProductService
@
IProductService
private
readonly
productService
:
IProductService
,
@
IStorageKeysSyncRegistryService
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
)
{
this
.
_updateConfig
();
this
.
_configurationService
.
onDidChangeConfiguration
(
e
=>
{
...
...
@@ -55,6 +57,9 @@ export class TerminalConfigHelper implements IBrowserTerminalConfigHelper {
this
.
_updateConfig
();
}
});
// opt-in to syncing
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
'
terminalConfigHelper/launchRecommendationsIgnore
'
,
version
:
1
});
}
private
_updateConfig
():
void
{
...
...
src/vs/workbench/contrib/update/browser/update.ts
浏览文件 @
d7626d68
...
...
@@ -29,6 +29,7 @@ import { ShowCurrentReleaseNotesActionId, CheckForVSCodeUpdateActionId } from 'v
import
{
IHostService
}
from
'
vs/workbench/services/host/browser/host
'
;
import
{
IProductService
}
from
'
vs/platform/product/common/productService
'
;
import
product
from
'
vs/platform/product/common/product
'
;
import
{
IStorageKeysSyncRegistryService
}
from
'
vs/platform/userDataSync/common/storageKeys
'
;
export
const
CONTEXT_UPDATE_STATE
=
new
RawContextKey
<
string
>
(
'
updateState
'
,
StateType
.
Idle
);
...
...
@@ -179,12 +180,16 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
@
IActivityService
private
readonly
activityService
:
IActivityService
,
@
IContextKeyService
private
readonly
contextKeyService
:
IContextKeyService
,
@
IProductService
private
readonly
productService
:
IProductService
,
@
IWorkbenchEnvironmentService
private
readonly
workbenchEnvironmentService
:
IWorkbenchEnvironmentService
@
IWorkbenchEnvironmentService
private
readonly
workbenchEnvironmentService
:
IWorkbenchEnvironmentService
,
@
IStorageKeysSyncRegistryService
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
)
{
super
();
this
.
state
=
updateService
.
state
;
this
.
updateStateContextKey
=
CONTEXT_UPDATE_STATE
.
bindTo
(
this
.
contextKeyService
);
// opt-in to syncing
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
'
neverShowAgain:update/win32-fast-updates
'
,
version
:
1
});
this
.
_register
(
updateService
.
onStateChange
(
this
.
onUpdateStateChange
,
this
));
this
.
onUpdateStateChange
(
this
.
updateService
.
state
);
...
...
src/vs/workbench/services/notification/common/notificationService.ts
浏览文件 @
d7626d68
...
...
@@ -11,7 +11,6 @@ import { Event } from 'vs/base/common/event';
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IStorageKeysSyncRegistryService
}
from
'
vs/platform/userDataSync/common/storageKeys
'
;
export
class
NotificationService
extends
Disposable
implements
INotificationService
{
...
...
@@ -21,8 +20,7 @@ export class NotificationService extends Disposable implements INotificationServ
get
model
():
INotificationsModel
{
return
this
.
_model
;
}
constructor
(
@
IStorageService
private
readonly
storageService
:
IStorageService
,
@
IStorageKeysSyncRegistryService
private
readonly
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
@
IStorageService
private
readonly
storageService
:
IStorageService
)
{
super
();
}
...
...
@@ -70,11 +68,6 @@ export class NotificationService extends Disposable implements INotificationServ
const
scope
=
notification
.
neverShowAgain
.
scope
===
NeverShowAgainScope
.
WORKSPACE
?
StorageScope
.
WORKSPACE
:
StorageScope
.
GLOBAL
;
const
id
=
notification
.
neverShowAgain
.
id
;
// opt-in to syncing if global
if
(
scope
===
StorageScope
.
GLOBAL
)
{
this
.
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
id
,
version
:
1
});
}
// If the user already picked to not show the notification
// again, we return with a no-op notification here
if
(
this
.
storageService
.
getBoolean
(
id
,
scope
))
{
...
...
@@ -126,11 +119,6 @@ export class NotificationService extends Disposable implements INotificationServ
const
scope
=
options
.
neverShowAgain
.
scope
===
NeverShowAgainScope
.
WORKSPACE
?
StorageScope
.
WORKSPACE
:
StorageScope
.
GLOBAL
;
const
id
=
options
.
neverShowAgain
.
id
;
// opt-in to syncing if global
if
(
scope
===
StorageScope
.
GLOBAL
)
{
this
.
storageKeysSyncRegistryService
.
registerStorageKey
({
key
:
id
,
version
:
1
});
}
// If the user already picked to not show the notification
// again, we return with a no-op notification here
if
(
this
.
storageService
.
getBoolean
(
id
,
scope
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录