Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8abc9e4a
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,体验更适合开发者的 AI 搜索 >>
提交
8abc9e4a
编写于
8月 05, 2019
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more improvements for #78168
上级
3015179c
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
76 addition
and
55 deletion
+76
-55
src/vs/editor/contrib/hover/modesContentHover.ts
src/vs/editor/contrib/hover/modesContentHover.ts
+1
-0
src/vs/editor/contrib/hover/modesGlyphHover.ts
src/vs/editor/contrib/hover/modesGlyphHover.ts
+2
-0
src/vs/editor/contrib/indentation/indentation.ts
src/vs/editor/contrib/indentation/indentation.ts
+8
-7
src/vs/editor/contrib/linesOperations/copyLinesCommand.ts
src/vs/editor/contrib/linesOperations/copyLinesCommand.ts
+6
-2
src/vs/editor/contrib/linesOperations/moveLinesCommand.ts
src/vs/editor/contrib/linesOperations/moveLinesCommand.ts
+5
-2
src/vs/editor/contrib/linesOperations/sortLinesCommand.ts
src/vs/editor/contrib/linesOperations/sortLinesCommand.ts
+3
-2
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
+1
-0
src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts
...r/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts
+1
-0
src/vs/editor/standalone/browser/simpleServices.ts
src/vs/editor/standalone/browser/simpleServices.ts
+13
-10
src/vs/editor/standalone/browser/standaloneCodeEditor.ts
src/vs/editor/standalone/browser/standaloneCodeEditor.ts
+1
-3
src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts
...s/editor/standalone/browser/standaloneThemeServiceImpl.ts
+1
-1
src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts
...vs/platform/remote/common/remoteAgentFileSystemChannel.ts
+1
-1
src/vs/workbench/api/node/extHostRequireInterceptor.ts
src/vs/workbench/api/node/extHostRequireInterceptor.ts
+3
-3
src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.ts
...ervices/extensions/common/extensionDescriptionRegistry.ts
+3
-3
src/vs/workbench/services/extensions/common/proxyIdentifier.ts
...s/workbench/services/extensions/common/proxyIdentifier.ts
+1
-1
src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
...ces/extensions/electron-browser/cachedExtensionScanner.ts
+2
-2
src/vs/workbench/services/extensions/node/extensionPoints.ts
src/vs/workbench/services/extensions/node/extensionPoints.ts
+2
-2
src/vs/workbench/services/extensions/test/node/rpcProtocol.test.ts
...rkbench/services/extensions/test/node/rpcProtocol.test.ts
+2
-2
src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts
...ench/services/remote/common/abstractRemoteAgentService.ts
+1
-0
src/vs/workbench/services/textMate/common/TMScopeRegistry.ts
src/vs/workbench/services/textMate/common/TMScopeRegistry.ts
+1
-1
src/vs/workbench/services/textMate/electron-browser/textMateWorker.ts
...ench/services/textMate/electron-browser/textMateWorker.ts
+17
-12
src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts
...vs/workbench/test/electron-browser/api/testRPCProtocol.ts
+1
-1
未找到文件。
src/vs/editor/contrib/hover/modesContentHover.ts
浏览文件 @
8abc9e4a
...
...
@@ -70,6 +70,7 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
private
readonly
_markerDecorationsService
:
IMarkerDecorationsService
)
{
this
.
_editor
=
editor
;
this
.
_result
=
[];
}
setRange
(
range
:
Range
):
void
{
...
...
src/vs/editor/contrib/hover/modesGlyphHover.ts
浏览文件 @
8abc9e4a
...
...
@@ -27,6 +27,7 @@ class MarginComputer implements IHoverComputer<IHoverMessage[]> {
constructor
(
editor
:
ICodeEditor
)
{
this
.
_editor
=
editor
;
this
.
_lineNumber
=
-
1
;
this
.
_result
=
[];
}
public
setLineNumber
(
lineNumber
:
number
):
void
{
...
...
@@ -100,6 +101,7 @@ export class ModesGlyphHoverWidget extends GlyphHoverWidget {
)
{
super
(
ModesGlyphHoverWidget
.
ID
,
editor
);
this
.
_messages
=
[];
this
.
_lastLineNumber
=
-
1
;
this
.
_markdownRenderer
=
this
.
_register
(
new
MarkdownRenderer
(
this
.
_editor
,
modeService
,
openerService
));
...
...
src/vs/editor/contrib/indentation/indentation.ts
浏览文件 @
8abc9e4a
...
...
@@ -378,11 +378,12 @@ export class AutoIndentOnPasteCommand implements ICommand {
private
readonly
_edits
:
{
range
:
IRange
;
text
:
string
;
eol
?:
EndOfLineSequence
;
}[];
private
readonly
_initialSelection
:
Selection
;
private
_selectionId
:
string
;
private
_selectionId
:
string
|
null
;
constructor
(
edits
:
TextEdit
[],
initialSelection
:
Selection
)
{
this
.
_initialSelection
=
initialSelection
;
this
.
_edits
=
[];
this
.
_selectionId
=
null
;
for
(
let
edit
of
edits
)
{
if
(
edit
.
range
&&
typeof
edit
.
text
===
'
string
'
)
{
...
...
@@ -415,7 +416,7 @@ export class AutoIndentOnPasteCommand implements ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
ICursorStateComputerData
):
Selection
{
return
helper
.
getTrackedSelection
(
this
.
_selectionId
);
return
helper
.
getTrackedSelection
(
this
.
_selectionId
!
);
}
}
...
...
@@ -651,7 +652,7 @@ function getIndentationEditOperations(model: ITextModel, builder: IEditOperation
export
class
IndentationToSpacesCommand
implements
ICommand
{
private
selectionId
:
string
;
private
selectionId
:
string
|
null
=
null
;
constructor
(
private
readonly
selection
:
Selection
,
private
tabSize
:
number
)
{
}
...
...
@@ -661,13 +662,13 @@ export class IndentationToSpacesCommand implements ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
ICursorStateComputerData
):
Selection
{
return
helper
.
getTrackedSelection
(
this
.
selectionId
);
return
helper
.
getTrackedSelection
(
this
.
selectionId
!
);
}
}
export
class
IndentationToTabsCommand
implements
ICommand
{
private
selectionId
:
string
;
private
selectionId
:
string
|
null
=
null
;
constructor
(
private
readonly
selection
:
Selection
,
private
tabSize
:
number
)
{
}
...
...
@@ -677,7 +678,7 @@ export class IndentationToTabsCommand implements ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
ICursorStateComputerData
):
Selection
{
return
helper
.
getTrackedSelection
(
this
.
selectionId
);
return
helper
.
getTrackedSelection
(
this
.
selectionId
!
);
}
}
...
...
@@ -688,4 +689,4 @@ registerEditorAction(IndentUsingTabs);
registerEditorAction
(
IndentUsingSpaces
);
registerEditorAction
(
DetectIndentation
);
registerEditorAction
(
ReindentLinesAction
);
registerEditorAction
(
ReindentSelectedLinesAction
);
\ No newline at end of file
registerEditorAction
(
ReindentSelectedLinesAction
);
src/vs/editor/contrib/linesOperations/copyLinesCommand.ts
浏览文件 @
8abc9e4a
...
...
@@ -14,13 +14,17 @@ export class CopyLinesCommand implements editorCommon.ICommand {
private
readonly
_isCopyingDown
:
boolean
;
private
_selectionDirection
:
SelectionDirection
;
private
_selectionId
:
string
;
private
_selectionId
:
string
|
null
;
private
_startLineNumberDelta
:
number
;
private
_endLineNumberDelta
:
number
;
constructor
(
selection
:
Selection
,
isCopyingDown
:
boolean
)
{
this
.
_selection
=
selection
;
this
.
_isCopyingDown
=
isCopyingDown
;
this
.
_selectionDirection
=
SelectionDirection
.
LTR
;
this
.
_selectionId
=
null
;
this
.
_startLineNumberDelta
=
0
;
this
.
_endLineNumberDelta
=
0
;
}
public
getEditOperations
(
model
:
ITextModel
,
builder
:
editorCommon
.
IEditOperationBuilder
):
void
{
...
...
@@ -58,7 +62,7 @@ export class CopyLinesCommand implements editorCommon.ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
editorCommon
.
ICursorStateComputerData
):
Selection
{
let
result
=
helper
.
getTrackedSelection
(
this
.
_selectionId
);
let
result
=
helper
.
getTrackedSelection
(
this
.
_selectionId
!
);
if
(
this
.
_startLineNumberDelta
!==
0
||
this
.
_endLineNumberDelta
!==
0
)
{
let
startLineNumber
=
result
.
startLineNumber
;
...
...
src/vs/editor/contrib/linesOperations/moveLinesCommand.ts
浏览文件 @
8abc9e4a
...
...
@@ -20,7 +20,7 @@ export class MoveLinesCommand implements ICommand {
private
readonly
_isMovingDown
:
boolean
;
private
readonly
_autoIndent
:
boolean
;
private
_selectionId
:
string
;
private
_selectionId
:
string
|
null
;
private
_moveEndPositionDown
?:
boolean
;
private
_moveEndLineSelectionShrink
:
boolean
;
...
...
@@ -28,6 +28,7 @@ export class MoveLinesCommand implements ICommand {
this
.
_selection
=
selection
;
this
.
_isMovingDown
=
isMovingDown
;
this
.
_autoIndent
=
autoIndent
;
this
.
_selectionId
=
null
;
this
.
_moveEndLineSelectionShrink
=
false
;
}
...
...
@@ -36,9 +37,11 @@ export class MoveLinesCommand implements ICommand {
let
modelLineCount
=
model
.
getLineCount
();
if
(
this
.
_isMovingDown
&&
this
.
_selection
.
endLineNumber
===
modelLineCount
)
{
this
.
_selectionId
=
builder
.
trackSelection
(
this
.
_selection
);
return
;
}
if
(
!
this
.
_isMovingDown
&&
this
.
_selection
.
startLineNumber
===
1
)
{
this
.
_selectionId
=
builder
.
trackSelection
(
this
.
_selection
);
return
;
}
...
...
@@ -328,7 +331,7 @@ export class MoveLinesCommand implements ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
ICursorStateComputerData
):
Selection
{
let
result
=
helper
.
getTrackedSelection
(
this
.
_selectionId
);
let
result
=
helper
.
getTrackedSelection
(
this
.
_selectionId
!
);
if
(
this
.
_moveEndPositionDown
)
{
result
=
result
.
setEndPosition
(
result
.
endLineNumber
+
1
,
1
);
...
...
src/vs/editor/contrib/linesOperations/sortLinesCommand.ts
浏览文件 @
8abc9e4a
...
...
@@ -12,12 +12,13 @@ import { IIdentifiedSingleEditOperation, ITextModel } from 'vs/editor/common/mod
export
class
SortLinesCommand
implements
editorCommon
.
ICommand
{
private
readonly
selection
:
Selection
;
private
selectionId
:
string
;
private
readonly
descending
:
boolean
;
private
selectionId
:
string
|
null
;
constructor
(
selection
:
Selection
,
descending
:
boolean
)
{
this
.
selection
=
selection
;
this
.
descending
=
descending
;
this
.
selectionId
=
null
;
}
public
getEditOperations
(
model
:
ITextModel
,
builder
:
editorCommon
.
IEditOperationBuilder
):
void
{
...
...
@@ -30,7 +31,7 @@ export class SortLinesCommand implements editorCommon.ICommand {
}
public
computeCursorState
(
model
:
ITextModel
,
helper
:
editorCommon
.
ICursorStateComputerData
):
Selection
{
return
helper
.
getTrackedSelection
(
this
.
selectionId
);
return
helper
.
getTrackedSelection
(
this
.
selectionId
!
);
}
public
static
canRun
(
model
:
ITextModel
|
null
,
selection
:
Selection
,
descending
:
boolean
):
boolean
{
...
...
src/vs/editor/contrib/wordHighlighter/wordHighlighter.ts
浏览文件 @
8abc9e4a
...
...
@@ -469,6 +469,7 @@ class WordHighlighterContribution extends Disposable implements editorCommon.IEd
constructor
(
editor
:
ICodeEditor
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
)
{
super
();
this
.
wordHighligher
=
null
;
const
createWordHighlighterIfPossible
=
()
=>
{
if
(
editor
.
hasModel
())
{
this
.
wordHighligher
=
new
WordHighlighter
(
editor
,
contextKeyService
);
...
...
src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.ts
浏览文件 @
8abc9e4a
...
...
@@ -21,6 +21,7 @@ export class IPadShowKeyboard extends Disposable implements IEditorContribution
constructor
(
editor
:
ICodeEditor
)
{
super
();
this
.
editor
=
editor
;
this
.
widget
=
null
;
if
(
browser
.
isIPad
)
{
this
.
_register
(
editor
.
onDidChangeConfiguration
(()
=>
this
.
update
()));
this
.
update
();
...
...
src/vs/editor/standalone/browser/simpleServices.ts
浏览文件 @
8abc9e4a
...
...
@@ -98,17 +98,20 @@ function withTypedEditor<T>(widget: editorCommon.IEditor, codeEditorCallback: (e
export
class
SimpleEditorModelResolverService
implements
ITextModelService
{
public
_serviceBrand
:
any
;
private
editor
:
editorCommon
.
IEditor
;
private
editor
?
:
editorCommon
.
IEditor
;
public
setEditor
(
editor
:
editorCommon
.
IEditor
):
void
{
this
.
editor
=
editor
;
}
public
createModelReference
(
resource
:
URI
):
Promise
<
IReference
<
IResolvedTextEditorModel
>>
{
let
model
:
ITextModel
|
null
=
withTypedEditor
(
this
.
editor
,
(
editor
)
=>
this
.
findModel
(
editor
,
resource
),
(
diffEditor
)
=>
this
.
findModel
(
diffEditor
.
getOriginalEditor
(),
resource
)
||
this
.
findModel
(
diffEditor
.
getModifiedEditor
(),
resource
)
);
let
model
:
ITextModel
|
null
=
null
;
if
(
this
.
editor
)
{
model
=
withTypedEditor
(
this
.
editor
,
(
editor
)
=>
this
.
findModel
(
editor
,
resource
),
(
diffEditor
)
=>
this
.
findModel
(
diffEditor
.
getOriginalEditor
(),
resource
)
||
this
.
findModel
(
diffEditor
.
getModifiedEditor
(),
resource
)
);
}
if
(
!
model
)
{
return
Promise
.
reject
(
new
Error
(
`Model not found`
));
...
...
@@ -477,12 +480,12 @@ export class SimpleResourceConfigurationService implements ITextResourceConfigur
_serviceBrand
:
any
;
p
ublic
readonly
onDidChangeConfiguration
:
Event
<
IConfigurationChangeEvent
>
;
p
rivate
readonly
_onDidChangeConfigurationEmitter
=
new
Emitter
()
;
p
rivate
readonly
_onDidChangeConfiguration
=
new
Emitter
<
IConfigurationChangeEvent
>
()
;
p
ublic
readonly
onDidChangeConfiguration
=
this
.
_onDidChangeConfiguration
.
event
;
constructor
(
private
readonly
configurationService
:
SimpleConfigurationService
)
{
this
.
configurationService
.
onDidChangeConfiguration
((
e
)
=>
{
this
.
_onDidChangeConfiguration
Emitter
.
fire
(
e
);
this
.
_onDidChangeConfiguration
.
fire
(
e
);
});
}
...
...
@@ -519,7 +522,7 @@ export class SimpleResourcePropertiesService implements ITextResourcePropertiesS
}
export
class
StandaloneTelemetryService
implements
ITelemetryService
{
_serviceBrand
:
void
;
_serviceBrand
:
void
=
undefined
;
public
isOptedIn
=
false
;
...
...
@@ -687,7 +690,7 @@ export class SimpleLayoutService implements ILayoutService {
public
onLayout
=
Event
.
None
;
private
_dimension
:
IDimension
;
private
_dimension
?
:
IDimension
;
get
dimension
():
IDimension
{
if
(
!
this
.
_dimension
)
{
this
.
_dimension
=
dom
.
getClientArea
(
window
.
document
.
body
);
...
...
src/vs/editor/standalone/browser/standaloneCodeEditor.ts
浏览文件 @
8abc9e4a
...
...
@@ -176,9 +176,7 @@ export class StandaloneCodeEditor extends CodeEditorWidget implements IStandalon
);
super
(
domElement
,
options
,
{},
instantiationService
,
codeEditorService
,
commandService
,
contextKeyService
,
themeService
,
notificationService
,
accessibilityService
);
if
(
keybindingService
instanceof
StandaloneKeybindingService
)
{
this
.
_standaloneKeybindingService
=
keybindingService
;
}
this
.
_standaloneKeybindingService
=
<
StandaloneKeybindingService
>
keybindingService
;
// Create the ARIA dom node as soon as the first editor is instantiated
createAriaDomNode
();
...
...
src/vs/editor/standalone/browser/standaloneThemeServiceImpl.ts
浏览文件 @
8abc9e4a
...
...
@@ -160,7 +160,7 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService {
private
readonly
_knownThemes
:
Map
<
string
,
StandaloneTheme
>
;
private
readonly
_styleElement
:
HTMLStyleElement
;
private
_theme
:
IStandaloneTheme
;
private
_theme
!
:
IStandaloneTheme
;
private
readonly
_onThemeChange
:
Emitter
<
IStandaloneTheme
>
;
private
readonly
_onIconThemeChange
:
Emitter
<
IIconTheme
>
;
private
readonly
environment
:
IEnvironmentService
=
Object
.
create
(
null
);
...
...
src/vs/platform/remote/common/remoteAgentFileSystemChannel.ts
浏览文件 @
8abc9e4a
...
...
@@ -33,7 +33,7 @@ export class RemoteExtensionsFileSystemProvider extends Disposable implements IF
private
readonly
_onDidChangeCapabilities
=
this
.
_register
(
new
Emitter
<
void
>
());
readonly
onDidChangeCapabilities
:
Event
<
void
>
=
this
.
_onDidChangeCapabilities
.
event
;
private
_capabilities
:
FileSystemProviderCapabilities
;
private
_capabilities
!
:
FileSystemProviderCapabilities
;
get
capabilities
():
FileSystemProviderCapabilities
{
return
this
.
_capabilities
;
}
constructor
(
private
readonly
channel
:
IChannel
,
environment
:
Promise
<
IRemoteAgentEnvironment
|
null
>
)
{
...
...
src/vs/workbench/api/node/extHostRequireInterceptor.ts
浏览文件 @
8abc9e4a
...
...
@@ -75,7 +75,7 @@ export class VSCodeNodeModuleFactory implements INodeModuleFactory {
public
readonly
nodeModuleName
=
'
vscode
'
;
private
readonly
_extApiImpl
=
new
Map
<
string
,
typeof
vscode
>
();
private
_defaultApiImpl
:
typeof
vscode
;
private
_defaultApiImpl
?
:
typeof
vscode
;
constructor
(
private
readonly
_apiFactory
:
IExtensionApiFactory
,
...
...
@@ -191,7 +191,7 @@ export class OpenNodeModuleFactory implements INodeModuleFactory {
public
readonly
nodeModuleName
:
string
[]
=
[
'
open
'
,
'
opn
'
];
private
_extensionId
:
string
|
undefined
;
private
_original
:
IOriginalOpen
;
private
_original
?
:
IOriginalOpen
;
private
_impl
:
IOpenModule
;
constructor
(
mainThreadWindow
:
MainThreadWindowShape
,
private
_mainThreadTelemerty
:
MainThreadTelemetryShape
,
private
readonly
_extensionPaths
:
TernarySearchTree
<
IExtensionDescription
>
)
{
...
...
@@ -224,7 +224,7 @@ export class OpenNodeModuleFactory implements INodeModuleFactory {
private
callOriginal
(
target
:
string
,
options
:
OpenOptions
|
undefined
):
Thenable
<
any
>
{
this
.
sendNoForwardTelemetry
();
return
this
.
_original
(
target
,
options
);
return
this
.
_original
!
(
target
,
options
);
}
private
sendShimmingTelemetry
():
void
{
...
...
src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.ts
浏览文件 @
8abc9e4a
...
...
@@ -17,9 +17,9 @@ export class ExtensionDescriptionRegistry {
public
readonly
onDidChange
=
this
.
_onDidChange
.
event
;
private
_extensionDescriptions
:
IExtensionDescription
[];
private
_extensionsMap
:
Map
<
string
,
IExtensionDescription
>
;
private
_extensionsArr
:
IExtensionDescription
[];
private
_activationMap
:
Map
<
string
,
IExtensionDescription
[]
>
;
private
_extensionsMap
!
:
Map
<
string
,
IExtensionDescription
>
;
private
_extensionsArr
!
:
IExtensionDescription
[];
private
_activationMap
!
:
Map
<
string
,
IExtensionDescription
[]
>
;
constructor
(
extensionDescriptions
:
IExtensionDescription
[])
{
this
.
_extensionDescriptions
=
extensionDescriptions
;
...
...
src/vs/workbench/services/extensions/common/proxyIdentifier.ts
浏览文件 @
8abc9e4a
...
...
@@ -20,10 +20,10 @@ export interface IRPCProtocol {
assertRegistered
(
identifiers
:
ProxyIdentifier
<
any
>
[]):
void
;
}
// @ts-ignore
export
class
ProxyIdentifier
<
T
>
{
public
static
count
=
0
;
_proxyIdentifierBrand
:
void
;
_suppressCompilerUnusedWarning
:
T
;
public
readonly
isMain
:
boolean
;
public
readonly
sid
:
string
;
...
...
src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
浏览文件 @
8abc9e4a
...
...
@@ -48,8 +48,8 @@ function getExtraDevSystemExtensionsRoot(): string {
export
class
CachedExtensionScanner
{
public
readonly
scannedExtensions
:
Promise
<
IExtensionDescription
[]
>
;
private
_scannedExtensionsResolve
:
(
result
:
IExtensionDescription
[])
=>
void
;
private
_scannedExtensionsReject
:
(
err
:
any
)
=>
void
;
private
_scannedExtensionsResolve
!
:
(
result
:
IExtensionDescription
[])
=>
void
;
private
_scannedExtensionsReject
!
:
(
err
:
any
)
=>
void
;
public
readonly
translationConfig
:
Promise
<
Translations
>
;
constructor
(
...
...
src/vs/workbench/services/extensions/node/extensionPoints.ts
浏览文件 @
8abc9e4a
...
...
@@ -409,7 +409,7 @@ class ExtensionManifestValidator extends ExtensionManifestHandler {
export
class
ExtensionScannerInput
{
public
mtime
:
number
;
public
mtime
:
number
|
undefined
;
constructor
(
public
readonly
ourVersion
:
string
,
...
...
@@ -609,4 +609,4 @@ export class ExtensionScanner {
return
resultArr
;
});
}
}
\ No newline at end of file
}
src/vs/workbench/services/extensions/test/node/rpcProtocol.test.ts
浏览文件 @
8abc9e4a
...
...
@@ -14,7 +14,7 @@ import { VSBuffer } from 'vs/base/common/buffer';
suite
(
'
RPCProtocol
'
,
()
=>
{
class
MessagePassingProtocol
implements
IMessagePassingProtocol
{
private
_pair
:
MessagePassingProtocol
;
private
_pair
?
:
MessagePassingProtocol
;
private
readonly
_onMessage
=
new
Emitter
<
VSBuffer
>
();
public
readonly
onMessage
:
Event
<
VSBuffer
>
=
this
.
_onMessage
.
event
;
...
...
@@ -25,7 +25,7 @@ suite('RPCProtocol', () => {
public
send
(
buffer
:
VSBuffer
):
void
{
process
.
nextTick
(()
=>
{
this
.
_pair
.
_onMessage
.
fire
(
buffer
);
this
.
_pair
!
.
_onMessage
.
fire
(
buffer
);
});
}
}
...
...
src/vs/workbench/services/remote/common/abstractRemoteAgentService.ts
浏览文件 @
8abc9e4a
...
...
@@ -31,6 +31,7 @@ export abstract class AbstractRemoteAgentService extends Disposable {
@
IEnvironmentService
protected
readonly
_environmentService
:
IEnvironmentService
)
{
super
();
this
.
_environment
=
null
;
}
abstract
getConnection
():
IRemoteAgentConnection
|
null
;
...
...
src/vs/workbench/services/textMate/common/TMScopeRegistry.ts
浏览文件 @
8abc9e4a
...
...
@@ -31,7 +31,7 @@ export class TMScopeRegistry extends Disposable {
constructor
()
{
super
();
this
.
reset
(
);
this
.
_scopeNameToLanguageRegistration
=
Object
.
create
(
null
);
}
public
reset
():
void
{
...
...
src/vs/workbench/services/textMate/electron-browser/textMateWorker.ts
浏览文件 @
8abc9e4a
...
...
@@ -80,7 +80,7 @@ class TextMateWorkerModel extends MirrorTextModel {
const
languageId
=
this
.
_languageId
;
this
.
_worker
.
getOrCreateGrammar
(
languageId
).
then
((
r
)
=>
{
if
(
this
.
_isDisposed
||
languageId
!==
this
.
_languageId
)
{
if
(
this
.
_isDisposed
||
languageId
!==
this
.
_languageId
||
!
r
)
{
return
;
}
...
...
@@ -118,7 +118,7 @@ export class TextMateWorker {
private
readonly
_host
:
TextMateWorkerHost
;
private
readonly
_models
:
{
[
uri
:
string
]:
TextMateWorkerModel
;
};
private
readonly
_grammarCache
:
Promise
<
ICreateGrammarResult
>
[];
private
readonly
_grammarFactory
:
TMGrammarFactory
;
private
readonly
_grammarFactory
:
TMGrammarFactory
|
null
;
constructor
(
ctx
:
IWorkerContext
<
TextMateWorkerHost
>
,
createData
:
ICreateData
)
{
this
.
_host
=
ctx
.
host
;
...
...
@@ -135,23 +135,23 @@ export class TextMateWorker {
};
});
let
vscodeTextmate
:
typeof
import
(
'
vscode-textmate
'
);
const
globalDefine
=
(
<
any
>
self
).
define
;
try
{
(
<
any
>
self
).
define
.
amd
=
undefined
;
vscodeTextmate
=
require
.
__$__nodeRequire
(
'
vscode-textmate
'
);
const
vscodeTextmate
=
<
typeof
import
(
'
vscode-textmate
'
)
>
require
.
__$__nodeRequire
(
'
vscode-textmate
'
);
this
.
_grammarFactory
=
new
TMGrammarFactory
({
logTrace
:
(
msg
:
string
)
=>
{
/* console.log(msg) */
},
logError
:
(
msg
:
string
,
err
:
any
)
=>
console
.
error
(
msg
,
err
),
readFile
:
(
resource
:
URI
)
=>
this
.
_host
.
readFile
(
resource
)
},
grammarDefinitions
,
vscodeTextmate
,
undefined
);
}
catch
(
err
)
{
console
.
error
(
err
);
this
.
_grammarFactory
=
null
;
return
;
}
finally
{
(
<
any
>
self
).
define
=
globalDefine
;
}
this
.
_grammarFactory
=
new
TMGrammarFactory
({
logTrace
:
(
msg
:
string
)
=>
{
/* console.log(msg) */
},
logError
:
(
msg
:
string
,
err
:
any
)
=>
console
.
error
(
msg
,
err
),
readFile
:
(
resource
:
URI
)
=>
this
.
_host
.
readFile
(
resource
)
},
grammarDefinitions
,
vscodeTextmate
,
undefined
);
}
public
acceptNewModel
(
data
:
IRawModelData
):
void
{
...
...
@@ -175,7 +175,10 @@ export class TextMateWorker {
}
}
public
getOrCreateGrammar
(
languageId
:
LanguageId
):
Promise
<
ICreateGrammarResult
>
{
public
getOrCreateGrammar
(
languageId
:
LanguageId
):
Promise
<
ICreateGrammarResult
|
null
>
{
if
(
!
this
.
_grammarFactory
)
{
return
Promise
.
resolve
(
null
);
}
if
(
!
this
.
_grammarCache
[
languageId
])
{
this
.
_grammarCache
[
languageId
]
=
this
.
_grammarFactory
.
createGrammar
(
languageId
);
}
...
...
@@ -183,7 +186,9 @@ export class TextMateWorker {
}
public
acceptTheme
(
theme
:
IRawTheme
):
void
{
this
.
_grammarFactory
.
setTheme
(
theme
);
if
(
this
.
_grammarFactory
)
{
this
.
_grammarFactory
.
setTheme
(
theme
);
}
}
public
_setTokens
(
resource
:
URI
,
versionId
:
number
,
tokens
:
Uint8Array
):
void
{
...
...
src/vs/workbench/test/electron-browser/api/testRPCProtocol.ts
浏览文件 @
8abc9e4a
...
...
@@ -27,7 +27,7 @@ export class TestRPCProtocol implements IExtHostContext {
private
_callCountValue
:
number
=
0
;
private
_idle
?:
Promise
<
any
>
;
private
_completeIdle
:
Function
;
private
_completeIdle
?
:
Function
;
private
readonly
_locals
:
{
[
id
:
string
]:
any
;
};
private
readonly
_proxies
:
{
[
id
:
string
]:
any
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录