Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
85183296
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,发现更多精彩内容 >>
提交
85183296
编写于
3月 24, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[theme] rename to workbenchThemeService.ts, use IThemeService where possible
上级
e1d2e7b4
变更
28
显示空白变更内容
内联
并排
Showing
28 changed file
with
50 addition
and
47 deletion
+50
-47
src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts
...ntrib/inspectTMScopes/electron-browser/inspectTMScopes.ts
+1
-1
src/vs/editor/electron-browser/textMate/TMHelper.ts
src/vs/editor/electron-browser/textMate/TMHelper.ts
+1
-1
src/vs/editor/electron-browser/textMate/TMSyntax.ts
src/vs/editor/electron-browser/textMate/TMSyntax.ts
+1
-1
src/vs/platform/theme/common/themeService.ts
src/vs/platform/theme/common/themeService.ts
+3
-1
src/vs/workbench/browser/layout.ts
src/vs/workbench/browser/layout.ts
+3
-3
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
+1
-1
src/vs/workbench/browser/parts/editor/textEditor.ts
src/vs/workbench/browser/parts/editor/textEditor.ts
+1
-1
src/vs/workbench/browser/parts/editor/textResourceEditor.ts
src/vs/workbench/browser/parts/editor/textResourceEditor.ts
+1
-1
src/vs/workbench/electron-browser/shell.ts
src/vs/workbench/electron-browser/shell.ts
+2
-2
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+1
-1
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
+4
-4
src/vs/workbench/parts/files/browser/editors/textFileEditor.ts
...s/workbench/parts/files/browser/editors/textFileEditor.ts
+1
-1
src/vs/workbench/parts/files/browser/views/explorerView.ts
src/vs/workbench/parts/files/browser/views/explorerView.ts
+1
-1
src/vs/workbench/parts/html/browser/htmlPreviewPart.ts
src/vs/workbench/parts/html/browser/htmlPreviewPart.ts
+5
-4
src/vs/workbench/parts/html/browser/webview.ts
src/vs/workbench/parts/html/browser/webview.ts
+4
-4
src/vs/workbench/parts/output/browser/outputPanel.ts
src/vs/workbench/parts/output/browser/outputPanel.ts
+1
-1
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
.../workbench/parts/preferences/browser/preferencesEditor.ts
+1
-1
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
+6
-6
src/vs/workbench/parts/search/browser/openFileHandler.ts
src/vs/workbench/parts/search/browser/openFileHandler.ts
+1
-1
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
...ench/parts/themes/electron-browser/themes.contribution.ts
+1
-1
src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts
.../themes/test/electron-browser/themes.test.contribution.ts
+1
-1
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
...bench/parts/update/electron-browser/releaseNotesEditor.ts
+4
-4
src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts
...s/welcome/walkThrough/electron-browser/walkThroughPart.ts
+1
-1
src/vs/workbench/services/themes/common/workbenchThemeService.ts
...workbench/services/themes/common/workbenchThemeService.ts
+0
-0
src/vs/workbench/services/themes/electron-browser/colorThemeData.ts
...kbench/services/themes/electron-browser/colorThemeData.ts
+1
-1
src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts
...ch/services/themes/electron-browser/themeCompatibility.ts
+1
-1
src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts
...services/themes/electron-browser/workbenchThemeService.ts
+1
-1
未找到文件。
src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts
浏览文件 @
85183296
...
...
@@ -22,7 +22,7 @@ import { TokenMetadata } from 'vs/editor/common/model/tokensBinaryEncoding';
import
{
TokenizationRegistry
,
LanguageIdentifier
,
FontStyle
,
StandardTokenType
}
from
'
vs/editor/common/modes
'
;
import
{
CharCode
}
from
'
vs/base/common/charCode
'
;
import
{
findMatchingThemeRule
}
from
'
vs/editor/electron-browser/textMate/TMHelper
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
Severity
from
'
vs/base/common/severity
'
;
...
...
src/vs/editor/electron-browser/textMate/TMHelper.ts
浏览文件 @
85183296
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
IColorTheme
,
ITokenColorizationSetting
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IColorTheme
,
ITokenColorizationSetting
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
export
function
findMatchingThemeRule
(
theme
:
IColorTheme
,
scopes
:
string
[]):
ThemeRule
{
for
(
let
i
=
scopes
.
length
-
1
;
i
>=
0
;
i
--
)
{
...
...
src/vs/editor/electron-browser/textMate/TMSyntax.ts
浏览文件 @
85183296
...
...
@@ -16,7 +16,7 @@ import { ExtensionMessageCollector } from 'vs/platform/extensions/common/extensi
import
{
ITokenizationSupport
,
TokenizationRegistry
,
IState
,
LanguageId
}
from
'
vs/editor/common/modes
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
INITIAL
,
StackElement
,
IGrammar
,
Registry
,
IEmbeddedLanguagesMap
as
IEmbeddedLanguagesMap2
}
from
'
vscode-textmate
'
;
import
{
IWorkbenchThemeService
,
ITokenColorizationRule
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
,
ITokenColorizationRule
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
ITextMateService
}
from
'
vs/editor/node/textMate/textMateService
'
;
import
{
grammarsExtPoint
,
IEmbeddedLanguagesMap
,
ITMSyntaxExtensionPoint
}
from
'
vs/editor/node/textMate/TMGrammars
'
;
import
{
TokenizationResult
,
TokenizationResult2
}
from
'
vs/editor/common/core/token
'
;
...
...
src/vs/platform/theme/common/themeService.ts
浏览文件 @
85183296
...
...
@@ -14,9 +14,11 @@ import Event, { Emitter } from 'vs/base/common/event';
export
let
IThemeService
=
createDecorator
<
IThemeService
>
(
'
themeService
'
);
// base themes
export
const
DARK
=
'
dark
'
;
export
const
LIGHT
=
'
light
'
;
export
const
HIGH_CONTRAST
=
'
hc
'
;
export
type
ThemeType
=
'
light
'
|
'
dark
'
|
'
hc
'
;
export
interface
ITheme
{
readonly
selector
:
string
;
readonly
type
:
ThemeType
;
...
...
src/vs/workbench/browser/layout.ts
浏览文件 @
85183296
...
...
@@ -15,10 +15,10 @@ import { IPartService, Position, ILayoutOptions, Parts } from 'vs/workbench/serv
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IContextViewService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
getZoomFactor
}
from
'
vs/base/browser/browser
'
;
import
{
IThemeService
}
from
"
vs/platform/theme/common/themeService
"
;
const
MIN_SIDEBAR_PART_WIDTH
=
170
;
const
MIN_EDITOR_PART_HEIGHT
=
70
;
...
...
@@ -94,7 +94,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
@
IEditorGroupService
private
editorGroupService
:
IEditorGroupService
,
@
IPartService
private
partService
:
IPartService
,
@
IViewletService
private
viewletService
:
IViewletService
,
@
I
WorkbenchThemeService
themeService
:
IWorkbench
ThemeService
@
I
ThemeService
themeService
:
I
ThemeService
)
{
this
.
parent
=
parent
;
this
.
workbenchContainer
=
workbenchContainer
;
...
...
@@ -124,7 +124,7 @@ export class WorkbenchLayout implements IVerticalSashLayoutProvider, IHorizontal
this
.
layoutEditorGroupsVertically
=
(
this
.
editorGroupService
.
getGroupOrientation
()
!==
'
horizontal
'
);
this
.
toUnbind
.
push
(
themeService
.
on
DidColor
ThemeChange
(
_
=>
this
.
layout
()));
this
.
toUnbind
.
push
(
themeService
.
onThemeChange
(
_
=>
this
.
layout
()));
this
.
toUnbind
.
push
(
editorGroupService
.
onEditorsChanged
(()
=>
this
.
onEditorsChanged
()));
this
.
toUnbind
.
push
(
editorGroupService
.
onGroupOrientationChanged
(
e
=>
this
.
onGroupOrientationChanged
()));
...
...
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
浏览文件 @
85183296
...
...
@@ -31,7 +31,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
...
src/vs/workbench/browser/parts/editor/textEditor.ts
浏览文件 @
85183296
...
...
@@ -21,7 +21,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
Scope
}
from
'
vs/workbench/common/memento
'
;
import
{
getCodeEditor
}
from
'
vs/editor/common/services/codeEditorService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
...
...
src/vs/workbench/browser/parts/editor/textResourceEditor.ts
浏览文件 @
85183296
...
...
@@ -18,7 +18,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
...
...
src/vs/workbench/electron-browser/shell.ts
浏览文件 @
85183296
...
...
@@ -101,8 +101,8 @@ import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview';
import
{
readdir
}
from
'
vs/base/node/pfs
'
;
import
{
join
}
from
'
path
'
;
import
'
vs/platform/opener/browser/opener.contribution
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
WorkbenchThemeService
}
from
'
vs/workbench/services/themes/electron-browser/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
WorkbenchThemeService
}
from
'
vs/workbench/services/themes/electron-browser/
workbenchT
hemeService
'
;
import
{
registerThemingParticipant
,
ITheme
,
ICssStyleCollector
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
WINDOW_FOREGROUND
}
from
'
vs/workbench/common/theme
'
;
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
85183296
...
...
@@ -38,7 +38,7 @@ import { ITitleService } from 'vs/workbench/services/title/common/titleService';
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
}
from
'
vs/workbench/common/actionRegistry
'
;
import
{
SyncActionDescriptor
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IWorkbenchThemeService
,
VS_HC_THEME
,
VS_DARK_THEME
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
,
VS_HC_THEME
,
VS_DARK_THEME
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
*
as
browser
from
'
vs/base/browser/browser
'
;
import
{
ReloadWindowAction
,
ToggleDevToolsAction
,
ShowStartupPerformance
,
OpenRecentAction
,
ToggleSharedProcessAction
}
from
'
vs/workbench/electron-browser/actions
'
;
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
85183296
...
...
@@ -37,7 +37,7 @@ import * as debug from 'vs/workbench/parts/debug/common/debug';
import
{
ClearReplAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
ReplHistory
}
from
'
vs/workbench/parts/debug/common/replHistory
'
;
import
{
Panel
}
from
'
vs/workbench/browser/panel
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IListService
}
from
'
vs/platform/list/browser/listService
'
;
...
...
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
浏览文件 @
85183296
...
...
@@ -25,7 +25,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IExtensionGalleryService
,
IExtensionManifest
,
IKeyBinding
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
ExtensionsInput
}
from
'
vs/workbench/parts/extensions/common/extensionsInput
'
;
import
{
IExtensionsWorkbenchService
,
IExtensionsViewlet
,
VIEWLET_ID
,
IExtension
,
IExtensionDependencies
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
Renderer
,
DataSource
,
Controller
}
from
'
vs/workbench/parts/extensions/browser/dependenciesViewer
'
;
...
...
@@ -46,6 +45,7 @@ import { Position } from 'vs/platform/editor/common/editor';
import
{
IListService
}
from
'
vs/platform/list/browser/listService
'
;
import
{
OS
}
from
'
vs/base/common/platform
'
;
import
{
IPartService
,
Parts
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IThemeService
}
from
"
vs/platform/theme/common/themeService
"
;
function
renderBody
(
body
:
string
):
string
{
const
nonce
=
new
Date
().
getTime
()
+
''
+
new
Date
().
getMilliseconds
();
...
...
@@ -155,7 +155,7 @@ export class ExtensionEditor extends BaseEditor {
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IViewletService
private
viewletService
:
IViewletService
,
@
IExtensionsWorkbenchService
private
extensionsWorkbenchService
:
IExtensionsWorkbenchService
,
@
I
WorkbenchThemeService
protected
themeService
:
IWorkbench
ThemeService
,
@
I
ThemeService
protected
themeService
:
I
ThemeService
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
,
@
IMessageService
private
messageService
:
IMessageService
,
@
IOpenerService
private
openerService
:
IOpenerService
,
...
...
@@ -322,7 +322,7 @@ export class ExtensionEditor extends BaseEditor {
.
then
(
renderBody
)
.
then
<
void
>
(
body
=>
{
const
webview
=
new
WebView
(
this
.
content
,
this
.
partService
.
getContainer
(
Parts
.
EDITOR_PART
));
webview
.
style
(
this
.
themeService
.
get
Color
Theme
());
webview
.
style
(
this
.
themeService
.
getTheme
());
webview
.
contents
=
[
body
];
webview
.
onDidClickLink
(
link
=>
{
...
...
@@ -331,7 +331,7 @@ export class ExtensionEditor extends BaseEditor {
this
.
openerService
.
open
(
link
);
}
},
null
,
this
.
contentDisposables
);
this
.
themeService
.
on
DidColor
ThemeChange
(
theme
=>
webview
.
style
(
theme
),
null
,
this
.
contentDisposables
);
this
.
themeService
.
onThemeChange
(
theme
=>
webview
.
style
(
theme
),
null
,
this
.
contentDisposables
);
this
.
contentDisposables
.
push
(
webview
);
})
.
then
(
null
,
()
=>
{
...
...
src/vs/workbench/parts/files/browser/editors/textFileEditor.ts
浏览文件 @
85183296
...
...
@@ -28,7 +28,7 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history';
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
CancelAction
}
from
'
vs/platform/message/common/message
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
...
...
src/vs/workbench/parts/files/browser/views/explorerView.ts
浏览文件 @
85183296
...
...
@@ -40,7 +40,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
import
{
IMessageService
,
Severity
}
from
'
vs/platform/message/common/message
'
;
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ResourceContextKey
}
from
'
vs/workbench/common/resourceContextKey
'
;
import
{
IWorkbenchThemeService
,
IFileIconTheme
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
,
IFileIconTheme
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
isLinux
}
from
'
vs/base/common/platform
'
;
export
class
ExplorerView
extends
CollapsibleViewletView
{
...
...
src/vs/workbench/parts/html/browser/htmlPreviewPart.ts
浏览文件 @
85183296
...
...
@@ -18,13 +18,14 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
BaseTextEditorModel
}
from
'
vs/workbench/common/editor/textEditorModel
'
;
import
{
HtmlInput
}
from
'
vs/workbench/parts/html/common/htmlInput
'
;
import
{
I
WorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
I
ThemeService
}
from
"
vs/platform/theme/common/themeService
"
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
ITextModelResolverService
,
ITextEditorModel
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
Parts
,
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
Webview
from
'
./webview
'
;
/**
* An implementation of editor for showing HTML content in an IFrame by leveraging the HTML input.
*/
...
...
@@ -48,7 +49,7 @@ export class HtmlPreviewPart extends BaseEditor {
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
ITextModelResolverService
textModelResolverService
:
ITextModelResolverService
,
@
I
WorkbenchThemeService
protected
themeService
:
IWorkbench
ThemeService
,
@
I
ThemeService
protected
themeService
:
I
ThemeService
,
@
IOpenerService
openerService
:
IOpenerService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
IPartService
private
partService
:
IPartService
...
...
@@ -116,8 +117,8 @@ export class HtmlPreviewPart extends BaseEditor {
this
.
_webviewDisposables
=
dispose
(
this
.
_webviewDisposables
);
this
.
_webview
=
undefined
;
}
else
{
this
.
_themeChangeSubscription
=
this
.
themeService
.
on
DidColor
ThemeChange
(
themeId
=>
this
.
webview
.
style
(
themeId
));
this
.
webview
.
style
(
this
.
themeService
.
get
Color
Theme
());
this
.
_themeChangeSubscription
=
this
.
themeService
.
onThemeChange
(
themeId
=>
this
.
webview
.
style
(
themeId
));
this
.
webview
.
style
(
this
.
themeService
.
getTheme
());
if
(
this
.
_hasValidModel
())
{
this
.
_modelChangeSubscription
=
this
.
model
.
onDidChangeContent
(()
=>
this
.
webview
.
contents
=
this
.
model
.
getLinesContent
());
...
...
src/vs/workbench/parts/html/browser/webview.ts
浏览文件 @
85183296
...
...
@@ -13,8 +13,8 @@ import Event, { Emitter } from 'vs/base/common/event';
import
{
addDisposableListener
,
addClass
}
from
'
vs/base/browser/dom
'
;
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
MenuRegistry
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IColorTheme
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
editorBackground
,
editorForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
ITheme
,
LIGHT
,
DARK
}
from
"
vs/platform/theme/common/themeService
"
;
declare
interface
WebviewElement
extends
HTMLElement
{
src
:
string
;
...
...
@@ -145,7 +145,7 @@ export default class Webview {
this
.
_send
(
'
message
'
,
data
);
}
style
(
theme
:
I
Color
Theme
):
void
{
style
(
theme
:
ITheme
):
void
{
const
{
fontFamily
,
fontWeight
,
fontSize
}
=
window
.
getComputedStyle
(
this
.
_styleElement
);
// TODO@theme avoid styleElement
let
value
=
`
...
...
@@ -184,7 +184,7 @@ export default class Webview {
let
activeTheme
:
ApiThemeClassName
;
if
(
theme
.
isLightTheme
()
)
{
if
(
theme
.
type
===
LIGHT
)
{
value
+=
`
::-webkit-scrollbar-thumb {
background-color: rgba(100, 100, 100, 0.4);
...
...
@@ -198,7 +198,7 @@ export default class Webview {
activeTheme
=
'
vscode-light
'
;
}
else
if
(
theme
.
isDarkTheme
()
)
{
}
else
if
(
theme
.
type
===
DARK
)
{
value
+=
`
::-webkit-scrollbar-thumb {
background-color: rgba(121, 121, 121, 0.4);
...
...
src/vs/workbench/parts/output/browser/outputPanel.ts
浏览文件 @
85183296
...
...
@@ -21,7 +21,7 @@ import { EditorInput, EditorOptions } from 'vs/workbench/common/editor';
import
{
TextResourceEditor
}
from
'
vs/workbench/browser/parts/editor/textResourceEditor
'
;
import
{
OutputEditors
,
OUTPUT_PANEL_ID
,
IOutputService
,
CONTEXT_IN_OUTPUT
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
SwitchOutputAction
,
SwitchOutputActionItem
,
ClearOutputAction
,
ToggleOutputScrollLockAction
}
from
'
vs/workbench/parts/output/browser/outputActions
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
...
...
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
浏览文件 @
85183296
...
...
@@ -32,7 +32,7 @@ import { SearchWidget, SettingsTabsWidget } from 'vs/workbench/parts/preferences
import
{
ContextKeyExpr
,
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
CommonEditorRegistry
,
Command
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
...
...
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
浏览文件 @
85183296
...
...
@@ -35,7 +35,7 @@ import { IAction, IActionItem, ActionRunner } from 'vs/base/common/actions';
import
{
createActionItem
}
from
'
vs/platform/actions/browser/menuItemActionItem
'
;
import
{
SCMMenus
}
from
'
./scmMenus
'
;
import
{
ActionBar
,
IActionItemProvider
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
I
WorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
I
ThemeService
,
LIGHT
}
from
"
vs/platform/theme/common/themeService
"
;
import
{
InputBox
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
comparePaths
}
from
'
vs/base/common/comparers
'
;
...
...
@@ -134,7 +134,7 @@ class ResourceRenderer implements IRenderer<ISCMResource, ResourceTemplate> {
private
scmMenus
:
SCMMenus
,
private
actionItemProvider
:
IActionItemProvider
,
private
getSelectedResources
:
()
=>
URI
[],
@
I
WorkbenchThemeService
private
themeService
:
IWorkbench
ThemeService
,
@
I
ThemeService
private
themeService
:
I
ThemeService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
}
...
...
@@ -159,8 +159,8 @@ class ResourceRenderer implements IRenderer<ISCMResource, ResourceTemplate> {
template
.
actionBar
.
push
(
this
.
scmMenus
.
getResourceActions
(
resource
));
toggleClass
(
template
.
name
,
'
strike-through
'
,
resource
.
decorations
.
strikeThrough
);
const
theme
=
this
.
themeService
.
get
Color
Theme
();
const
icon
=
theme
.
isDarkTheme
()
?
resource
.
decorations
.
iconDark
:
resource
.
decorations
.
icon
;
const
theme
=
this
.
themeService
.
getTheme
();
const
icon
=
theme
.
type
===
LIGHT
?
resource
.
decorations
.
icon
:
resource
.
decorations
.
iconDark
;
if
(
icon
)
{
template
.
decorationIcon
.
style
.
backgroundImage
=
`url('
${
icon
}
')`
;
...
...
@@ -209,7 +209,7 @@ export class SCMViewlet extends Viewlet {
@
IMessageService
private
messageService
:
IMessageService
,
@
IListService
private
listService
:
IListService
,
@
IContextMenuService
private
contextMenuService
:
IContextMenuService
,
@
I
WorkbenchThemeService
protected
themeService
:
IWorkbench
ThemeService
,
@
I
ThemeService
protected
themeService
:
I
ThemeService
,
@
IMenuService
private
menuService
:
IMenuService
,
@
IModelService
private
modelService
:
IModelService
)
{
...
...
@@ -284,7 +284,7 @@ export class SCMViewlet extends Viewlet {
this
.
setActiveProvider
(
this
.
scmService
.
activeProvider
);
this
.
scmService
.
onDidChangeProvider
(
this
.
setActiveProvider
,
this
,
this
.
disposables
);
this
.
themeService
.
on
DidColor
ThemeChange
(
this
.
update
,
this
,
this
.
disposables
);
this
.
themeService
.
onThemeChange
(
this
.
update
,
this
,
this
.
disposables
);
return
TPromise
.
as
(
null
);
}
...
...
src/vs/workbench/parts/search/browser/openFileHandler.ts
浏览文件 @
85183296
...
...
@@ -17,7 +17,7 @@ import { IRange } from 'vs/editor/common/editorCommon';
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
getIconClasses
}
from
'
vs/workbench/browser/labels
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IAutoFocus
}
from
'
vs/base/parts/quickopen/common/quickOpen
'
;
import
{
QuickOpenEntry
,
QuickOpenModel
}
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
QuickOpenHandler
,
EditorQuickOpenEntry
}
from
'
vs/workbench/browser/quickopen
'
;
...
...
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
浏览文件 @
85183296
...
...
@@ -15,7 +15,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message';
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
IWorkbenchActionRegistry
,
Extensions
}
from
'
vs/workbench/common/actionRegistry
'
;
import
{
IQuickOpenService
,
IPickOpenEntry
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
IWorkbenchThemeService
,
COLOR_THEME_SETTING
,
ICON_THEME_SETTING
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
,
COLOR_THEME_SETTING
,
ICON_THEME_SETTING
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
VIEWLET_ID
,
IExtensionsViewlet
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
IExtensionGalleryService
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
...
...
src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts
浏览文件 @
85183296
...
...
@@ -12,7 +12,7 @@ import { IModeService } from 'vs/editor/common/services/modeService';
import
pfs
=
require
(
'
vs/base/node/pfs
'
);
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IInstantiationService
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWorkbenchThemeService
,
IColorTheme
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
,
IColorTheme
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
toResource
}
from
'
vs/workbench/common/editor
'
;
import
{
ITextMateService
}
from
'
vs/editor/node/textMate/textMateService
'
;
...
...
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
浏览文件 @
85183296
...
...
@@ -12,7 +12,7 @@ import { Builder } from 'vs/base/browser/builder';
import
{
append
,
$
}
from
'
vs/base/browser/dom
'
;
import
{
BaseEditor
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
I
WorkbenchThemeService
}
from
'
vs/workbench/services/themes
/common/themeService
'
;
import
{
I
ThemeService
}
from
'
vs/platform/theme
/common/themeService
'
;
import
{
ReleaseNotesInput
}
from
'
./releaseNotesInput
'
;
import
{
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
WebView
from
'
vs/workbench/parts/html/browser/webview
'
;
...
...
@@ -44,7 +44,7 @@ export class ReleaseNotesEditor extends BaseEditor {
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
I
WorkbenchThemeService
protected
themeService
:
IWorkbench
ThemeService
,
@
I
ThemeService
protected
themeService
:
I
ThemeService
,
@
IOpenerService
private
openerService
:
IOpenerService
,
@
IModeService
private
modeService
:
IModeService
,
@
IPartService
private
partService
:
IPartService
...
...
@@ -88,11 +88,11 @@ export class ReleaseNotesEditor extends BaseEditor {
.
then
<
void
>
(
body
=>
{
this
.
webview
=
new
WebView
(
this
.
content
,
this
.
partService
.
getContainer
(
Parts
.
EDITOR_PART
));
this
.
webview
.
baseUrl
=
`https://code.visualstudio.com/raw/`
;
this
.
webview
.
style
(
this
.
themeService
.
get
Color
Theme
());
this
.
webview
.
style
(
this
.
themeService
.
getTheme
());
this
.
webview
.
contents
=
[
body
];
this
.
webview
.
onDidClickLink
(
link
=>
this
.
openerService
.
open
(
link
),
null
,
this
.
contentDisposables
);
this
.
themeService
.
on
DidColor
ThemeChange
(
themeId
=>
this
.
webview
.
style
(
themeId
),
null
,
this
.
contentDisposables
);
this
.
themeService
.
onThemeChange
(
themeId
=>
this
.
webview
.
style
(
themeId
),
null
,
this
.
contentDisposables
);
this
.
contentDisposables
.
push
(
this
.
webview
);
this
.
contentDisposables
.
push
(
toDisposable
(()
=>
this
.
webview
=
null
));
});
...
...
src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts
浏览文件 @
85183296
...
...
@@ -19,7 +19,7 @@ import { EditorOptions } from 'vs/workbench/common/editor';
import
{
BaseEditor
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
WalkThroughInput
}
from
'
vs/workbench/parts/welcome/walkThrough/node/walkThroughInput
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
marked
}
from
'
vs/base/common/marked/marked
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
...
...
src/vs/workbench/services/themes/common/
t
hemeService.ts
→
src/vs/workbench/services/themes/common/
workbenchT
hemeService.ts
浏览文件 @
85183296
文件已移动
src/vs/workbench/services/themes/electron-browser/colorThemeData.ts
浏览文件 @
85183296
...
...
@@ -6,7 +6,7 @@
import
Paths
=
require
(
'
vs/base/common/paths
'
);
import
Json
=
require
(
'
vs/base/common/json
'
);
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
ExtensionData
,
ITokenColorizationRule
,
IColorTheme
,
IColorMap
,
VS_LIGHT_THEME
,
VS_HC_THEME
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
ExtensionData
,
ITokenColorizationRule
,
IColorTheme
,
IColorMap
,
VS_LIGHT_THEME
,
VS_HC_THEME
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
convertSettings
}
from
'
vs/workbench/services/themes/electron-browser/themeCompatibility
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
getBaseThemeId
,
getSyntaxThemeId
,
isDarkTheme
,
isLightTheme
}
from
'
vs/platform/theme/common/themes
'
;
...
...
src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts
浏览文件 @
85183296
...
...
@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
ITokenColorizationRule
,
IColorMap
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
ITokenColorizationRule
,
IColorMap
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
*
as
colorRegistry
from
'
vs/platform/theme/common/colorRegistry
'
;
...
...
src/vs/workbench/services/themes/electron-browser/
t
hemeService.ts
→
src/vs/workbench/services/themes/electron-browser/
workbenchT
hemeService.ts
浏览文件 @
85183296
...
...
@@ -12,7 +12,7 @@ import * as types from 'vs/base/common/types';
import
{
IThemeExtensionPoint
}
from
'
vs/platform/theme/common/themeExtensionPoint
'
;
import
{
IExtensionService
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
ExtensionsRegistry
,
ExtensionMessageCollector
}
from
'
vs/platform/extensions/common/extensionsRegistry
'
;
import
{
IWorkbenchThemeService
,
IColorTheme
,
IFileIconTheme
,
ExtensionData
,
VS_LIGHT_THEME
,
VS_DARK_THEME
,
VS_HC_THEME
,
COLOR_THEME_SETTING
,
ICON_THEME_SETTING
}
from
'
vs/workbench/services/themes/common/
t
hemeService
'
;
import
{
IWorkbenchThemeService
,
IColorTheme
,
IFileIconTheme
,
ExtensionData
,
VS_LIGHT_THEME
,
VS_DARK_THEME
,
VS_HC_THEME
,
COLOR_THEME_SETTING
,
ICON_THEME_SETTING
}
from
'
vs/workbench/services/themes/common/
workbenchT
hemeService
'
;
import
{
IWindowIPCService
}
from
'
vs/workbench/services/window/electron-browser/windowService
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录