Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9afa70a7
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,发现更多精彩内容 >>
未验证
提交
9afa70a7
编写于
8月 05, 2019
作者:
J
Johannes Rieken
提交者:
GitHub
8月 05, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #78265 from microsoft/joh/strict
eng - strict field initialisations
上级
a3b72210
06701f53
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
67 addition
and
69 deletion
+67
-69
src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts
src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts
+2
-2
src/vs/base/common/event.ts
src/vs/base/common/event.ts
+1
-1
src/vs/editor/contrib/codelens/codelensWidget.ts
src/vs/editor/contrib/codelens/codelensWidget.ts
+3
-3
src/vs/editor/contrib/documentSymbols/outlineTree.ts
src/vs/editor/contrib/documentSymbols/outlineTree.ts
+11
-8
src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts
src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts
+3
-5
src/vs/editor/contrib/referenceSearch/referencesModel.ts
src/vs/editor/contrib/referenceSearch/referencesModel.ts
+1
-1
src/vs/editor/contrib/snippet/snippetParser.ts
src/vs/editor/contrib/snippet/snippetParser.ts
+2
-6
src/vs/editor/contrib/suggest/suggestAlternatives.ts
src/vs/editor/contrib/suggest/suggestAlternatives.ts
+1
-1
src/vs/editor/contrib/suggest/wordContextKey.ts
src/vs/editor/contrib/suggest/wordContextKey.ts
+1
-1
src/vs/workbench/api/browser/mainThreadCodeInsets.ts
src/vs/workbench/api/browser/mainThreadCodeInsets.ts
+2
-2
src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts
...vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts
+2
-2
src/vs/workbench/api/common/extHostCodeInsets.ts
src/vs/workbench/api/common/extHostCodeInsets.ts
+1
-1
src/vs/workbench/api/common/extHostDocumentData.ts
src/vs/workbench/api/common/extHostDocumentData.ts
+1
-1
src/vs/workbench/api/common/extHostDocumentsAndEditors.ts
src/vs/workbench/api/common/extHostDocumentsAndEditors.ts
+1
-1
src/vs/workbench/api/common/extHostFileSystem.ts
src/vs/workbench/api/common/extHostFileSystem.ts
+1
-1
src/vs/workbench/api/common/extHostMemento.ts
src/vs/workbench/api/common/extHostMemento.ts
+4
-4
src/vs/workbench/api/common/extHostOutput.ts
src/vs/workbench/api/common/extHostOutput.ts
+2
-1
src/vs/workbench/browser/parts/editor/breadcrumbs.ts
src/vs/workbench/browser/parts/editor/breadcrumbs.ts
+3
-3
src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts
...ib/extensions/electron-browser/extensionProfileService.ts
+3
-3
src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts
...trib/extensions/electron-browser/extensionsSlowActions.ts
+3
-3
src/vs/workbench/contrib/markers/browser/markersFileDecorations.ts
...rkbench/contrib/markers/browser/markersFileDecorations.ts
+2
-2
src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts
...ch/contrib/performance/electron-browser/perfviewEditor.ts
+5
-5
src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.ts
...nch/contrib/snippets/browser/snippetCompletionProvider.ts
+1
-1
src/vs/workbench/contrib/snippets/browser/tabCompletion.ts
src/vs/workbench/contrib/snippets/browser/tabCompletion.ts
+2
-2
src/vs/workbench/contrib/splash/electron-browser/partsSplash.contribution.ts
...ntrib/splash/electron-browser/partsSplash.contribution.ts
+2
-2
src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts
...vs/workbench/services/bulkEdit/browser/bulkEditService.ts
+6
-6
src/vs/workbench/services/timer/electron-browser/timerService.ts
...workbench/services/timer/electron-browser/timerService.ts
+1
-1
未找到文件。
src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts
浏览文件 @
9afa70a7
...
@@ -77,8 +77,8 @@ export class BreadcrumbsWidget {
...
@@ -77,8 +77,8 @@ export class BreadcrumbsWidget {
private
_focusedItemIdx
:
number
=
-
1
;
private
_focusedItemIdx
:
number
=
-
1
;
private
_selectedItemIdx
:
number
=
-
1
;
private
_selectedItemIdx
:
number
=
-
1
;
private
_pendingLayout
:
IDisposable
;
private
_pendingLayout
:
IDisposable
|
undefined
;
private
_dimension
:
dom
.
Dimension
;
private
_dimension
:
dom
.
Dimension
|
undefined
;
constructor
(
constructor
(
container
:
HTMLElement
container
:
HTMLElement
...
...
src/vs/base/common/event.ts
浏览文件 @
9afa70a7
...
@@ -645,7 +645,7 @@ export interface IWaitUntil {
...
@@ -645,7 +645,7 @@ export interface IWaitUntil {
export
class
AsyncEmitter
<
T
extends
IWaitUntil
>
extends
Emitter
<
T
>
{
export
class
AsyncEmitter
<
T
extends
IWaitUntil
>
extends
Emitter
<
T
>
{
private
_asyncDeliveryQueue
:
[
Listener
<
T
>
,
T
,
Promise
<
any
>
[]][];
private
_asyncDeliveryQueue
?
:
[
Listener
<
T
>
,
T
,
Promise
<
any
>
[]][];
async
fireAsync
(
eventFn
:
(
thenables
:
Promise
<
any
>
[],
listener
:
Function
)
=>
T
):
Promise
<
void
>
{
async
fireAsync
(
eventFn
:
(
thenables
:
Promise
<
any
>
[],
listener
:
Function
)
=>
T
):
Promise
<
void
>
{
if
(
!
this
.
_listeners
)
{
if
(
!
this
.
_listeners
)
{
...
...
src/vs/editor/contrib/codelens/codelensWidget.ts
浏览文件 @
9afa70a7
...
@@ -60,7 +60,7 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
...
@@ -60,7 +60,7 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
private
readonly
_editor
:
editorBrowser
.
ICodeEditor
;
private
readonly
_editor
:
editorBrowser
.
ICodeEditor
;
private
readonly
_commands
=
new
Map
<
string
,
Command
>
();
private
readonly
_commands
=
new
Map
<
string
,
Command
>
();
private
_widgetPosition
:
editorBrowser
.
IContentWidgetPosition
;
private
_widgetPosition
?
:
editorBrowser
.
IContentWidgetPosition
;
constructor
(
constructor
(
editor
:
editorBrowser
.
ICodeEditor
,
editor
:
editorBrowser
.
ICodeEditor
,
...
@@ -147,8 +147,8 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
...
@@ -147,8 +147,8 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
};
};
}
}
getPosition
():
editorBrowser
.
IContentWidgetPosition
{
getPosition
():
editorBrowser
.
IContentWidgetPosition
|
null
{
return
this
.
_widgetPosition
;
return
this
.
_widgetPosition
||
null
;
}
}
isVisible
():
boolean
{
isVisible
():
boolean
{
...
...
src/vs/editor/contrib/documentSymbols/outlineTree.ts
浏览文件 @
9afa70a7
...
@@ -45,16 +45,19 @@ export class OutlineIdentityProvider implements IIdentityProvider<OutlineItem> {
...
@@ -45,16 +45,19 @@ export class OutlineIdentityProvider implements IIdentityProvider<OutlineItem> {
export
class
OutlineGroupTemplate
{
export
class
OutlineGroupTemplate
{
static
id
=
'
OutlineGroupTemplate
'
;
static
id
=
'
OutlineGroupTemplate
'
;
constructor
(
labelContainer
:
HTMLElement
;
readonly
labelContainer
:
HTMLElement
,
label
:
HighlightedLabel
;
readonly
label
:
HighlightedLabel
,
)
{
}
}
}
export
class
OutlineElementTemplate
{
export
class
OutlineElementTemplate
{
static
id
=
'
OutlineElementTemplate
'
;
static
id
=
'
OutlineElementTemplate
'
;
container
:
HTMLElement
;
constructor
(
iconLabel
:
IconLabel
;
readonly
container
:
HTMLElement
,
decoration
:
HTMLElement
;
readonly
iconLabel
:
IconLabel
,
readonly
decoration
:
HTMLElement
,
)
{
}
}
}
export
class
OutlineVirtualDelegate
implements
IListVirtualDelegate
<
OutlineItem
>
{
export
class
OutlineVirtualDelegate
implements
IListVirtualDelegate
<
OutlineItem
>
{
...
@@ -80,7 +83,7 @@ export class OutlineGroupRenderer implements ITreeRenderer<OutlineGroup, FuzzySc
...
@@ -80,7 +83,7 @@ export class OutlineGroupRenderer implements ITreeRenderer<OutlineGroup, FuzzySc
const
labelContainer
=
dom
.
$
(
'
.outline-element-label
'
);
const
labelContainer
=
dom
.
$
(
'
.outline-element-label
'
);
dom
.
addClass
(
container
,
'
outline-element
'
);
dom
.
addClass
(
container
,
'
outline-element
'
);
dom
.
append
(
container
,
labelContainer
);
dom
.
append
(
container
,
labelContainer
);
return
{
labelContainer
,
label
:
new
HighlightedLabel
(
labelContainer
,
true
)
}
;
return
new
OutlineGroupTemplate
(
labelContainer
,
new
HighlightedLabel
(
labelContainer
,
true
))
;
}
}
renderElement
(
node
:
ITreeNode
<
OutlineGroup
,
FuzzyScore
>
,
index
:
number
,
template
:
OutlineGroupTemplate
):
void
{
renderElement
(
node
:
ITreeNode
<
OutlineGroup
,
FuzzyScore
>
,
index
:
number
,
template
:
OutlineGroupTemplate
):
void
{
...
@@ -109,7 +112,7 @@ export class OutlineElementRenderer implements ITreeRenderer<OutlineElement, Fuz
...
@@ -109,7 +112,7 @@ export class OutlineElementRenderer implements ITreeRenderer<OutlineElement, Fuz
const
iconLabel
=
new
IconLabel
(
container
,
{
supportHighlights
:
true
});
const
iconLabel
=
new
IconLabel
(
container
,
{
supportHighlights
:
true
});
const
decoration
=
dom
.
$
(
'
.outline-element-decoration
'
);
const
decoration
=
dom
.
$
(
'
.outline-element-decoration
'
);
container
.
appendChild
(
decoration
);
container
.
appendChild
(
decoration
);
return
{
container
,
iconLabel
,
decoration
}
;
return
new
OutlineElementTemplate
(
container
,
iconLabel
,
decoration
)
;
}
}
renderElement
(
node
:
ITreeNode
<
OutlineElement
,
FuzzyScore
>
,
index
:
number
,
template
:
OutlineElementTemplate
):
void
{
renderElement
(
node
:
ITreeNode
<
OutlineElement
,
FuzzyScore
>
,
index
:
number
,
template
:
OutlineElementTemplate
):
void
{
...
...
src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts
浏览文件 @
9afa70a7
...
@@ -34,18 +34,16 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
...
@@ -34,18 +34,16 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
private
readonly
editor
:
ICodeEditor
;
private
readonly
editor
:
ICodeEditor
;
private
readonly
toUnhook
=
new
DisposableStore
();
private
readonly
toUnhook
=
new
DisposableStore
();
private
decorations
:
string
[];
private
decorations
:
string
[]
=
[]
;
private
currentWordUnderMouse
:
IWordAtPosition
|
null
;
private
currentWordUnderMouse
:
IWordAtPosition
|
null
=
null
;
private
previousPromise
:
CancelablePromise
<
LocationLink
[]
|
null
>
|
null
;
private
previousPromise
:
CancelablePromise
<
LocationLink
[]
|
null
>
|
null
=
null
;
constructor
(
constructor
(
editor
:
ICodeEditor
,
editor
:
ICodeEditor
,
@
ITextModelService
private
readonly
textModelResolverService
:
ITextModelService
,
@
ITextModelService
private
readonly
textModelResolverService
:
ITextModelService
,
@
IModeService
private
readonly
modeService
:
IModeService
@
IModeService
private
readonly
modeService
:
IModeService
)
{
)
{
this
.
decorations
=
[];
this
.
editor
=
editor
;
this
.
editor
=
editor
;
this
.
previousPromise
=
null
;
let
linkGesture
=
new
ClickLinkGesture
(
editor
);
let
linkGesture
=
new
ClickLinkGesture
(
editor
);
this
.
toUnhook
.
add
(
linkGesture
);
this
.
toUnhook
.
add
(
linkGesture
);
...
...
src/vs/editor/contrib/referenceSearch/referencesModel.ts
浏览文件 @
9afa70a7
...
@@ -89,7 +89,7 @@ export class FileReferences implements IDisposable {
...
@@ -89,7 +89,7 @@ export class FileReferences implements IDisposable {
private
_children
:
OneReference
[];
private
_children
:
OneReference
[];
private
_preview
?:
FilePreview
;
private
_preview
?:
FilePreview
;
private
_resolved
:
boolean
;
private
_resolved
?
:
boolean
;
private
_loadFailure
:
any
;
private
_loadFailure
:
any
;
constructor
(
private
readonly
_parent
:
ReferencesModel
,
private
readonly
_uri
:
URI
)
{
constructor
(
private
readonly
_parent
:
ReferencesModel
,
private
readonly
_uri
:
URI
)
{
...
...
src/vs/editor/contrib/snippet/snippetParser.ts
浏览文件 @
9afa70a7
...
@@ -56,12 +56,8 @@ export class Scanner {
...
@@ -56,12 +56,8 @@ export class Scanner {
||
(
ch
>=
CharCode
.
A
&&
ch
<=
CharCode
.
Z
);
||
(
ch
>=
CharCode
.
A
&&
ch
<=
CharCode
.
Z
);
}
}
value
:
string
;
value
:
string
=
''
;
pos
:
number
;
pos
:
number
=
0
;
constructor
()
{
this
.
text
(
''
);
}
text
(
value
:
string
)
{
text
(
value
:
string
)
{
this
.
value
=
value
;
this
.
value
=
value
;
...
...
src/vs/editor/contrib/suggest/suggestAlternatives.ts
浏览文件 @
9afa70a7
...
@@ -15,7 +15,7 @@ export class SuggestAlternatives {
...
@@ -15,7 +15,7 @@ export class SuggestAlternatives {
private
readonly
_ckOtherSuggestions
:
IContextKey
<
boolean
>
;
private
readonly
_ckOtherSuggestions
:
IContextKey
<
boolean
>
;
private
_index
:
number
;
private
_index
:
number
=
0
;
private
_model
:
CompletionModel
|
undefined
;
private
_model
:
CompletionModel
|
undefined
;
private
_acceptNext
:
((
selected
:
ISelectedSuggestion
)
=>
any
)
|
undefined
;
private
_acceptNext
:
((
selected
:
ISelectedSuggestion
)
=>
any
)
|
undefined
;
private
_listener
:
IDisposable
|
undefined
;
private
_listener
:
IDisposable
|
undefined
;
...
...
src/vs/editor/contrib/suggest/wordContextKey.ts
浏览文件 @
9afa70a7
...
@@ -13,7 +13,7 @@ export class WordContextKey extends Disposable {
...
@@ -13,7 +13,7 @@ export class WordContextKey extends Disposable {
private
readonly
_ckAtEnd
:
IContextKey
<
boolean
>
;
private
readonly
_ckAtEnd
:
IContextKey
<
boolean
>
;
private
_enabled
:
boolean
;
private
_enabled
:
boolean
=
false
;
private
_selectionListener
?:
IDisposable
;
private
_selectionListener
?:
IDisposable
;
constructor
(
constructor
(
...
...
src/vs/workbench/api/browser/mainThreadCodeInsets.ts
浏览文件 @
9afa70a7
...
@@ -21,7 +21,7 @@ class EditorWebviewZone implements IViewZone {
...
@@ -21,7 +21,7 @@ class EditorWebviewZone implements IViewZone {
readonly
afterColumn
:
number
;
readonly
afterColumn
:
number
;
readonly
heightInLines
:
number
;
readonly
heightInLines
:
number
;
private
_id
:
number
;
private
_id
?
:
number
;
// suppressMouseDown?: boolean | undefined;
// suppressMouseDown?: boolean | undefined;
// heightInPx?: number | undefined;
// heightInPx?: number | undefined;
// minWidthInPx?: number | undefined;
// minWidthInPx?: number | undefined;
...
@@ -46,7 +46,7 @@ class EditorWebviewZone implements IViewZone {
...
@@ -46,7 +46,7 @@ class EditorWebviewZone implements IViewZone {
}
}
dispose
():
void
{
dispose
():
void
{
this
.
editor
.
changeViewZones
(
accessor
=>
accessor
.
removeZone
(
this
.
_id
));
this
.
editor
.
changeViewZones
(
accessor
=>
this
.
_id
&&
accessor
.
removeZone
(
this
.
_id
));
}
}
}
}
...
...
src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts
浏览文件 @
9afa70a7
...
@@ -109,7 +109,7 @@ class DocumentAndEditorStateDelta {
...
@@ -109,7 +109,7 @@ class DocumentAndEditorStateDelta {
class
DocumentAndEditorState
{
class
DocumentAndEditorState
{
static
compute
(
before
:
DocumentAndEditorState
,
after
:
DocumentAndEditorState
):
DocumentAndEditorStateDelta
{
static
compute
(
before
:
DocumentAndEditorState
|
undefined
,
after
:
DocumentAndEditorState
):
DocumentAndEditorStateDelta
{
if
(
!
before
)
{
if
(
!
before
)
{
return
new
DocumentAndEditorStateDelta
(
return
new
DocumentAndEditorStateDelta
(
[],
values
(
after
.
documents
),
[],
values
(
after
.
documents
),
...
@@ -146,7 +146,7 @@ class MainThreadDocumentAndEditorStateComputer {
...
@@ -146,7 +146,7 @@ class MainThreadDocumentAndEditorStateComputer {
private
readonly
_toDispose
=
new
DisposableStore
();
private
readonly
_toDispose
=
new
DisposableStore
();
private
_toDisposeOnEditorRemove
=
new
Map
<
string
,
IDisposable
>
();
private
_toDisposeOnEditorRemove
=
new
Map
<
string
,
IDisposable
>
();
private
_currentState
:
DocumentAndEditorState
;
private
_currentState
?
:
DocumentAndEditorState
;
private
_activeEditorOrder
:
ActiveEditorOrder
=
ActiveEditorOrder
.
Editor
;
private
_activeEditorOrder
:
ActiveEditorOrder
=
ActiveEditorOrder
.
Editor
;
constructor
(
constructor
(
...
...
src/vs/workbench/api/common/extHostCodeInsets.ts
浏览文件 @
9afa70a7
...
@@ -63,7 +63,7 @@ export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
...
@@ -63,7 +63,7 @@ export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
private
readonly
_uuid
=
generateUuid
();
private
readonly
_uuid
=
generateUuid
();
private
_html
:
string
=
''
;
private
_html
:
string
=
''
;
private
_options
:
vscode
.
WebviewOptions
;
private
_options
:
vscode
.
WebviewOptions
=
Object
.
create
(
null
)
;
toWebviewResource
(
resource
:
vscode
.
Uri
):
vscode
.
Uri
{
toWebviewResource
(
resource
:
vscode
.
Uri
):
vscode
.
Uri
{
return
toWebviewResource
(
that
.
_initData
,
this
.
_uuid
,
resource
);
return
toWebviewResource
(
that
.
_initData
,
this
.
_uuid
,
resource
);
...
...
src/vs/workbench/api/common/extHostDocumentData.ts
浏览文件 @
9afa70a7
...
@@ -26,7 +26,7 @@ export class ExtHostDocumentData extends MirrorTextModel {
...
@@ -26,7 +26,7 @@ export class ExtHostDocumentData extends MirrorTextModel {
private
_proxy
:
MainThreadDocumentsShape
;
private
_proxy
:
MainThreadDocumentsShape
;
private
_languageId
:
string
;
private
_languageId
:
string
;
private
_isDirty
:
boolean
;
private
_isDirty
:
boolean
;
private
_document
:
vscode
.
TextDocument
;
private
_document
?
:
vscode
.
TextDocument
;
private
_textLines
:
vscode
.
TextLine
[]
=
[];
private
_textLines
:
vscode
.
TextLine
[]
=
[];
private
_isDisposed
:
boolean
=
false
;
private
_isDisposed
:
boolean
=
false
;
...
...
src/vs/workbench/api/common/extHostDocumentsAndEditors.ts
浏览文件 @
9afa70a7
...
@@ -17,7 +17,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
...
@@ -17,7 +17,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
private
_disposables
:
Disposable
[]
=
[];
private
_disposables
:
Disposable
[]
=
[];
private
_activeEditorId
:
string
|
null
;
private
_activeEditorId
:
string
|
null
=
null
;
private
readonly
_editors
=
new
Map
<
string
,
ExtHostTextEditor
>
();
private
readonly
_editors
=
new
Map
<
string
,
ExtHostTextEditor
>
();
private
readonly
_documents
=
new
Map
<
string
,
ExtHostDocumentData
>
();
private
readonly
_documents
=
new
Map
<
string
,
ExtHostDocumentData
>
();
...
...
src/vs/workbench/api/common/extHostFileSystem.ts
浏览文件 @
9afa70a7
...
@@ -155,7 +155,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
...
@@ -155,7 +155,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
private
readonly
_usedSchemes
=
new
Set
<
string
>
();
private
readonly
_usedSchemes
=
new
Set
<
string
>
();
private
readonly
_watches
=
new
Map
<
number
,
IDisposable
>
();
private
readonly
_watches
=
new
Map
<
number
,
IDisposable
>
();
private
_linkProviderRegistration
:
IDisposable
;
private
_linkProviderRegistration
?
:
IDisposable
;
private
_handlePool
:
number
=
0
;
private
_handlePool
:
number
=
0
;
readonly
fileSystem
:
vscode
.
FileSystem
;
readonly
fileSystem
:
vscode
.
FileSystem
;
...
...
src/vs/workbench/api/common/extHostMemento.ts
浏览文件 @
9afa70a7
...
@@ -14,7 +14,7 @@ export class ExtensionMemento implements IExtensionMemento {
...
@@ -14,7 +14,7 @@ export class ExtensionMemento implements IExtensionMemento {
private
readonly
_storage
:
ExtHostStorage
;
private
readonly
_storage
:
ExtHostStorage
;
private
readonly
_init
:
Promise
<
ExtensionMemento
>
;
private
readonly
_init
:
Promise
<
ExtensionMemento
>
;
private
_value
:
{
[
n
:
string
]:
any
;
};
private
_value
?
:
{
[
n
:
string
]:
any
;
};
private
readonly
_storageListener
:
IDisposable
;
private
readonly
_storageListener
:
IDisposable
;
constructor
(
id
:
string
,
global
:
boolean
,
storage
:
ExtHostStorage
)
{
constructor
(
id
:
string
,
global
:
boolean
,
storage
:
ExtHostStorage
)
{
...
@@ -41,7 +41,7 @@ export class ExtensionMemento implements IExtensionMemento {
...
@@ -41,7 +41,7 @@ export class ExtensionMemento implements IExtensionMemento {
get
<
T
>
(
key
:
string
):
T
|
undefined
;
get
<
T
>
(
key
:
string
):
T
|
undefined
;
get
<
T
>
(
key
:
string
,
defaultValue
:
T
):
T
;
get
<
T
>
(
key
:
string
,
defaultValue
:
T
):
T
;
get
<
T
>
(
key
:
string
,
defaultValue
?:
T
):
T
{
get
<
T
>
(
key
:
string
,
defaultValue
?:
T
):
T
{
let
value
=
this
.
_value
[
key
];
let
value
=
this
.
_value
!
[
key
];
if
(
typeof
value
===
'
undefined
'
)
{
if
(
typeof
value
===
'
undefined
'
)
{
value
=
defaultValue
;
value
=
defaultValue
;
}
}
...
@@ -49,8 +49,8 @@ export class ExtensionMemento implements IExtensionMemento {
...
@@ -49,8 +49,8 @@ export class ExtensionMemento implements IExtensionMemento {
}
}
update
(
key
:
string
,
value
:
any
):
Promise
<
void
>
{
update
(
key
:
string
,
value
:
any
):
Promise
<
void
>
{
this
.
_value
[
key
]
=
value
;
this
.
_value
!
[
key
]
=
value
;
return
this
.
_storage
.
setValue
(
this
.
_shared
,
this
.
_id
,
this
.
_value
);
return
this
.
_storage
.
setValue
(
this
.
_shared
,
this
.
_id
,
this
.
_value
!
);
}
}
dispose
():
void
{
dispose
():
void
{
...
...
src/vs/workbench/api/common/extHostOutput.ts
浏览文件 @
9afa70a7
...
@@ -27,6 +27,7 @@ export abstract class AbstractExtHostOutputChannel extends Disposable implements
...
@@ -27,6 +27,7 @@ export abstract class AbstractExtHostOutputChannel extends Disposable implements
this
.
_name
=
name
;
this
.
_name
=
name
;
this
.
_proxy
=
proxy
;
this
.
_proxy
=
proxy
;
this
.
_id
=
proxy
.
$register
(
this
.
name
,
log
,
file
);
this
.
_id
=
proxy
.
$register
(
this
.
name
,
log
,
file
);
this
.
_disposed
=
false
;
this
.
_offset
=
0
;
this
.
_offset
=
0
;
}
}
...
@@ -121,7 +122,7 @@ export class ExtHostOutputService implements ExtHostOutputServiceShape {
...
@@ -121,7 +122,7 @@ export class ExtHostOutputService implements ExtHostOutputServiceShape {
private
readonly
_logsLocation
:
URI
;
private
readonly
_logsLocation
:
URI
;
private
readonly
_proxy
:
MainThreadOutputServiceShape
;
private
readonly
_proxy
:
MainThreadOutputServiceShape
;
private
readonly
_channels
:
Map
<
string
,
AbstractExtHostOutputChannel
>
=
new
Map
<
string
,
AbstractExtHostOutputChannel
>
();
private
readonly
_channels
:
Map
<
string
,
AbstractExtHostOutputChannel
>
=
new
Map
<
string
,
AbstractExtHostOutputChannel
>
();
private
_visibleChannelDisposable
:
IDisposable
;
private
_visibleChannelDisposable
?
:
IDisposable
;
constructor
(
factory
:
IOutputChannelFactory
,
logsLocation
:
URI
,
mainContext
:
IMainContext
)
{
constructor
(
factory
:
IOutputChannelFactory
,
logsLocation
:
URI
,
mainContext
:
IMainContext
)
{
this
.
_factory
=
factory
;
this
.
_factory
=
factory
;
...
...
src/vs/workbench/browser/parts/editor/breadcrumbs.ts
浏览文件 @
9afa70a7
...
@@ -29,7 +29,7 @@ export interface IBreadcrumbsService {
...
@@ -29,7 +29,7 @@ export interface IBreadcrumbsService {
export
class
BreadcrumbsService
implements
IBreadcrumbsService
{
export
class
BreadcrumbsService
implements
IBreadcrumbsService
{
_serviceBrand
:
ServiceIdentifier
<
any
>
;
_serviceBrand
:
any
;
private
readonly
_map
=
new
Map
<
number
,
BreadcrumbsWidget
>
();
private
readonly
_map
=
new
Map
<
number
,
BreadcrumbsWidget
>
();
...
@@ -55,8 +55,8 @@ registerSingleton(IBreadcrumbsService, BreadcrumbsService, true);
...
@@ -55,8 +55,8 @@ registerSingleton(IBreadcrumbsService, BreadcrumbsService, true);
export
abstract
class
BreadcrumbsConfig
<
T
>
{
export
abstract
class
BreadcrumbsConfig
<
T
>
{
name
:
string
;
abstract
get
name
()
:
string
;
onDidChange
:
Event
<
void
>
;
abstract
get
onDidChange
()
:
Event
<
void
>
;
abstract
getValue
(
overrides
?:
IConfigurationOverrides
):
T
;
abstract
getValue
(
overrides
?:
IConfigurationOverrides
):
T
;
abstract
updateValue
(
value
:
T
,
overrides
?:
IConfigurationOverrides
):
Promise
<
void
>
;
abstract
updateValue
(
value
:
T
,
overrides
?:
IConfigurationOverrides
):
Promise
<
void
>
;
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensionProfileService.ts
浏览文件 @
9afa70a7
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IInstantiationService
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IExtensionHostProfile
,
ProfileSession
,
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
IExtensionHostProfile
,
ProfileSession
,
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
Disposable
,
toDisposable
,
MutableDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
Disposable
,
toDisposable
,
MutableDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
...
@@ -23,7 +23,7 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands';
...
@@ -23,7 +23,7 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands';
export
class
ExtensionHostProfileService
extends
Disposable
implements
IExtensionHostProfileService
{
export
class
ExtensionHostProfileService
extends
Disposable
implements
IExtensionHostProfileService
{
_serviceBrand
:
ServiceIdentifier
<
IExtensionHostProfileService
>
;
_serviceBrand
:
any
;
private
readonly
_onDidChangeState
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
private
readonly
_onDidChangeState
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
public
readonly
onDidChangeState
:
Event
<
void
>
=
this
.
_onDidChangeState
.
event
;
public
readonly
onDidChangeState
:
Event
<
void
>
=
this
.
_onDidChangeState
.
event
;
...
@@ -34,7 +34,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio
...
@@ -34,7 +34,7 @@ export class ExtensionHostProfileService extends Disposable implements IExtensio
private
readonly
_unresponsiveProfiles
=
new
Map
<
string
,
IExtensionHostProfile
>
();
private
readonly
_unresponsiveProfiles
=
new
Map
<
string
,
IExtensionHostProfile
>
();
private
_profile
:
IExtensionHostProfile
|
null
;
private
_profile
:
IExtensionHostProfile
|
null
;
private
_profileSession
:
ProfileSession
|
null
;
private
_profileSession
:
ProfileSession
|
null
;
private
_state
:
ProfileSessionState
;
private
_state
:
ProfileSessionState
=
ProfileSessionState
.
None
;
private
profilingStatusBarIndicator
:
IStatusbarEntryAccessor
|
undefined
;
private
profilingStatusBarIndicator
:
IStatusbarEntryAccessor
|
undefined
;
private
readonly
profilingStatusBarIndicatorLabelUpdater
=
this
.
_register
(
new
MutableDisposable
());
private
readonly
profilingStatusBarIndicatorLabelUpdater
=
this
.
_register
(
new
MutableDisposable
());
...
...
src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts
浏览文件 @
9afa70a7
...
@@ -19,9 +19,9 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
...
@@ -19,9 +19,9 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import
Severity
from
'
vs/base/common/severity
'
;
import
Severity
from
'
vs/base/common/severity
'
;
abstract
class
RepoInfo
{
abstract
class
RepoInfo
{
readonly
base
:
string
;
abstract
get
base
()
:
string
;
readonly
owner
:
string
;
abstract
get
owner
()
:
string
;
readonly
repo
:
string
;
abstract
get
repo
()
:
string
;
static
fromExtension
(
desc
:
IExtensionDescription
):
RepoInfo
|
undefined
{
static
fromExtension
(
desc
:
IExtensionDescription
):
RepoInfo
|
undefined
{
...
...
src/vs/workbench/contrib/markers/browser/markersFileDecorations.ts
浏览文件 @
9afa70a7
...
@@ -56,8 +56,8 @@ class MarkersDecorationsProvider implements IDecorationsProvider {
...
@@ -56,8 +56,8 @@ class MarkersDecorationsProvider implements IDecorationsProvider {
class
MarkersFileDecorations
implements
IWorkbenchContribution
{
class
MarkersFileDecorations
implements
IWorkbenchContribution
{
private
readonly
_disposables
:
IDisposable
[];
private
readonly
_disposables
:
IDisposable
[];
private
_provider
:
IDisposable
;
private
_provider
?
:
IDisposable
;
private
_enabled
:
boolean
;
private
_enabled
?
:
boolean
;
constructor
(
constructor
(
@
IMarkerService
private
readonly
_markerService
:
IMarkerService
,
@
IMarkerService
private
readonly
_markerService
:
IMarkerService
,
...
...
src/vs/workbench/contrib/performance/electron-browser/perfviewEditor.ts
浏览文件 @
9afa70a7
...
@@ -262,11 +262,11 @@ class PerfModelContentProvider implements ITextModelContentProvider {
...
@@ -262,11 +262,11 @@ class PerfModelContentProvider implements ITextModelContentProvider {
}
}
abstract
class
LoaderStats
{
abstract
class
LoaderStats
{
readonly
amdLoad
:
(
string
|
number
)[][];
abstract
get
amdLoad
()
:
(
string
|
number
)[][];
readonly
amdInvoke
:
(
string
|
number
)[][];
abstract
get
amdInvoke
()
:
(
string
|
number
)[][];
readonly
nodeRequire
:
(
string
|
number
)[][];
abstract
get
nodeRequire
()
:
(
string
|
number
)[][];
readonly
nodeEval
:
(
string
|
number
)[][];
abstract
get
nodeEval
()
:
(
string
|
number
)[][];
readonly
nodeRequireTotal
:
number
;
abstract
get
nodeRequireTotal
()
:
number
;
static
get
():
LoaderStats
{
static
get
():
LoaderStats
{
...
...
src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.ts
浏览文件 @
9afa70a7
...
@@ -21,7 +21,7 @@ export class SnippetCompletion implements CompletionItem {
...
@@ -21,7 +21,7 @@ export class SnippetCompletion implements CompletionItem {
label
:
string
;
label
:
string
;
detail
:
string
;
detail
:
string
;
insertText
:
string
;
insertText
:
string
;
documentation
:
MarkdownString
;
documentation
?
:
MarkdownString
;
range
:
IRange
;
range
:
IRange
;
sortText
:
string
;
sortText
:
string
;
kind
:
CompletionItemKind
;
kind
:
CompletionItemKind
;
...
...
src/vs/workbench/contrib/snippets/browser/tabCompletion.ts
浏览文件 @
9afa70a7
...
@@ -31,8 +31,8 @@ export class TabCompletionController implements editorCommon.IEditorContribution
...
@@ -31,8 +31,8 @@ export class TabCompletionController implements editorCommon.IEditorContribution
private
_hasSnippets
:
IContextKey
<
boolean
>
;
private
_hasSnippets
:
IContextKey
<
boolean
>
;
private
_activeSnippets
:
Snippet
[]
=
[];
private
_activeSnippets
:
Snippet
[]
=
[];
private
_enabled
:
boolean
;
private
_enabled
?
:
boolean
;
private
_selectionListener
:
IDisposable
;
private
_selectionListener
?
:
IDisposable
;
private
readonly
_configListener
:
IDisposable
;
private
readonly
_configListener
:
IDisposable
;
constructor
(
constructor
(
...
...
src/vs/workbench/contrib/splash/electron-browser/partsSplash.contribution.ts
浏览文件 @
9afa70a7
...
@@ -32,8 +32,8 @@ class PartsSplash {
...
@@ -32,8 +32,8 @@ class PartsSplash {
private
readonly
_disposables
=
new
DisposableStore
();
private
readonly
_disposables
=
new
DisposableStore
();
private
_didChangeTitleBarStyle
:
boolean
;
private
_didChangeTitleBarStyle
?
:
boolean
;
private
_lastBaseTheme
:
string
;
private
_lastBaseTheme
?
:
string
;
private
_lastBackground
?:
string
;
private
_lastBackground
?:
string
;
constructor
(
constructor
(
...
...
src/vs/workbench/services/bulkEdit/browser/bulkEditService.ts
浏览文件 @
9afa70a7
...
@@ -51,7 +51,7 @@ class ModelEditTask implements IDisposable {
...
@@ -51,7 +51,7 @@ class ModelEditTask implements IDisposable {
protected
_edits
:
IIdentifiedSingleEditOperation
[];
protected
_edits
:
IIdentifiedSingleEditOperation
[];
private
_expectedModelVersionId
:
number
|
undefined
;
private
_expectedModelVersionId
:
number
|
undefined
;
protected
_newEol
:
EndOfLineSequence
;
protected
_newEol
:
EndOfLineSequence
|
undefined
;
constructor
(
private
readonly
_modelReference
:
IReference
<
IResolvedTextEditorModel
>
)
{
constructor
(
private
readonly
_modelReference
:
IReference
<
IResolvedTextEditorModel
>
)
{
this
.
_model
=
this
.
_modelReference
.
object
.
textEditorModel
;
this
.
_model
=
this
.
_modelReference
.
object
.
textEditorModel
;
...
@@ -142,7 +142,7 @@ class BulkEditModel implements IDisposable {
...
@@ -142,7 +142,7 @@ class BulkEditModel implements IDisposable {
private
_textModelResolverService
:
ITextModelService
;
private
_textModelResolverService
:
ITextModelService
;
private
_edits
=
new
Map
<
string
,
ResourceTextEdit
[]
>
();
private
_edits
=
new
Map
<
string
,
ResourceTextEdit
[]
>
();
private
_editor
:
ICodeEditor
|
undefined
;
private
_editor
:
ICodeEditor
|
undefined
;
private
_tasks
:
ModelEditTask
[];
private
_tasks
:
ModelEditTask
[]
|
undefined
;
private
_progress
:
IProgress
<
void
>
;
private
_progress
:
IProgress
<
void
>
;
constructor
(
constructor
(
...
@@ -159,7 +159,7 @@ class BulkEditModel implements IDisposable {
...
@@ -159,7 +159,7 @@ class BulkEditModel implements IDisposable {
}
}
dispose
():
void
{
dispose
():
void
{
this
.
_tasks
=
dispose
(
this
.
_tasks
);
this
.
_tasks
=
dispose
(
this
.
_tasks
!
);
}
}
addEdit
(
edit
:
ResourceTextEdit
):
void
{
addEdit
(
edit
:
ResourceTextEdit
):
void
{
...
@@ -196,7 +196,7 @@ class BulkEditModel implements IDisposable {
...
@@ -196,7 +196,7 @@ class BulkEditModel implements IDisposable {
}
}
value
.
forEach
(
edit
=>
task
.
addEdit
(
edit
));
value
.
forEach
(
edit
=>
task
.
addEdit
(
edit
));
this
.
_tasks
.
push
(
task
);
this
.
_tasks
!
.
push
(
task
);
this
.
_progress
.
report
(
undefined
);
this
.
_progress
.
report
(
undefined
);
});
});
promises
.
push
(
promise
);
promises
.
push
(
promise
);
...
@@ -208,7 +208,7 @@ class BulkEditModel implements IDisposable {
...
@@ -208,7 +208,7 @@ class BulkEditModel implements IDisposable {
}
}
validate
():
ValidationResult
{
validate
():
ValidationResult
{
for
(
const
task
of
this
.
_tasks
)
{
for
(
const
task
of
this
.
_tasks
!
)
{
const
result
=
task
.
validate
();
const
result
=
task
.
validate
();
if
(
!
result
.
canApply
)
{
if
(
!
result
.
canApply
)
{
return
result
;
return
result
;
...
@@ -218,7 +218,7 @@ class BulkEditModel implements IDisposable {
...
@@ -218,7 +218,7 @@ class BulkEditModel implements IDisposable {
}
}
apply
():
void
{
apply
():
void
{
for
(
const
task
of
this
.
_tasks
)
{
for
(
const
task
of
this
.
_tasks
!
)
{
task
.
apply
();
task
.
apply
();
this
.
_progress
.
report
(
undefined
);
this
.
_progress
.
report
(
undefined
);
}
}
...
...
src/vs/workbench/services/timer/electron-browser/timerService.ts
浏览文件 @
9afa70a7
...
@@ -305,7 +305,7 @@ class TimerService implements ITimerService {
...
@@ -305,7 +305,7 @@ class TimerService implements ITimerService {
_serviceBrand
:
any
;
_serviceBrand
:
any
;
private
_startupMetrics
:
Promise
<
IStartupMetrics
>
;
private
_startupMetrics
?
:
Promise
<
IStartupMetrics
>
;
constructor
(
constructor
(
@
IWindowsService
private
readonly
_windowsService
:
IWindowsService
,
@
IWindowsService
private
readonly
_windowsService
:
IWindowsService
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录