Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
48bc6705
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,发现更多精彩内容 >>
提交
48bc6705
编写于
8月 23, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused
上级
1897d17b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
36 deletion
+29
-36
src/vs/workbench/browser/parts/editor/stringEditor.ts
src/vs/workbench/browser/parts/editor/stringEditor.ts
+1
-3
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
+1
-3
src/vs/workbench/browser/parts/editor/textEditor.ts
src/vs/workbench/browser/parts/editor/textEditor.ts
+25
-24
src/vs/workbench/parts/files/browser/editors/textFileEditor.ts
...s/workbench/parts/files/browser/editors/textFileEditor.ts
+1
-3
src/vs/workbench/parts/output/browser/outputPanel.ts
src/vs/workbench/parts/output/browser/outputPanel.ts
+1
-3
未找到文件。
src/vs/workbench/browser/parts/editor/stringEditor.ts
浏览文件 @
48bc6705
...
...
@@ -22,7 +22,6 @@ import {IEventService} from 'vs/platform/event/common/event';
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
/**
...
...
@@ -44,10 +43,9 @@ export class StringEditor extends BaseTextEditor {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IEventService
eventService
:
IEventService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IModeService
modeService
:
IModeService
,
@
IThemeService
themeService
:
IThemeService
)
{
super
(
StringEditor
.
ID
,
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
modeService
,
themeService
);
super
(
StringEditor
.
ID
,
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
themeService
);
this
.
mapResourceToEditorViewState
=
Object
.
create
(
null
);
...
...
src/vs/workbench/browser/parts/editor/textDiffEditor.ts
浏览文件 @
48bc6705
...
...
@@ -34,7 +34,6 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
RawContextKey
,
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
...
...
@@ -62,11 +61,10 @@ export class TextDiffEditor extends BaseTextEditor {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IEventService
eventService
:
IEventService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IModeService
modeService
:
IModeService
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
IThemeService
themeService
:
IThemeService
)
{
super
(
TextDiffEditor
.
ID
,
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
modeService
,
themeService
);
super
(
TextDiffEditor
.
ID
,
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
themeService
);
this
.
textDiffEditorVisible
=
TextCompareEditorVisible
.
bindTo
(
contextKeyService
);
}
...
...
src/vs/workbench/browser/parts/editor/textEditor.ts
浏览文件 @
48bc6705
...
...
@@ -23,7 +23,6 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
...
...
@@ -34,7 +33,7 @@ import {Selection} from 'vs/editor/common/core/selection';
export
abstract
class
BaseTextEditor
extends
BaseEditor
{
private
editorControl
:
IEditor
;
private
_editorContainer
:
Builder
;
private
_hasPendingConfigurationChange
=
false
;
private
hasPendingConfigurationChange
:
boolean
;
constructor
(
id
:
string
,
...
...
@@ -46,13 +45,12 @@ export abstract class BaseTextEditor extends BaseEditor {
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IEventService
private
_eventService
:
IEventService
,
@
IWorkbenchEditorService
private
_editorService
:
IWorkbenchEditorService
,
@
IModeService
private
_modeService
:
IModeService
,
@
IThemeService
private
_themeService
:
IThemeService
@
IThemeService
private
themeService
:
IThemeService
)
{
super
(
id
,
telemetryService
);
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
handleConfigurationChangeEvent
(
e
.
config
)));
this
.
toUnbind
.
push
(
_
themeService
.
onDidColorThemeChange
(
_
=>
this
.
handleConfigurationChangeEvent
()));
this
.
toUnbind
.
push
(
themeService
.
onDidColorThemeChange
(
_
=>
this
.
handleConfigurationChangeEvent
()));
}
public
get
instantiationService
():
IInstantiationService
{
...
...
@@ -71,18 +69,30 @@ export abstract class BaseTextEditor extends BaseEditor {
return
this
.
_messageService
;
}
public
get
eventService
():
IEventService
{
return
this
.
_eventService
;
}
public
get
editorService
()
{
return
this
.
_editorService
;
}
public
get
editorContainer
():
Builder
{
return
this
.
_editorContainer
;
}
private
handleConfigurationChangeEvent
(
configuration
?:
any
):
void
{
if
(
this
.
isVisible
())
{
this
.
applyConfiguration
(
configuration
);
}
else
{
this
.
_
hasPendingConfigurationChange
=
true
;
this
.
hasPendingConfigurationChange
=
true
;
}
}
private
consumePendingConfigurationChangeEvent
():
void
{
if
(
this
.
_
hasPendingConfigurationChange
)
{
if
(
this
.
hasPendingConfigurationChange
)
{
this
.
applyConfiguration
(
this
.
configurationService
.
getConfiguration
());
this
.
_
hasPendingConfigurationChange
=
false
;
this
.
hasPendingConfigurationChange
=
false
;
}
}
...
...
@@ -90,14 +100,17 @@ export abstract class BaseTextEditor extends BaseEditor {
if
(
!
this
.
editorControl
)
{
return
;
}
// Configuration & Options
if
(
configuration
)
{
// Update Editor with configuration and editor settings
let
specificEditorSettings
=
this
.
getCodeEditorOptions
();
const
specificEditorSettings
=
this
.
getCodeEditorOptions
();
configuration
=
objects
.
clone
(
configuration
);
// dont modify original config
objects
.
assign
(
configuration
[
EditorConfiguration
.
EDITOR_SECTION
],
specificEditorSettings
);
EditorConfiguration
.
apply
(
configuration
,
this
.
editorControl
);
}
}
else
{
// Just options
else
{
this
.
editorControl
.
updateOptions
(
this
.
getCodeEditorOptions
());
}
}
...
...
@@ -107,22 +120,10 @@ export abstract class BaseTextEditor extends BaseEditor {
overviewRulerLanes
:
3
,
glyphMargin
:
true
,
lineNumbersMinChars
:
3
,
theme
:
this
.
_
themeService
.
getColorTheme
()
theme
:
this
.
themeService
.
getColorTheme
()
};
}
public
get
eventService
():
IEventService
{
return
this
.
_eventService
;
}
public
get
editorService
()
{
return
this
.
_editorService
;
}
public
get
editorContainer
():
Builder
{
return
this
.
_editorContainer
;
}
public
createEditor
(
parent
:
Builder
):
void
{
// Editor for Text
...
...
src/vs/workbench/parts/files/browser/editors/textFileEditor.ts
浏览文件 @
48bc6705
...
...
@@ -32,7 +32,6 @@ import {IEventService} from 'vs/platform/event/common/event';
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IMessageService
,
CancelAction
}
from
'
vs/platform/message/common/message
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IThemeService
}
from
'
vs/workbench/services/themes/common/themeService
'
;
const
TEXT_EDITOR_VIEW_STATE_PREFERENCE_KEY
=
'
textEditorViewState
'
;
...
...
@@ -61,10 +60,9 @@ export class TextFileEditor extends BaseTextEditor {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IEventService
eventService
:
IEventService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IModeService
modeService
:
IModeService
,
@
IThemeService
themeService
:
IThemeService
)
{
super
(
TextFileEditor
.
ID
,
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
modeService
,
themeService
);
super
(
TextFileEditor
.
ID
,
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
themeService
);
// Since we are the one providing save-support for models, we hook up the error handler for saving
TextFileEditorModel
.
setSaveErrorHandler
(
instantiationService
.
createInstance
(
SaveErrorHandler
));
...
...
src/vs/workbench/parts/output/browser/outputPanel.ts
浏览文件 @
48bc6705
...
...
@@ -10,7 +10,6 @@ import {Action, IAction} from 'vs/base/common/actions';
import
{
Builder
}
from
'
vs/base/browser/builder
'
;
import
{
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IEditorOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
...
...
@@ -40,12 +39,11 @@ export class OutputPanel extends StringEditor {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IEventService
eventService
:
IEventService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IModeService
modeService
:
IModeService
,
@
IThemeService
themeService
:
IThemeService
,
@
IOutputService
private
outputService
:
IOutputService
)
{
super
(
telemetryService
,
instantiationService
,
contextService
,
storageService
,
messageService
,
configurationService
,
eventService
,
editorService
,
modeService
,
themeService
);
messageService
,
configurationService
,
eventService
,
editorService
,
themeService
);
this
.
toDispose
=
[];
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录