Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3bc9424a
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3bc9424a
编写于
3月 07, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - more declarative services
Untitled, Mode, Text Resource Properties, Commands, Theme
上级
76b5214e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
34 addition
and
46 deletion
+34
-46
src/vs/platform/accessibility/node/accessibilityService.ts
src/vs/platform/accessibility/node/accessibilityService.ts
+1
-4
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+0
-37
src/vs/workbench/services/commands/common/commandService.ts
src/vs/workbench/services/commands/common/commandService.ts
+3
-0
src/vs/workbench/services/mode/common/workbenchModeService.ts
...vs/workbench/services/mode/common/workbenchModeService.ts
+4
-1
src/vs/workbench/services/textfile/node/textResourcePropertiesService.ts
...h/services/textfile/node/textResourcePropertiesService.ts
+3
-1
src/vs/workbench/services/themes/browser/workbenchThemeService.ts
...orkbench/services/themes/browser/workbenchThemeService.ts
+3
-2
src/vs/workbench/services/untitled/common/untitledEditorService.ts
...rkbench/services/untitled/common/untitledEditorService.ts
+3
-0
src/vs/workbench/workbench.main.ts
src/vs/workbench/workbench.main.ts
+17
-1
未找到文件。
src/vs/platform/accessibility/node/accessibilityService.ts
浏览文件 @
3bc9424a
...
...
@@ -7,7 +7,6 @@ import { IAccessibilityService, AccessibilitySupport } from 'vs/platform/accessi
import
{
isWindows
}
from
'
vs/base/common/platform
'
;
import
{
Emitter
,
Event
}
from
'
vs/base/common/event
'
;
import
{
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
class
AccessibilityService
implements
IAccessibilityService
{
_serviceBrand
:
any
;
...
...
@@ -57,6 +56,4 @@ export class AccessibilityService implements IAccessibilityService {
return
this
.
_accessibilitySupport
;
}
}
registerSingleton
(
IAccessibilityService
,
AccessibilityService
,
true
);
\ No newline at end of file
}
\ No newline at end of file
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
3bc9424a
...
...
@@ -31,8 +31,6 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/
import
{
IStorageService
,
StorageScope
,
IWillSaveStateEvent
,
WillSaveStateReason
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ContextMenuService
as
HTMLContextMenuService
}
from
'
vs/platform/contextview/browser/contextMenuService
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ContextKeyService
}
from
'
vs/platform/contextkey/browser/contextKeyService
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
...
...
@@ -71,17 +69,7 @@ import { IExtensionGalleryService, IExtensionManagementServerService, IExtension
import
{
IRemoteAuthorityResolverService
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
ExtensionEnablementService
}
from
'
vs/platform/extensionManagement/common/extensionEnablementService
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
CommandService
}
from
'
vs/workbench/services/commands/common/commandService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
WorkbenchModeServiceImpl
}
from
'
vs/workbench/services/mode/common/workbenchModeService
'
;
import
{
ITextResourceConfigurationService
,
ITextResourcePropertiesService
}
from
'
vs/editor/common/services/resourceConfiguration
'
;
import
{
TextResourceConfigurationService
}
from
'
vs/editor/common/services/resourceConfigurationImpl
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ModelServiceImpl
}
from
'
vs/editor/common/services/modelServiceImpl
'
;
import
{
IUntitledEditorService
,
UntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
ILocalizationsService
}
from
'
vs/platform/localizations/common/localizations
'
;
import
{
WorkbenchThemeService
}
from
'
vs/workbench/services/themes/browser/workbenchThemeService
'
;
import
{
IProductService
}
from
'
vs/platform/product/common/product
'
;
import
{
WorkbenchContextKeysHandler
}
from
'
vs/workbench/browser/contextkeys
'
;
import
{
IDimension
}
from
'
vs/platform/layout/browser/layoutService
'
;
...
...
@@ -103,7 +91,6 @@ import { ExtensionManagementServerService } from 'vs/workbench/services/extensio
import
{
MultiExtensionManagementService
}
from
'
vs/workbench/services/extensionManagement/node/multiExtensionManagement
'
;
import
{
LocalizationsChannelClient
}
from
'
vs/platform/localizations/node/localizationsIpc
'
;
import
{
ProductService
}
from
'
vs/platform/product/node/productService
'
;
import
{
TextResourcePropertiesService
}
from
'
vs/workbench/services/textfile/node/textResourcePropertiesService
'
;
// import@electron-browser
import
{
ContextMenuService
as
NativeContextMenuService
}
from
'
vs/workbench/services/contextmenu/electron-browser/contextmenuService
'
;
...
...
@@ -382,34 +369,10 @@ export class Workbench extends Disposable implements IWorkbenchLayoutService {
// Extensions
serviceCollection
.
set
(
IExtensionService
,
new
SyncDescriptor
(
ExtensionService
));
// Theming
serviceCollection
.
set
(
IWorkbenchThemeService
,
new
SyncDescriptor
(
WorkbenchThemeService
,
[
document
.
body
]));
// Commands
serviceCollection
.
set
(
ICommandService
,
new
SyncDescriptor
(
CommandService
,
undefined
,
true
));
// Editor Mode
serviceCollection
.
set
(
IModeService
,
new
SyncDescriptor
(
WorkbenchModeServiceImpl
));
// Text Resource Config
serviceCollection
.
set
(
ITextResourceConfigurationService
,
new
SyncDescriptor
(
TextResourceConfigurationService
));
// Text Resource Properties
serviceCollection
.
set
(
ITextResourcePropertiesService
,
new
SyncDescriptor
(
TextResourcePropertiesService
));
// Editor Models
serviceCollection
.
set
(
IModelService
,
new
SyncDescriptor
(
ModelServiceImpl
,
undefined
,
true
));
// Untitled Editors
serviceCollection
.
set
(
IUntitledEditorService
,
new
SyncDescriptor
(
UntitledEditorService
,
undefined
,
true
));
// Localization
const
localizationsChannel
=
getDelayedChannel
(
sharedProcess
.
then
(
c
=>
c
.
getChannel
(
'
localizations
'
)));
serviceCollection
.
set
(
ILocalizationsService
,
new
SyncDescriptor
(
LocalizationsChannelClient
,
[
localizationsChannel
]));
// Context Keys
serviceCollection
.
set
(
IContextKeyService
,
new
SyncDescriptor
(
ContextKeyService
));
// Context view service
serviceCollection
.
set
(
IContextViewService
,
new
SyncDescriptor
(
ContextViewService
,
[
this
.
workbench
],
true
));
...
...
src/vs/workbench/services/commands/common/commandService.ts
浏览文件 @
3bc9424a
...
...
@@ -9,6 +9,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
class
CommandService
extends
Disposable
implements
ICommandService
{
...
...
@@ -67,3 +68,5 @@ export class CommandService extends Disposable implements ICommandService {
}
}
}
registerSingleton
(
ICommandService
,
CommandService
,
true
);
\ No newline at end of file
src/vs/workbench/services/mode/common/workbenchModeService.ts
浏览文件 @
3bc9424a
...
...
@@ -8,13 +8,14 @@ import * as mime from 'vs/base/common/mime';
import
*
as
resources
from
'
vs/base/common/resources
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
ModesRegistry
}
from
'
vs/editor/common/modes/modesRegistry
'
;
import
{
ILanguageExtensionPoint
}
from
'
vs/editor/common/services/modeService
'
;
import
{
ILanguageExtensionPoint
,
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
ModeServiceImpl
}
from
'
vs/editor/common/services/modeServiceImpl
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
FILES_ASSOCIATIONS_CONFIG
,
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ExtensionMessageCollector
,
ExtensionsRegistry
,
IExtensionPoint
,
IExtensionPointUser
}
from
'
vs/workbench/services/extensions/common/extensionsRegistry
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
interface
IRawLanguageExtensionPoint
{
id
:
string
;
...
...
@@ -230,3 +231,5 @@ function isValidLanguageExtensionPoint(value: IRawLanguageExtensionPoint, collec
}
return
true
;
}
registerSingleton
(
IModeService
,
WorkbenchModeServiceImpl
);
\ No newline at end of file
src/vs/workbench/services/textfile/node/textResourcePropertiesService.ts
浏览文件 @
3bc9424a
...
...
@@ -11,6 +11,7 @@ import { IRemoteAgentService, IRemoteAgentEnvironment } from 'vs/workbench/servi
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
class
TextResourcePropertiesService
implements
ITextResourcePropertiesService
{
...
...
@@ -51,5 +52,6 @@ export class TextResourcePropertiesService implements ITextResourcePropertiesSer
}
return
os
;
}
}
}
\ No newline at end of file
registerSingleton
(
ITextResourcePropertiesService
,
TextResourcePropertiesService
,
true
);
\ No newline at end of file
src/vs/workbench/services/themes/browser/workbenchThemeService.ts
浏览文件 @
3bc9424a
...
...
@@ -31,6 +31,7 @@ import * as resources from 'vs/base/common/resources';
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
import
{
textmateColorsSchemaId
,
registerColorThemeSchemas
,
textmateColorSettingsSchemaId
}
from
'
vs/workbench/services/themes/common/colorThemeSchema
'
;
import
{
workbenchColorsSchemaId
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
// implementation
...
...
@@ -95,7 +96,6 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
}
constructor
(
container
:
HTMLElement
,
@
IExtensionService
extensionService
:
IExtensionService
,
@
IStorageService
private
readonly
storageService
:
IStorageService
,
@
IConfigurationService
private
readonly
configurationService
:
IConfigurationService
,
...
...
@@ -105,7 +105,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
@
IEnvironmentService
private
readonly
environmentService
:
IEnvironmentService
)
{
this
.
container
=
container
;
this
.
container
=
document
.
body
;
this
.
colorThemeStore
=
new
ColorThemeStore
(
extensionService
,
ColorThemeData
.
createLoadedEmptyTheme
(
DEFAULT_THEME_ID
,
DEFAULT_THEME_SETTING_VALUE
));
this
.
onFileIconThemeChange
=
new
Emitter
<
IFileIconTheme
>
();
this
.
iconThemeStore
=
new
FileIconThemeStore
(
extensionService
);
...
...
@@ -708,3 +708,4 @@ const tokenColorCustomizationConfiguration: IConfigurationNode = {
};
configurationRegistry
.
registerConfiguration
(
tokenColorCustomizationConfiguration
);
registerSingleton
(
IWorkbenchThemeService
,
WorkbenchThemeService
);
\ No newline at end of file
src/vs/workbench/services/untitled/common/untitledEditorService.ts
浏览文件 @
3bc9424a
...
...
@@ -14,6 +14,7 @@ import { ResourceMap } from 'vs/base/common/map';
import
{
UntitledEditorModel
}
from
'
vs/workbench/common/editor/untitledEditorModel
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
const
IUntitledEditorService
=
createDecorator
<
IUntitledEditorService
>
(
'
untitledEditorService
'
);
...
...
@@ -277,3 +278,5 @@ export class UntitledEditorService extends Disposable implements IUntitledEditor
return
input
?
input
.
getEncoding
()
:
undefined
;
}
}
registerSingleton
(
IUntitledEditorService
,
UntitledEditorService
,
true
);
\ No newline at end of file
src/vs/workbench/workbench.main.ts
浏览文件 @
3bc9424a
...
...
@@ -54,6 +54,14 @@ import { IDownloadService } from 'vs/platform/download/common/download';
import
{
DownloadService
}
from
'
vs/platform/download/node/downloadService
'
;
import
{
IClipboardService
}
from
'
vs/platform/clipboard/common/clipboardService
'
;
import
{
ClipboardService
}
from
'
vs/platform/clipboard/electron-browser/clipboardService
'
;
import
{
ContextKeyService
}
from
'
vs/platform/contextkey/browser/contextKeyService
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ModelServiceImpl
}
from
'
vs/editor/common/services/modelServiceImpl
'
;
import
{
ITextResourceConfigurationService
}
from
'
vs/editor/common/services/resourceConfiguration
'
;
import
{
TextResourceConfigurationService
}
from
'
vs/editor/common/services/resourceConfigurationImpl
'
;
import
{
IAccessibilityService
}
from
'
vs/platform/accessibility/common/accessibility
'
;
import
{
AccessibilityService
}
from
'
vs/platform/accessibility/node/accessibilityService
'
;
import
'
vs/workbench/services/bulkEdit/browser/bulkEditService
'
;
import
'
vs/workbench/services/integrity/node/integrityService
'
;
...
...
@@ -75,13 +83,17 @@ import 'vs/workbench/services/textmodelResolver/common/textModelResolverService'
import
'
vs/workbench/services/textfile/common/textFileService
'
;
import
'
vs/workbench/services/dialogs/electron-browser/dialogService
'
;
import
'
vs/workbench/services/backup/node/backupFileService
'
;
import
'
vs/platform/accessibility/node/accessibilityService
'
;
import
'
vs/workbench/services/editor/browser/editorService
'
;
import
'
vs/workbench/services/history/browser/history
'
;
import
'
vs/workbench/services/files/node/remoteFileService
'
;
import
'
vs/workbench/services/activity/browser/activityService
'
;
import
'
vs/workbench/browser/parts/views/views
'
;
import
'
vs/workbench/services/keybinding/electron-browser/keybindingService
'
;
import
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
'
vs/workbench/services/textfile/node/textResourcePropertiesService
'
;
import
'
vs/workbench/services/mode/common/workbenchModeService
'
;
import
'
vs/workbench/services/commands/common/commandService
'
;
import
'
vs/workbench/services/themes/browser/workbenchThemeService
'
;
registerSingleton
(
IMenuService
,
MenuService
,
true
);
registerSingleton
(
IListService
,
ListService
,
true
);
...
...
@@ -91,6 +103,10 @@ registerSingleton(IMarkerDecorationsService, MarkerDecorationsService);
registerSingleton
(
IMarkerService
,
MarkerService
,
true
);
registerSingleton
(
IDownloadService
,
DownloadService
,
true
);
registerSingleton
(
IClipboardService
,
ClipboardService
,
true
);
registerSingleton
(
IContextKeyService
,
ContextKeyService
);
registerSingleton
(
IModelService
,
ModelServiceImpl
,
true
);
registerSingleton
(
ITextResourceConfigurationService
,
TextResourceConfigurationService
);
registerSingleton
(
IAccessibilityService
,
AccessibilityService
,
true
);
//#endregion
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录