Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f2c47075
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,发现更多精彩内容 >>
提交
f2c47075
编写于
12月 30, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tslint: less implicit any use
上级
7215ec28
变更
51
显示空白变更内容
内联
并排
Showing
51 changed file
with
74 addition
and
105 deletion
+74
-105
src/vs/base/browser/builder.ts
src/vs/base/browser/builder.ts
+1
-1
src/vs/base/browser/event.ts
src/vs/base/browser/event.ts
+3
-3
src/vs/base/browser/htmlContentRenderer.ts
src/vs/base/browser/htmlContentRenderer.ts
+1
-1
src/vs/base/browser/ui/list/listView.ts
src/vs/base/browser/ui/list/listView.ts
+1
-1
src/vs/base/browser/ui/list/listWidget.ts
src/vs/base/browser/ui/list/listWidget.ts
+2
-2
src/vs/base/common/async.ts
src/vs/base/common/async.ts
+1
-1
src/vs/base/common/color.ts
src/vs/base/common/color.ts
+3
-3
src/vs/base/common/comparers.ts
src/vs/base/common/comparers.ts
+2
-2
src/vs/base/common/decorators.ts
src/vs/base/common/decorators.ts
+1
-1
src/vs/base/common/diagnostics.ts
src/vs/base/common/diagnostics.ts
+1
-1
src/vs/base/common/diff/diff2.ts
src/vs/base/common/diff/diff2.ts
+2
-2
src/vs/base/common/event.ts
src/vs/base/common/event.ts
+3
-3
src/vs/base/common/filters.ts
src/vs/base/common/filters.ts
+2
-2
src/vs/base/common/json.ts
src/vs/base/common/json.ts
+1
-1
src/vs/base/common/map.ts
src/vs/base/common/map.ts
+1
-1
src/vs/base/common/platform.ts
src/vs/base/common/platform.ts
+3
-3
src/vs/base/node/zip.ts
src/vs/base/node/zip.ts
+1
-1
src/vs/platform/environment/node/argv.ts
src/vs/platform/environment/node/argv.ts
+1
-1
src/vs/platform/keybinding/common/keybindingsRegistry.ts
src/vs/platform/keybinding/common/keybindingsRegistry.ts
+1
-1
src/vs/workbench/api/node/mainThreadEditorsTracker.ts
src/vs/workbench/api/node/mainThreadEditorsTracker.ts
+1
-1
src/vs/workbench/api/node/mainThreadTreeExplorers.ts
src/vs/workbench/api/node/mainThreadTreeExplorers.ts
+1
-1
src/vs/workbench/api/node/mainThreadWorkspace.ts
src/vs/workbench/api/node/mainThreadWorkspace.ts
+3
-3
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
+0
-2
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
+1
-1
src/vs/workbench/common/editor/editorStacksModel.ts
src/vs/workbench/common/editor/editorStacksModel.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
...h/parts/debug/electron-browser/debugEditorContribution.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
+3
-3
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+0
-2
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
+1
-1
src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts
...rkbench/parts/explorers/browser/views/treeExplorerView.ts
+1
-9
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
...s/workbench/parts/extensions/browser/extensionsActions.ts
+1
-1
src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.ts
...workbench/parts/extensions/browser/extensionsQuickOpen.ts
+1
-1
src/vs/workbench/parts/files/browser/fileActions.ts
src/vs/workbench/parts/files/browser/fileActions.ts
+0
-1
src/vs/workbench/parts/files/browser/saveErrorHandler.ts
src/vs/workbench/parts/files/browser/saveErrorHandler.ts
+0
-1
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
.../workbench/parts/preferences/browser/preferencesEditor.ts
+3
-3
src/vs/workbench/parts/search/common/searchModel.ts
src/vs/workbench/parts/search/common/searchModel.ts
+1
-1
src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts
...kbench/parts/snippets/electron-browser/snippetsTracker.ts
+0
-2
src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts
...bench/parts/terminal/electron-browser/terminalInstance.ts
+2
-2
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
...bench/parts/update/electron-browser/releaseNotesEditor.ts
+0
-6
src/vs/workbench/parts/update/electron-browser/update.ts
src/vs/workbench/parts/update/electron-browser/update.ts
+7
-10
src/vs/workbench/services/configuration/node/configurationService.ts
...bench/services/configuration/node/configurationService.ts
+1
-1
src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts
...nfiguration/test/node/configurationEditingService.test.ts
+1
-3
src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts
...onfigurationResolver/node/configurationResolverService.ts
+1
-1
src/vs/workbench/services/search/node/textSearch.ts
src/vs/workbench/services/search/node/textSearch.ts
+1
-1
src/vs/workbench/services/search/node/worker/searchWorker.ts
src/vs/workbench/services/search/node/worker/searchWorker.ts
+1
-1
src/vs/workbench/services/telemetry/common/workspaceStats.ts
src/vs/workbench/services/telemetry/common/workspaceStats.ts
+3
-2
src/vs/workbench/services/textfile/common/textFileService.ts
src/vs/workbench/services/textfile/common/textFileService.ts
+0
-2
src/vs/workbench/services/textfile/electron-browser/textFileService.ts
...nch/services/textfile/electron-browser/textFileService.ts
+1
-3
src/vs/workbench/services/themes/electron-browser/stylesContributions.ts
...h/services/themes/electron-browser/stylesContributions.ts
+2
-2
src/vs/workbench/services/themes/electron-browser/themeService.ts
...orkbench/services/themes/electron-browser/themeService.ts
+3
-3
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+1
-2
未找到文件。
src/vs/base/browser/builder.ts
浏览文件 @
f2c47075
...
...
@@ -692,7 +692,7 @@ export class Builder implements IDisposable {
}
};
return
this
.
on
(
arg1
,
fn
,
listenerToUnbindContainer
);
return
this
.
on
(
arg1
,
fn
,
listenerToUnbindContainer
,
useCapture
);
}
/**
...
...
src/vs/base/browser/event.ts
浏览文件 @
f2c47075
...
...
@@ -114,14 +114,14 @@ export interface IDomEvent {
(
element
:
EventHandler
,
type
:
string
,
useCapture
?:
boolean
):
_Event
<
any
>
;
}
export
const
domEvent
:
IDomEvent
=
(
element
:
EventHandler
,
type
:
string
,
useCapture
?)
=>
{
export
const
domEvent
:
IDomEvent
=
(
element
:
EventHandler
,
type
:
string
,
useCapture
?
:
boolean
)
=>
{
const
fn
=
e
=>
emitter
.
fire
(
e
);
const
emitter
=
new
Emitter
<
any
>
({
onFirstListenerAdd
:
()
=>
{
element
.
addEventListener
(
type
,
fn
);
element
.
addEventListener
(
type
,
fn
,
useCapture
);
},
onLastListenerRemove
:
()
=>
{
element
.
removeEventListener
(
type
,
fn
);
element
.
removeEventListener
(
type
,
fn
,
useCapture
);
}
});
...
...
src/vs/base/browser/htmlContentRenderer.ts
浏览文件 @
f2c47075
...
...
@@ -91,7 +91,7 @@ function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}):
const
renderer
=
new
marked
.
Renderer
();
renderer
.
image
=
(
href
:
string
,
title
:
string
,
text
:
string
)
=>
{
let
dimensions
=
[];
let
dimensions
:
string
[]
=
[];
if
(
href
)
{
const
splitted
=
href
.
split
(
'
|
'
).
map
(
s
=>
s
.
trim
());
href
=
splitted
[
0
];
...
...
src/vs/base/browser/ui/list/listView.ts
浏览文件 @
f2c47075
...
...
@@ -240,7 +240,7 @@ export class ListView<T> implements IDisposable {
return
DOM
.
addDisposableListener
(
domNode
,
type
,
handler
,
useCapture
);
}
private
fireScopedEvent
(
handler
:
(
event
:
any
)
=>
void
,
index
)
{
private
fireScopedEvent
(
handler
:
(
event
:
any
)
=>
void
,
index
:
number
)
{
if
(
index
<
0
)
{
return
;
}
...
...
src/vs/base/browser/ui/list/listWidget.ts
浏览文件 @
f2c47075
...
...
@@ -65,7 +65,7 @@ class Trait<T> implements IDisposable {
splice
(
start
:
number
,
deleteCount
:
number
,
insertCount
:
number
):
void
{
const
diff
=
insertCount
-
deleteCount
;
const
end
=
start
+
deleteCount
;
const
indexes
=
[];
const
indexes
:
number
[]
=
[];
for
(
let
index
of
indexes
)
{
if
(
index
>=
start
&&
index
<
end
)
{
...
...
@@ -110,7 +110,7 @@ class Trait<T> implements IDisposable {
class
FocusTrait
<
T
>
extends
Trait
<
T
>
{
constructor
(
private
getElementId
:
(
number
)
=>
string
)
{
constructor
(
private
getElementId
:
(
number
:
number
)
=>
string
)
{
super
(
'
focused
'
);
}
...
...
src/vs/base/common/async.ts
浏览文件 @
f2c47075
...
...
@@ -402,7 +402,7 @@ export function sequence<T>(promiseFactories: ITask<TPromise<T>>[]): TPromise<T[
export
function
first
<
T
>
(
promiseFactories
:
ITask
<
TPromise
<
T
>>
[],
shouldStop
:
(
t
:
T
)
=>
boolean
=
t
=>
!!
t
):
TPromise
<
T
>
{
promiseFactories
=
[...
promiseFactories
.
reverse
()];
const
loop
=
()
=>
{
const
loop
:
()
=>
TPromise
<
T
>
=
()
=>
{
if
(
promiseFactories
.
length
===
0
)
{
return
TPromise
.
as
(
null
);
}
...
...
src/vs/base/common/color.ts
浏览文件 @
f2c47075
...
...
@@ -65,12 +65,12 @@ function hsla2rgba(hsla: HSLA): RGBA {
let
s
=
Math
.
min
(
hsla
.
s
,
1
);
let
l
=
Math
.
min
(
hsla
.
l
,
1
);
let
a
=
hsla
.
a
===
void
0
?
hsla
.
a
:
1
;
let
r
,
g
,
b
;
let
r
:
number
,
g
:
number
,
b
:
number
;
if
(
s
===
0
)
{
r
=
g
=
b
=
l
;
// achromatic
}
else
{
let
hue2rgb
=
function
hue2rgb
(
p
,
q
,
t
)
{
let
hue2rgb
=
function
hue2rgb
(
p
:
number
,
q
:
number
,
t
:
number
)
{
if
(
t
<
0
)
{
t
+=
1
;
}
...
...
@@ -115,7 +115,7 @@ export class Color {
* Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
*/
public
getLuminosity
():
number
{
let
luminosityFor
=
function
(
color
):
number
{
let
luminosityFor
=
function
(
color
:
number
):
number
{
let
c
=
color
/
255
;
return
(
c
<=
0.03928
)
?
c
/
12.92
:
Math
.
pow
(((
c
+
0.055
)
/
1.055
),
2.4
);
};
...
...
src/vs/base/common/comparers.ts
浏览文件 @
f2c47075
...
...
@@ -83,8 +83,8 @@ export function compareByPrefix(one: string, other: string, lookFor: string): nu
}
export
interface
IScorableResourceAccessor
<
T
>
{
getLabel
(
T
):
string
;
getResourcePath
(
T
):
string
;
getLabel
(
t
:
T
):
string
;
getResourcePath
(
t
:
T
):
string
;
}
export
function
compareByScore
<
T
>
(
elementA
:
T
,
elementB
:
T
,
accessor
:
IScorableResourceAccessor
<
T
>
,
lookFor
:
string
,
lookForNormalizedLower
:
string
,
scorerCache
?:
{
[
key
:
string
]:
number
}):
number
{
...
...
src/vs/base/common/decorators.ts
浏览文件 @
f2c47075
...
...
@@ -23,7 +23,7 @@ export function memoize(target: any, key: string, descriptor: any) {
const
memoizeKey
=
`$memoize$
${
key
}
`
;
descriptor
[
fnKey
]
=
function
(...
args
)
{
descriptor
[
fnKey
]
=
function
(...
args
:
any
[]
)
{
if
(
!
this
.
hasOwnProperty
(
memoizeKey
))
{
Object
.
defineProperty
(
this
,
memoizeKey
,
{
configurable
:
false
,
...
...
src/vs/base/common/diagnostics.ts
浏览文件 @
f2c47075
...
...
@@ -19,7 +19,7 @@ globals.Monaco.Diagnostics = {};
var
switches
=
globals
.
Monaco
.
Diagnostics
;
var
map
=
{};
var
data
=
[];
var
data
:
any
[]
=
[];
function
fifo
(
array
:
any
[],
size
:
number
)
{
while
(
array
.
length
>
size
)
{
...
...
src/vs/base/common/diff/diff2.ts
浏览文件 @
f2c47075
...
...
@@ -148,8 +148,8 @@ export class LcsDiff2 {
// Construct the changes
let
i
=
0
;
let
j
=
0
;
let
xChangeStart
,
yChangeStart
;
let
changes
=
[];
let
xChangeStart
:
number
,
yChangeStart
:
number
;
let
changes
:
DiffChange
[]
=
[];
while
(
i
<
xLength
&&
j
<
yLength
)
{
if
(
this
.
resultX
[
i
]
&&
this
.
resultY
[
j
])
{
// No change
...
...
src/vs/base/common/event.ts
浏览文件 @
f2c47075
...
...
@@ -218,7 +218,7 @@ export function once<T>(event: Event<T>): Event<T> {
}
export
function
any
<
T
>
(...
events
:
Event
<
T
>
[]):
Event
<
T
>
{
let
listeners
=
[];
let
listeners
:
IDisposable
[]
=
[];
const
emitter
=
new
Emitter
<
T
>
({
onFirstListenerAdd
()
{
...
...
@@ -297,7 +297,7 @@ export class EventBufferer {
}
bufferEvents
(
fn
:
()
=>
void
):
void
{
const
buffer
=
[];
const
buffer
:
Function
[]
=
[];
this
.
buffers
.
push
(
buffer
);
fn
();
this
.
buffers
.
pop
();
...
...
@@ -334,7 +334,7 @@ class ChainableEvent<T> implements IChainableEvent<T> {
return
new
ChainableEvent
(
filterEvent
(
this
.
_event
,
fn
));
}
on
(
listener
,
thisArgs
,
disposables
)
{
on
(
listener
,
thisArgs
,
disposables
:
IDisposable
[]
)
{
return
this
.
_event
(
listener
,
thisArgs
,
disposables
);
}
}
...
...
src/vs/base/common/filters.ts
浏览文件 @
f2c47075
...
...
@@ -209,7 +209,7 @@ function analyzeCamelCaseWord(word: string): ICamelCaseAnalysis {
}
function
isUpperCaseWord
(
analysis
:
ICamelCaseAnalysis
):
boolean
{
const
{
upperPercent
,
lowerPercent
,
alphaPercent
,
numericPercent
}
=
analysis
;
const
{
upperPercent
,
lowerPercent
}
=
analysis
;
return
lowerPercent
===
0
&&
upperPercent
>
0.6
;
}
...
...
@@ -298,7 +298,7 @@ function _matchesWords(word: string, target: string, i: number, j: number): IMat
}
else
if
(
word
[
i
]
!==
target
[
j
].
toLowerCase
())
{
return
null
;
}
else
{
let
result
=
null
;
let
result
:
IMatch
[]
=
null
;
let
nextWordIndex
=
j
+
1
;
result
=
_matchesWords
(
word
,
target
,
i
+
1
,
j
+
1
);
while
(
!
result
&&
(
nextWordIndex
=
nextWord
(
target
,
nextWordIndex
))
<
target
.
length
)
{
...
...
src/vs/base/common/json.ts
浏览文件 @
f2c47075
...
...
@@ -42,7 +42,7 @@ export interface JSONScanner {
/**
* Sets the scan position to a new offset. A call to 'scan' is needed to get the first token.
*/
setPosition
(
pos
:
number
);
setPosition
(
pos
:
number
)
:
void
;
/**
* Read the next token. Returns the tolen code.
*/
...
...
src/vs/base/common/map.ts
浏览文件 @
f2c47075
...
...
@@ -310,7 +310,7 @@ class Node<E> {
*/
export
class
TrieMap
<
E
>
{
static
PathSplitter
=
s
=>
s
.
split
(
/
[\\/]
/
).
filter
(
s
=>
!!
s
);
static
PathSplitter
=
(
s
:
string
)
=>
s
.
split
(
/
[\\/]
/
).
filter
(
s
=>
!!
s
);
private
_splitter
:
(
s
:
string
)
=>
string
[];
private
_root
=
new
Node
<
E
>
();
...
...
src/vs/base/common/platform.ts
浏览文件 @
f2c47075
...
...
@@ -13,8 +13,8 @@ let _isRootUser = false;
let
_isNative
=
false
;
let
_isWeb
=
false
;
let
_isQunit
=
false
;
let
_locale
=
undefined
;
let
_language
=
undefined
;
let
_locale
:
string
=
undefined
;
let
_language
:
string
=
undefined
;
interface
NLSConfig
{
locale
:
string
;
...
...
@@ -124,7 +124,7 @@ interface IGlobals {
clearTimeout
(
token
:
TimeoutToken
):
void
;
setInterval
(
callback
:
(...
args
:
any
[])
=>
void
,
delay
:
number
,
...
args
:
any
[]):
IntervalToken
;
clearInterval
(
token
:
IntervalToken
);
clearInterval
(
token
:
IntervalToken
)
:
void
;
}
const
_globals
=
<
IGlobals
>
(
typeof
self
===
'
object
'
?
self
:
global
);
...
...
src/vs/base/node/zip.ts
浏览文件 @
f2c47075
...
...
@@ -106,7 +106,7 @@ function read(zipPath: string, filePath: string): TPromise<Readable> {
export
function
buffer
(
zipPath
:
string
,
filePath
:
string
):
TPromise
<
Buffer
>
{
return
read
(
zipPath
,
filePath
).
then
(
stream
=>
{
return
new
TPromise
<
Buffer
>
((
c
,
e
)
=>
{
const
buffers
=
[];
const
buffers
:
Buffer
[]
=
[];
stream
.
once
(
'
error
'
,
e
);
stream
.
on
(
'
data
'
,
b
=>
buffers
.
push
(
b
));
stream
.
on
(
'
end
'
,
()
=>
c
(
Buffer
.
concat
(
buffers
)));
...
...
src/vs/platform/environment/node/argv.ts
浏览文件 @
f2c47075
...
...
@@ -148,7 +148,7 @@ export function formatOptions(options: { [name: string]: string; }, columns: num
}
function
wrapText
(
text
:
string
,
columns
:
number
):
string
[]
{
let
lines
=
[];
let
lines
:
string
[]
=
[];
while
(
text
.
length
)
{
let
index
=
text
.
length
<
columns
?
text
.
length
:
text
.
lastIndexOf
(
'
'
,
columns
);
let
line
=
text
.
slice
(
0
,
index
).
trim
();
...
...
src/vs/platform/keybinding/common/keybindingsRegistry.ts
浏览文件 @
f2c47075
...
...
@@ -23,7 +23,7 @@ export interface ICommandAndKeybindingRule extends IKeybindingRule {
}
export
interface
IKeybindingsRegistry
{
registerKeybindingRule
(
rule
:
IKeybindingRule
);
registerKeybindingRule
(
rule
:
IKeybindingRule
)
:
void
;
registerCommandAndKeybindingRule
(
desc
:
ICommandAndKeybindingRule
):
void
;
getDefaultKeybindings
():
IKeybindingItem
[];
...
...
src/vs/workbench/api/node/mainThreadEditorsTracker.ts
浏览文件 @
f2c47075
...
...
@@ -579,7 +579,7 @@ export class MainThreadEditorsTracker {
}
private
_findVisibleTextEditorIds
():
string
[]
{
let
result
=
[];
let
result
:
string
[]
=
[];
let
modelUris
=
Object
.
keys
(
this
.
_model2TextEditors
);
for
(
let
i
=
0
,
len
=
modelUris
.
length
;
i
<
len
;
i
++
)
{
let
editors
=
this
.
_model2TextEditors
[
modelUris
[
i
]];
...
...
src/vs/workbench/api/node/mainThreadTreeExplorers.ts
浏览文件 @
f2c47075
...
...
@@ -16,7 +16,7 @@ export class MainThreadTreeExplorers extends MainThreadTreeExplorersShape {
private
_proxy
:
ExtHostTreeExplorersShape
;
constructor
(
@
IThreadService
private
threadService
:
IThreadService
,
@
IThreadService
threadService
:
IThreadService
,
@
ITreeExplorerService
private
treeExplorerService
:
ITreeExplorerService
,
@
IMessageService
private
messageService
:
IMessageService
,
@
ICommandService
private
commandService
:
ICommandService
...
...
src/vs/workbench/api/node/mainThreadWorkspace.ts
浏览文件 @
f2c47075
...
...
@@ -30,9 +30,9 @@ export class MainThreadWorkspace extends MainThreadWorkspaceShape {
constructor
(
@
ISearchService
searchService
:
ISearchService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
ITextFileService
textFileService
,
@
IWorkbenchEditorService
editorService
,
@
ITextModelResolverService
textModelResolverService
,
@
ITextFileService
textFileService
:
ITextFileService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
ITextModelResolverService
textModelResolverService
:
ITextModelResolverService
,
@
IFileService
fileService
:
IFileService
)
{
super
();
...
...
src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
浏览文件 @
f2c47075
...
...
@@ -22,7 +22,6 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
import
{
Position
,
POSITIONS
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IEditorGroupService
,
ITabOptions
,
GroupArrangement
,
GroupOrientation
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
...
...
@@ -139,7 +138,6 @@ export class EditorGroupsControl implements IEditorGroupsControl, IVerticalSashL
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IEditorGroupService
private
editorGroupService
:
IEditorGroupService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IContextKeyService
private
contextKeyService
:
IContextKeyService
,
@
IExtensionService
private
extensionService
:
IExtensionService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
...
...
src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
浏览文件 @
f2c47075
...
...
@@ -425,7 +425,7 @@ export class TabsTitleControl extends TitleControl {
}
private
hookTabListeners
(
tab
:
HTMLElement
,
index
:
number
):
IDisposable
{
const
disposables
=
[];
const
disposables
:
IDisposable
[]
=
[];
// Open on Click
disposables
.
push
(
DOM
.
addDisposableListener
(
tab
,
DOM
.
EventType
.
MOUSE_DOWN
,
(
e
:
MouseEvent
)
=>
{
...
...
src/vs/workbench/common/editor/editorStacksModel.ts
浏览文件 @
f2c47075
...
...
@@ -559,7 +559,7 @@ export class EditorGroup implements IEditorGroup {
// It is possible to have the same resource opened twice (once as normal input and once as diff input)
// So we need to do ref counting on the resource to provide the correct picture
let
counter
=
this
.
mapResourceToEditorCount
[
resource
.
toString
()]
||
0
;
let
newCounter
;
let
newCounter
:
number
;
if
(
remove
)
{
if
(
counter
>
1
)
{
newCounter
=
counter
-
1
;
...
...
src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
浏览文件 @
f2c47075
...
...
@@ -66,7 +66,7 @@ export class DebugEditorContribution implements IDebugEditorContribution {
}
private
getContextMenuActions
(
breakpoint
:
IBreakpoint
,
uri
:
uri
,
lineNumber
:
number
):
TPromise
<
IAction
[]
>
{
const
actions
=
[];
const
actions
:
IAction
[]
=
[];
if
(
breakpoint
)
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
RemoveBreakpointAction
,
RemoveBreakpointAction
.
ID
,
RemoveBreakpointAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
EditConditionalBreakpointAction
,
EditConditionalBreakpointAction
.
ID
,
EditConditionalBreakpointAction
.
LABEL
,
this
.
editor
,
lineNumber
));
...
...
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
浏览文件 @
f2c47075
...
...
@@ -110,13 +110,13 @@ export class DebugHoverWidget implements IContentWidget {
}
private
getExactExpressionRange
(
lineContent
:
string
,
range
:
Range
):
Range
{
let
matchingExpression
=
undefined
;
let
matchingExpression
:
string
=
undefined
;
let
startOffset
=
0
;
// Some example supported expressions: myVar.prop, a.b.c.d, myVar?.prop, myVar->prop, MyClass::StaticProp, *myVar
// Match any character except a set of characters which often break interesting sub-expressions
let
expression
:
RegExp
=
/
([^
()
\[\]
{}<>
\s
+
\-/
%~#^;=|,`!
]
|
\-
>
)
+/g
;
let
result
=
undefined
;
let
result
:
RegExpExecArray
=
undefined
;
// First find the full expression under the cursor
while
(
result
=
expression
.
exec
(
lineContent
))
{
...
...
@@ -134,7 +134,7 @@ export class DebugHoverWidget implements IContentWidget {
// For example in expression 'a.b.c.d', if the focus was under 'b', 'a.b' would be evaluated.
if
(
matchingExpression
)
{
let
subExpression
:
RegExp
=
/
\w
+/g
;
let
subExpressionResult
=
undefined
;
let
subExpressionResult
:
RegExpExecArray
=
undefined
;
while
(
subExpressionResult
=
subExpression
.
exec
(
matchingExpression
))
{
let
subEnd
=
subExpressionResult
.
index
+
1
+
startOffset
+
subExpressionResult
[
0
].
length
;
if
(
subEnd
>=
range
.
endColumn
)
{
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
f2c47075
...
...
@@ -29,7 +29,6 @@ import { MenuId } from 'vs/platform/actions/common/actions';
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IContextKeyService
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IInstantiationService
,
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ReplExpressionsRenderer
,
ReplExpressionsController
,
ReplExpressionsDataSource
,
ReplExpressionsActionProvider
,
ReplExpressionsAccessibilityProvider
}
from
'
vs/workbench/parts/debug/electron-browser/replViewer
'
;
...
...
@@ -81,7 +80,6 @@ export class Repl extends Panel implements IPrivateReplService {
constructor
(
@
debug
.
IDebugService
private
debugService
:
debug
.
IDebugService
,
@
IContextMenuService
private
contextMenuService
:
IContextMenuService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IStorageService
private
storageService
:
IStorageService
,
...
...
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
浏览文件 @
f2c47075
...
...
@@ -373,7 +373,7 @@ export class ReplExpressionsRenderer implements IRenderer {
pattern
.
lastIndex
=
0
;
// the holy grail of software development
const
match
=
pattern
.
exec
(
text
);
let
resource
=
null
;
let
resource
:
uri
=
null
;
try
{
resource
=
match
&&
uri
.
file
(
match
[
1
]);
}
catch
(
e
)
{
}
...
...
src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts
浏览文件 @
f2c47075
...
...
@@ -50,19 +50,11 @@ export class TreeExplorerView extends CollapsibleViewletView {
const
dataSource
=
this
.
instantiationService
.
createInstance
(
TreeDataSource
,
this
.
treeNodeProviderId
);
const
renderer
=
this
.
instantiationService
.
createInstance
(
TreeRenderer
,
this
.
viewletState
,
this
.
actionRunner
,
container
.
getHTMLElement
());
const
controller
=
this
.
instantiationService
.
createInstance
(
TreeController
,
this
.
treeNodeProviderId
);
const
sorter
=
null
;
const
filter
=
null
;
const
dnd
=
null
;
const
accessibilityProvider
=
null
;
return
new
Tree
(
container
.
getHTMLElement
(),
{
dataSource
,
renderer
,
controller
,
sorter
,
filter
,
dnd
,
accessibilityProvider
controller
});
}
...
...
src/vs/workbench/parts/extensions/browser/extensionsActions.ts
浏览文件 @
f2c47075
...
...
@@ -313,7 +313,7 @@ export class DropDownMenuActionItem extends ActionItem {
}
private
getActions
():
IAction
[]
{
let
actions
=
[];
let
actions
:
IAction
[]
=
[];
const
menuActionGroups
=
this
.
menuActionGroups
.
filter
(
group
=>
group
.
some
(
action
=>
action
.
enabled
));
for
(
const
menuActions
of
menuActionGroups
)
{
actions
=
[...
actions
,
...
menuActions
,
new
Separator
()];
...
...
src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.ts
浏览文件 @
f2c47075
...
...
@@ -72,7 +72,7 @@ export class GalleryExtensionsHandler extends QuickOpenHandler {
}
getResults
(
text
:
string
):
TPromise
<
IModel
<
any
>>
{
const
entries
=
[];
const
entries
:
SimpleEntry
[]
=
[];
if
(
text
)
{
const
label
=
nls
.
localize
(
'
searchFor
'
,
"
Press Enter to search for '{0}' in the Marketplace.
"
,
text
);
...
...
src/vs/workbench/parts/files/browser/fileActions.ts
浏览文件 @
f2c47075
...
...
@@ -1174,7 +1174,6 @@ export class CompareResourcesAction extends Action {
constructor
(
resource
:
URI
,
tree
:
ITree
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
)
{
super
(
'
workbench.files.action.compareFiles
'
,
CompareResourcesAction
.
computeLabel
());
...
...
src/vs/workbench/parts/files/browser/saveErrorHandler.ts
浏览文件 @
f2c47075
...
...
@@ -183,7 +183,6 @@ class ResolveSaveConflictMessage implements IMessageWithAction {
model
:
ITextFileEditorModel
,
message
:
string
,
@
IMessageService
private
messageService
:
IMessageService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IEnvironmentService
private
environmentService
:
IEnvironmentService
)
{
...
...
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
浏览文件 @
f2c47075
...
...
@@ -97,7 +97,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor {
public
static
ID
:
string
=
'
workbench.editor.defaultPreferences
'
;
private
static
VIEW_STATE
:
Map
<
URI
,
editorCommon
.
IEditorViewState
>
=
new
Map
<
URI
,
editorCommon
.
IEditorViewState
>
();
private
inputDisposeListener
;
private
inputDisposeListener
:
IDisposable
;
private
defaultSettingHeaderWidget
:
DefaultSettingsHeaderWidget
;
private
delayedFilterLogging
:
Delayer
<
void
>
;
...
...
@@ -244,8 +244,8 @@ class DefaultPreferencesCodeEditor extends CodeEditor {
}
export
interface
IPreferencesRenderer
{
render
();
dispose
();
render
()
:
void
;
dispose
()
:
void
;
}
export
abstract
class
PreferencesEditorContribution
extends
Disposable
implements
editorCommon
.
IEditorContribution
{
...
...
src/vs/workbench/parts/search/common/searchModel.ts
浏览文件 @
f2c47075
...
...
@@ -503,7 +503,7 @@ export class SearchModel extends Disposable {
private
currentRequest
:
PPromise
<
ISearchComplete
,
ISearchProgressItem
>
;
constructor
(
@
ISearchService
private
searchService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
constructor
(
@
ISearchService
private
searchService
:
ISearchService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
();
this
.
_searchResult
=
this
.
instantiationService
.
createInstance
(
SearchResult
,
this
);
}
...
...
src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts
浏览文件 @
f2c47075
...
...
@@ -14,7 +14,6 @@ import { mkdirp, fileExists, readdir } from 'vs/base/node/pfs';
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
import
lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
import
{
readAndRegisterSnippets
}
from
'
vs/editor/node/textMate/TMSnippets
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
watch
,
FSWatcher
}
from
'
fs
'
;
...
...
@@ -28,7 +27,6 @@ export class SnippetsTracker implements workbenchExt.IWorkbenchContribution {
private
fileWatchDelayer
:
async
.
ThrottledDelayer
<
void
>
;
constructor
(
@
IFileService
private
fileService
:
IFileService
,
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
,
@
IEnvironmentService
environmentService
:
IEnvironmentService
)
{
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts
浏览文件 @
f2c47075
...
...
@@ -306,7 +306,7 @@ export class TerminalInstance implements ITerminalInstance {
}
protected
_getCwd
(
workspace
:
IWorkspace
,
ignoreCustomCwd
:
boolean
):
string
{
let
cwd
;
let
cwd
:
string
;
// TODO: Handle non-existent customCwd
if
(
!
ignoreCustomCwd
)
{
...
...
@@ -355,7 +355,7 @@ export class TerminalInstance implements ITerminalInstance {
this
.
_onProcessIdReady
.
fire
(
this
);
}
});
this
.
_process
.
on
(
'
exit
'
,
(
exitCode
)
=>
{
this
.
_process
.
on
(
'
exit
'
,
(
exitCode
:
number
)
=>
{
// Prevent dispose functions being triggered multiple times
if
(
!
this
.
_isExiting
)
{
this
.
dispose
();
...
...
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
浏览文件 @
f2c47075
...
...
@@ -16,10 +16,7 @@ import { IThemeService } from 'vs/workbench/services/themes/common/themeService'
import
{
ReleaseNotesInput
}
from
'
./releaseNotesInput
'
;
import
{
EditorOptions
}
from
'
vs/workbench/common/editor
'
;
import
WebView
from
'
vs/workbench/parts/html/browser/webview
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IOpenerService
}
from
'
vs/platform/opener/common/opener
'
;
import
{
IRequestService
}
from
'
vs/platform/request/node/request
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
tokenizeToString
}
from
'
vs/editor/common/modes/textToHtmlTokenizer
'
;
...
...
@@ -46,10 +43,7 @@ export class ReleaseNotesEditor extends BaseEditor {
constructor
(
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IThemeService
private
themeService
:
IThemeService
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IRequestService
private
requestService
:
IRequestService
,
@
IOpenerService
private
openerService
:
IOpenerService
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
,
@
IModeService
private
modeService
:
IModeService
)
{
super
(
ReleaseNotesEditor
.
ID
,
telemetryService
);
...
...
src/vs/workbench/parts/update/electron-browser/update.ts
浏览文件 @
f2c47075
...
...
@@ -119,13 +119,12 @@ export class OpenLatestReleaseNotesInBrowserAction extends Action {
export
abstract
class
AbstractShowReleaseNotesAction
extends
Action
{
constructor
(
id
,
label
,
id
:
string
,
label
:
string
,
private
returnValue
:
boolean
,
private
version
:
string
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IOpenerService
private
openerService
:
IOpenerService
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
super
(
id
,
label
,
null
,
true
);
}
...
...
@@ -153,10 +152,9 @@ export class ShowReleaseNotesAction extends AbstractShowReleaseNotesAction {
returnValue
:
boolean
,
version
:
string
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IOpenerService
openerService
:
IOpenerService
@
IInstantiationService
instantiationService
:
IInstantiationService
)
{
super
(
'
update.showReleaseNotes
'
,
nls
.
localize
(
'
releaseNotes
'
,
"
Release Notes
"
),
returnValue
,
version
,
editorService
,
instantiationService
,
openerService
);
super
(
'
update.showReleaseNotes
'
,
nls
.
localize
(
'
releaseNotes
'
,
"
Release Notes
"
),
returnValue
,
version
,
editorService
,
instantiationService
);
}
}
...
...
@@ -169,10 +167,9 @@ export class ShowCurrentReleaseNotesAction extends AbstractShowReleaseNotesActio
id
=
ShowCurrentReleaseNotesAction
.
ID
,
label
=
ShowCurrentReleaseNotesAction
.
LABEL
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
@
IOpenerService
openerService
:
IOpenerService
@
IInstantiationService
instantiationService
:
IInstantiationService
)
{
super
(
id
,
label
,
true
,
pkg
.
version
,
editorService
,
instantiationService
,
openerService
);
super
(
id
,
label
,
true
,
pkg
.
version
,
editorService
,
instantiationService
);
}
}
...
...
src/vs/workbench/services/configuration/node/configurationService.ts
浏览文件 @
f2c47075
...
...
@@ -187,7 +187,7 @@ export class WorkspaceConfigurationService implements IWorkspaceConfigurationSer
this
.
cachedWorkspaceConfig
=
workspaceConfig
;
// Cache keys
const
workspaceConfigKeys
=
[];
const
workspaceConfigKeys
:
string
[]
=
[];
Object
.
keys
(
workspaceConfigFiles
).
forEach
(
path
=>
{
if
(
path
===
WORKSPACE_CONFIG_DEFAULT_PATH
)
{
workspaceConfigKeys
.
push
(...
Object
.
keys
(
workspaceConfigFiles
[
path
].
raw
));
...
...
src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts
浏览文件 @
f2c47075
...
...
@@ -25,7 +25,6 @@ import URI from 'vs/base/common/uri';
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
ConfigurationEditingService
}
from
'
vs/workbench/services/configuration/node/configurationEditingService
'
;
import
{
ConfigurationTarget
,
IConfigurationEditingError
,
ConfigurationEditingErrorCode
}
from
'
vs/workbench/services/configuration/common/configurationEditing
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -56,7 +55,6 @@ class TestDirtyTextFileService extends TestTextFileService {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IEditorGroupService
editorGroupService
:
IEditorGroupService
,
@
IFileService
fileService
:
IFileService
,
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
...
...
@@ -64,7 +62,7 @@ class TestDirtyTextFileService extends TestTextFileService {
@
IBackupFileService
backupFileService
:
IBackupFileService
,
@
IWindowsService
windowsService
:
IWindowsService
)
{
super
(
lifecycleService
,
contextService
,
configurationService
,
telemetryService
,
editorService
,
editorGroupService
,
fileService
,
untitledEditorService
,
instantiationService
,
messageService
,
backupFileService
,
windowsService
);
super
(
lifecycleService
,
contextService
,
configurationService
,
telemetryService
,
editorService
,
fileService
,
untitledEditorService
,
instantiationService
,
messageService
,
backupFileService
,
windowsService
);
}
public
isDirty
(
resource
?:
URI
):
boolean
{
...
...
src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts
浏览文件 @
f2c47075
...
...
@@ -221,7 +221,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi
const
factory
:
{
():
TPromise
<
any
>
}[]
=
Object
.
keys
(
interactiveVariablesToSubstitutes
).
map
(
interactiveVariable
=>
{
return
()
=>
{
let
commandId
=
null
;
let
commandId
:
string
=
null
;
commandId
=
interactiveVariablesMap
?
interactiveVariablesMap
[
interactiveVariable
]
:
null
;
if
(
!
commandId
)
{
// Just launch any command if the interactive variable is not contributed by the adapter #12735
...
...
src/vs/workbench/services/search/node/textSearch.ts
浏览文件 @
f2c47075
...
...
@@ -121,7 +121,7 @@ export class Engine implements ISearchEngine<ISerializedFileMatch> {
};
// Walk over the file system
let
nextBatch
=
[];
let
nextBatch
:
string
[]
=
[];
let
nextBatchBytes
=
0
;
const
batchFlushBytes
=
2
**
20
;
// 1MB
this
.
walker
.
walk
(
this
.
config
.
rootFolders
,
this
.
config
.
extraFiles
,
result
=>
{
...
...
src/vs/workbench/services/search/node/worker/searchWorker.ts
浏览文件 @
f2c47075
...
...
@@ -177,7 +177,7 @@ export class SearchWorkerEngine {
let
lineNumber
=
0
;
let
lastBufferHadTraillingCR
=
false
;
const
decodeBuffer
=
(
buffer
:
NodeBuffer
,
start
,
end
):
string
=>
{
const
decodeBuffer
=
(
buffer
:
NodeBuffer
,
start
:
number
,
end
:
number
):
string
=>
{
if
(
options
.
encoding
===
UTF8
||
options
.
encoding
===
UTF8_with_bom
)
{
return
buffer
.
toString
(
undefined
,
start
,
end
);
// much faster to use built in toString() when encoding is default
}
...
...
src/vs/workbench/services/telemetry/common/workspaceStats.ts
浏览文件 @
f2c47075
...
...
@@ -60,7 +60,8 @@ function extractDomain(url: string): string {
}
export
function
getDomainsOfRemotes
(
text
:
string
,
whitelist
:
string
[]):
string
[]
{
let
domains
=
new
ArraySet
<
string
>
(),
match
;
let
domains
=
new
ArraySet
<
string
>
();
let
match
:
RegExpExecArray
;
while
(
match
=
RemoteMatcher
.
exec
(
text
))
{
let
domain
=
extractDomain
(
match
[
1
]);
if
(
domain
)
{
...
...
@@ -242,7 +243,7 @@ export class WorkspaceStats {
);
}
private
reportAzure
(
uri
)
{
private
reportAzure
(
uri
:
URI
)
{
const
tags
:
Tags
=
Object
.
create
(
null
);
this
.
reportAzureNode
(
uri
,
tags
).
then
((
tags
)
=>
{
return
this
.
reportAzureJava
(
uri
,
tags
);
...
...
src/vs/workbench/services/textfile/common/textFileService.ts
浏览文件 @
f2c47075
...
...
@@ -23,7 +23,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
import
{
UntitledEditorModel
}
from
'
vs/workbench/common/editor/untitledEditorModel
'
;
import
{
TextFileEditorModelManager
}
from
'
vs/workbench/services/textfile/common/textFileEditorModelManager
'
;
...
...
@@ -61,7 +60,6 @@ export abstract class TextFileService implements ITextFileService {
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IEditorGroupService
private
editorGroupService
:
IEditorGroupService
,
@
IFileService
protected
fileService
:
IFileService
,
@
IUntitledEditorService
private
untitledEditorService
:
IUntitledEditorService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
...
...
src/vs/workbench/services/textfile/electron-browser/textFileService.ts
浏览文件 @
f2c47075
...
...
@@ -22,7 +22,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IWindowIPCService
}
from
'
vs/workbench/services/window/electron-browser/windowService
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ModelBuilder
}
from
'
vs/editor/node/model/modelBuilder
'
;
import
product
from
'
vs/platform/node/product
'
;
...
...
@@ -46,7 +45,6 @@ export class TextFileService extends AbstractTextFileService {
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
IModeService
private
modeService
:
IModeService
,
@
IEditorGroupService
editorGroupService
:
IEditorGroupService
,
@
IWindowIPCService
private
windowService
:
IWindowIPCService
,
@
IModelService
private
modelService
:
IModelService
,
@
IEnvironmentService
environmentService
:
IEnvironmentService
,
...
...
@@ -55,7 +53,7 @@ export class TextFileService extends AbstractTextFileService {
@
IStorageService
private
storageService
:
IStorageService
,
@
IWindowsService
windowsService
:
IWindowsService
)
{
super
(
lifecycleService
,
contextService
,
configurationService
,
telemetryService
,
editorGroupService
,
fileService
,
untitledEditorService
,
instantiationService
,
messageService
,
environmentService
,
backupFileService
,
windowsService
);
super
(
lifecycleService
,
contextService
,
configurationService
,
telemetryService
,
fileService
,
untitledEditorService
,
instantiationService
,
messageService
,
environmentService
,
backupFileService
,
windowsService
);
}
public
resolveTextContent
(
resource
:
URI
,
options
?:
IResolveContentOptions
):
TPromise
<
IRawTextContent
>
{
...
...
src/vs/workbench/services/themes/electron-browser/stylesContributions.ts
浏览文件 @
f2c47075
...
...
@@ -94,7 +94,7 @@ export class TokenStylesContribution {
public
contributeStyles
(
themeId
:
string
,
themeDocument
:
IThemeDocument
,
cssRules
:
string
[]):
void
{
let
theme
=
new
Theme
(
themeId
,
themeDocument
);
theme
.
getSettings
().
forEach
((
s
:
IThemeSetting
,
index
,
arr
)
=>
{
theme
.
getSettings
().
forEach
((
s
:
IThemeSetting
,
index
:
number
,
arr
:
IThemeSetting
[]
)
=>
{
// @martin TS(2.0.2) - s.scope is already a string[] so no need for all this checking.
// However will add a cast at split to keep semantic in case s.scope is wrongly typed.
let
scope
:
string
|
string
[]
=
s
.
scope
;
...
...
@@ -127,7 +127,7 @@ export class TokenStylesContribution {
//statements.push(`background-color: ${background};`);
break
;
case
'
fontStyle
'
:
let
segments
=
value
.
split
(
'
'
);
let
segments
:
string
[]
=
value
.
split
(
'
'
);
segments
.
forEach
(
s
=>
{
switch
(
s
)
{
case
'
italic
'
:
...
...
src/vs/workbench/services/themes/electron-browser/themeService.ts
浏览文件 @
f2c47075
...
...
@@ -434,7 +434,7 @@ export class ThemeService implements IThemeService {
private
_updateIconTheme
(
onApply
:
(
theme
:
IInternalThemeData
)
=>
void
):
TPromise
<
boolean
>
{
return
this
.
getFileIconThemes
().
then
(
allIconSets
=>
{
let
iconSetData
;
let
iconSetData
:
IInternalThemeData
;
for
(
let
iconSet
of
allIconSets
)
{
if
(
iconSet
.
id
===
this
.
currentIconTheme
)
{
iconSetData
=
<
IInternalThemeData
>
iconSet
;
...
...
@@ -533,7 +533,7 @@ function _processIconThemeDocument(id: string, iconThemeDocumentPath: string, ic
let
fileExtensions
=
associations
.
fileExtensions
;
if
(
fileExtensions
)
{
for
(
let
fileExtension
in
fileExtensions
)
{
let
selectors
=
[];
let
selectors
:
string
[]
=
[];
let
segments
=
fileExtension
.
toLowerCase
().
split
(
'
.
'
);
for
(
let
i
=
0
;
i
<
segments
.
length
;
i
++
)
{
selectors
.
push
(
`.
${
escapeCSS
(
segments
.
slice
(
i
).
join
(
'
.
'
))}
-ext-file-icon`
);
...
...
@@ -544,7 +544,7 @@ function _processIconThemeDocument(id: string, iconThemeDocumentPath: string, ic
let
fileNames
=
associations
.
fileNames
;
if
(
fileNames
)
{
for
(
let
fileName
in
fileNames
)
{
let
selectors
=
[];
let
selectors
:
string
[]
=
[];
let
segments
=
fileName
.
toLowerCase
().
split
(
'
.
'
);
if
(
segments
[
0
])
{
selectors
.
push
(
`.
${
escapeCSS
(
segments
[
0
])}
-name-file-icon`
);
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
f2c47075
...
...
@@ -110,7 +110,6 @@ export class TestTextFileService extends TextFileService {
@
IConfigurationService
configurationService
:
IConfigurationService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
@
IWorkbenchEditorService
editorService
:
IWorkbenchEditorService
,
@
IEditorGroupService
editorGroupService
:
IEditorGroupService
,
@
IFileService
fileService
:
IFileService
,
@
IUntitledEditorService
untitledEditorService
:
IUntitledEditorService
,
@
IInstantiationService
instantiationService
:
IInstantiationService
,
...
...
@@ -118,7 +117,7 @@ export class TestTextFileService extends TextFileService {
@
IBackupFileService
backupFileService
:
IBackupFileService
,
@
IWindowsService
windowsService
:
IWindowsService
)
{
super
(
lifecycleService
,
contextService
,
configurationService
,
telemetryService
,
editorGroupService
,
fileService
,
untitledEditorService
,
instantiationService
,
messageService
,
TestEnvironmentService
,
backupFileService
,
windowsService
);
super
(
lifecycleService
,
contextService
,
configurationService
,
telemetryService
,
fileService
,
untitledEditorService
,
instantiationService
,
messageService
,
TestEnvironmentService
,
backupFileService
,
windowsService
);
}
public
setPromptPath
(
path
:
string
):
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录