Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
1ee0c147
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,发现更多精彩内容 >>
提交
1ee0c147
编写于
8月 18, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove editor options from context service
上级
7d9506c4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
27 deletion
+8
-27
src/vs/workbench/browser/parts/editor/textEditor.ts
src/vs/workbench/browser/parts/editor/textEditor.ts
+2
-8
src/vs/workbench/common/options.ts
src/vs/workbench/common/options.ts
+0
-6
src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
...h/parts/debug/electron-browser/debugEditorContribution.ts
+5
-5
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+0
-3
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+1
-5
未找到文件。
src/vs/workbench/browser/parts/editor/textEditor.ts
浏览文件 @
1ee0c147
...
...
@@ -9,11 +9,10 @@ import {TPromise} from 'vs/base/common/winjs.base';
import
{
Dimension
,
Builder
}
from
'
vs/base/browser/builder
'
;
import
objects
=
require
(
'
vs/base/common/objects
'
);
import
{
CodeEditorWidget
}
from
'
vs/editor/browser/widget/codeEditorWidget
'
;
import
{
EventType
as
WorkbenchEventType
}
from
'
vs/workbench/common/events
'
;
import
{
EditorInput
,
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
{
BaseEditor
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
EditorConfiguration
}
from
'
vs/editor/common/config/commonEditorConfig
'
;
import
{
IEditor
,
EventType
,
IEditorOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IEditor
,
IEditorOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
import
{
Position
}
from
'
vs/platform/editor/common/editor
'
;
...
...
@@ -52,9 +51,7 @@ export abstract class BaseTextEditor extends BaseEditor {
)
{
super
(
id
,
telemetryService
);
this
.
toUnbind
.
push
(
this
.
_eventService
.
addListener2
(
WorkbenchEventType
.
WORKBENCH_OPTIONS_CHANGED
,
_
=>
this
.
handleConfigurationChangeEvent
()));
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
handleConfigurationChangeEvent
(
e
.
config
)));
this
.
toUnbind
.
push
(
_themeService
.
onDidColorThemeChange
(
_
=>
this
.
handleConfigurationChangeEvent
()));
}
...
...
@@ -106,15 +103,12 @@ export abstract class BaseTextEditor extends BaseEditor {
}
protected
getCodeEditorOptions
():
IEditorOptions
{
let
baseOptions
:
IEditorOptions
=
{
return
{
overviewRulerLanes
:
3
,
glyphMargin
:
true
,
lineNumbersMinChars
:
3
,
theme
:
this
.
_themeService
.
getColorTheme
()
};
// Always mixin editor options from the context into our set to allow for override
return
objects
.
mixin
(
baseOptions
,
this
.
contextService
.
getOptions
().
editor
);
}
public
get
eventService
():
IEventService
{
...
...
src/vs/workbench/common/options.ts
浏览文件 @
1ee0c147
...
...
@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
IEditorOptions
}
from
'
vs/editor/common/editorCommon
'
;
import
{
IResourceInput
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IUserFriendlyKeybinding
}
from
'
vs/platform/keybinding/common/keybinding
'
;
...
...
@@ -36,11 +35,6 @@ export interface IOptions {
*/
extensionsToInstall
?:
string
[];
/**
* Editor options to be used for any editor in the workbench.
*/
editor
?:
IEditorOptions
;
/**
* The global application settings if any.
*/
...
...
src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
浏览文件 @
1ee0c147
...
...
@@ -17,10 +17,10 @@ import editorcommon = require('vs/editor/common/editorCommon');
import
{
DebugHoverWidget
}
from
'
vs/workbench/parts/debug/electron-browser/debugHover
'
;
import
debugactions
=
require
(
'
vs/workbench/parts/debug/browser/debugActions
'
);
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/common/services/codeEditorService
'
;
const
HOVER_DELAY
=
300
;
...
...
@@ -41,9 +41,9 @@ export class DebugEditorContribution implements debug.IDebugEditorContribution {
constructor
(
private
editor
:
editorbrowser
.
ICodeEditor
,
@
debug
.
IDebugService
private
debugService
:
debug
.
IDebugService
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IContextMenuService
private
contextMenuService
:
IContextMenuService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
ICodeEditorService
private
codeEditorService
:
ICodeEditorService
)
{
this
.
breakpointHintDecoration
=
[];
this
.
hoverWidget
=
new
DebugHoverWidget
(
this
.
editor
,
this
.
debugService
,
this
.
instantiationService
);
...
...
@@ -165,8 +165,8 @@ export class DebugEditorContribution implements debug.IDebugEditorContribution {
if
(
state
!==
debug
.
State
.
Stopped
)
{
this
.
hideHoverWidget
();
}
this
.
co
ntextService
.
updateOptions
(
'
editor
'
,
{
hover
:
state
!==
debug
.
State
.
Stopped
this
.
co
deEditorService
.
listCodeEditors
().
forEach
(
e
=>
{
e
.
updateOptions
({
hover
:
state
!==
debug
.
State
.
Stopped
});
});
}
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
1ee0c147
...
...
@@ -652,9 +652,6 @@ export class DebugService implements debug.IDebugService {
this
.
partService
.
addClass
(
'
debugging
'
);
}
this
.
extensionService
.
activateByEvent
(
`onDebug:
${
configuration
.
type
}
`
).
done
(
null
,
errors
.
onUnexpectedError
);
this
.
contextService
.
updateOptions
(
'
editor
'
,
{
glyphMargin
:
true
});
this
.
inDebugMode
.
set
(
true
);
this
.
lazyTransitionToRunningState
();
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
1ee0c147
...
...
@@ -5,7 +5,6 @@
import
'
vs/css!./../browser/media/repl
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
...
...
@@ -213,7 +212,7 @@ export class Repl extends Panel {
}
private
getReplInputOptions
():
IEditorOptions
{
let
baseOptions
:
IEditorOptions
=
{
return
{
overviewRulerLanes
:
0
,
glyphMargin
:
false
,
lineNumbers
:
false
,
...
...
@@ -229,9 +228,6 @@ export class Repl extends Panel {
lineHeight
:
21
,
theme
:
this
.
themeService
.
getColorTheme
()
};
// Always mixin editor options from the context into our set to allow for override
return
objects
.
mixin
(
baseOptions
,
this
.
contextService
.
getOptions
().
editor
);
}
public
dispose
():
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录