Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a47159ba
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,发现更多精彩内容 >>
提交
a47159ba
编写于
10月 12, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Eliminate IModelDecorationsChangedEvent.changedDecorations
上级
6023aee9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
22 addition
and
53 deletion
+22
-53
src/vs/editor/common/model/textModelEvents.ts
src/vs/editor/common/model/textModelEvents.ts
+0
-4
src/vs/editor/common/model/textModelWithDecorations.ts
src/vs/editor/common/model/textModelWithDecorations.ts
+15
-28
src/vs/editor/common/viewModel/viewModelDecorations.ts
src/vs/editor/common/viewModel/viewModelDecorations.ts
+1
-2
src/vs/editor/common/viewModel/viewModelImpl.ts
src/vs/editor/common/viewModel/viewModelImpl.ts
+1
-2
src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts
...ditor/contrib/referenceSearch/browser/referencesWidget.ts
+2
-3
src/vs/editor/test/common/model/modelDecorations.test.ts
src/vs/editor/test/common/model/modelDecorations.test.ts
+1
-7
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+0
-4
src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts
.../workbench/parts/debug/browser/debugEditorModelManager.ts
+2
-3
未找到文件。
src/vs/editor/common/model/textModelEvents.ts
浏览文件 @
a47159ba
...
@@ -88,10 +88,6 @@ export interface IModelContentChangedEvent {
...
@@ -88,10 +88,6 @@ export interface IModelContentChangedEvent {
* An event describing that model decorations have changed.
* An event describing that model decorations have changed.
*/
*/
export
interface
IModelDecorationsChangedEvent
{
export
interface
IModelDecorationsChangedEvent
{
/**
* Lists of ids for changed decorations.
*/
readonly
changedDecorations
:
string
[];
}
}
/**
/**
...
...
src/vs/editor/common/model/textModelWithDecorations.ts
浏览文件 @
a47159ba
...
@@ -28,15 +28,12 @@ class DecorationsTracker {
...
@@ -28,15 +28,12 @@ class DecorationsTracker {
public
didAddDecorations
:
boolean
;
public
didAddDecorations
:
boolean
;
public
didRemoveDecorations
:
boolean
;
public
didRemoveDecorations
:
boolean
;
public
didChangeDecorations
:
boolean
;
public
changedDecorations
:
string
[];
public
changedDecorationsLen
:
number
;
constructor
()
{
constructor
()
{
this
.
didAddDecorations
=
false
;
this
.
didAddDecorations
=
false
;
this
.
didRemoveDecorations
=
false
;
this
.
didRemoveDecorations
=
false
;
this
.
changedDecorations
=
[];
this
.
didChangeDecorations
=
false
;
this
.
changedDecorationsLen
=
0
;
}
}
// --- Build decoration events
// --- Build decoration events
...
@@ -49,12 +46,8 @@ class DecorationsTracker {
...
@@ -49,12 +46,8 @@ class DecorationsTracker {
this
.
didRemoveDecorations
=
true
;
this
.
didRemoveDecorations
=
true
;
}
}
public
addMovedDecoration
(
id
:
string
):
void
{
public
markDidChangeDecorations
():
void
{
this
.
changedDecorations
[
this
.
changedDecorationsLen
++
]
=
id
;
this
.
didChangeDecorations
=
true
;
}
public
addUpdatedDecoration
(
id
:
string
):
void
{
this
.
changedDecorations
[
this
.
changedDecorationsLen
++
]
=
id
;
}
}
}
}
...
@@ -456,7 +449,7 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
...
@@ -456,7 +449,7 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
}
}
/**
/**
* Handle changed markers (i.e. update decorations ranges
and return the changed decorations, unique and sorted by id
)
* Handle changed markers (i.e. update decorations ranges)
*/
*/
private
_handleTrackedMarkers
(
markersTracker
:
MarkersTracker
):
void
{
private
_handleTrackedMarkers
(
markersTracker
:
MarkersTracker
):
void
{
let
changedInternalDecorationIds
=
markersTracker
.
getDecorationIds
();
let
changedInternalDecorationIds
=
markersTracker
.
getDecorationIds
();
...
@@ -466,8 +459,8 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
...
@@ -466,8 +459,8 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
changedInternalDecorationIds
.
sort
();
changedInternalDecorationIds
.
sort
();
let
uniqueChangedDecorations
:
string
[]
=
[],
uniqueChangedDecorationsLen
=
0
;
let
previousInternalDecorationId
:
number
=
0
;
let
previousInternalDecorationId
:
number
=
0
;
let
somethingChanged
=
false
;
for
(
let
i
=
0
,
len
=
changedInternalDecorationIds
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
changedInternalDecorationIds
.
length
;
i
<
len
;
i
++
)
{
let
internalDecorationId
=
changedInternalDecorationIds
[
i
];
let
internalDecorationId
=
changedInternalDecorationIds
[
i
];
if
(
internalDecorationId
===
previousInternalDecorationId
)
{
if
(
internalDecorationId
===
previousInternalDecorationId
)
{
...
@@ -485,15 +478,11 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
...
@@ -485,15 +478,11 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
let
endMarker
=
decoration
.
endMarker
.
position
;
let
endMarker
=
decoration
.
endMarker
.
position
;
let
range
=
TextModelWithDecorations
.
_createRangeFromMarkers
(
startMarker
,
endMarker
);
let
range
=
TextModelWithDecorations
.
_createRangeFromMarkers
(
startMarker
,
endMarker
);
decoration
.
setRange
(
this
.
_multiLineDecorationsMap
,
range
);
decoration
.
setRange
(
this
.
_multiLineDecorationsMap
,
range
);
somethingChanged
=
true
;
uniqueChangedDecorations
[
uniqueChangedDecorationsLen
++
]
=
decoration
.
id
;
}
}
if
(
uniqueChangedDecorations
.
length
>
0
)
{
if
(
somethingChanged
)
{
let
e
:
textModelEvents
.
IModelDecorationsChangedEvent
=
{
this
.
emitModelDecorationsChangedEvent
();
changedDecorations
:
uniqueChangedDecorations
};
this
.
emitModelDecorationsChangedEvent
(
e
);
}
}
}
}
...
@@ -528,20 +517,18 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
...
@@ -528,20 +517,18 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
private
_handleTrackedDecorations
(
decorationsTracker
:
DecorationsTracker
):
void
{
private
_handleTrackedDecorations
(
decorationsTracker
:
DecorationsTracker
):
void
{
if
(
if
(
!
decorationsTracker
.
didAddDecorations
!
decorationsTracker
.
didAddDecorations
&&
decorationsTracker
.
changedDecorationsLen
===
0
&&
!
decorationsTracker
.
didChangeDecorations
&&
!
decorationsTracker
.
didRemoveDecorations
&&
!
decorationsTracker
.
didRemoveDecorations
)
{
)
{
return
;
return
;
}
}
let
e
:
textModelEvents
.
IModelDecorationsChangedEvent
=
{
this
.
emitModelDecorationsChangedEvent
();
changedDecorations
:
decorationsTracker
.
changedDecorations
};
this
.
emitModelDecorationsChangedEvent
(
e
);
}
}
private
emitModelDecorationsChangedEvent
(
e
:
textModelEvents
.
IModelDecorationsChangedEvent
):
void
{
private
emitModelDecorationsChangedEvent
():
void
{
if
(
!
this
.
_isDisposing
)
{
if
(
!
this
.
_isDisposing
)
{
let
e
:
textModelEvents
.
IModelDecorationsChangedEvent
=
{};
this
.
_eventEmitter
.
emit
(
textModelEvents
.
TextModelEventType
.
ModelDecorationsChanged
,
e
);
this
.
_eventEmitter
.
emit
(
textModelEvents
.
TextModelEventType
.
ModelDecorationsChanged
,
e
);
}
}
}
}
...
@@ -666,7 +653,7 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
...
@@ -666,7 +653,7 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
decoration
.
setRange
(
this
.
_multiLineDecorationsMap
,
newRange
);
decoration
.
setRange
(
this
.
_multiLineDecorationsMap
,
newRange
);
decorationsTracker
.
addMovedDecoration
(
decorationId
);
decorationsTracker
.
markDidChangeDecorations
(
);
}
}
private
_changeDecorationOptionsImpl
(
decorationsTracker
:
DecorationsTracker
,
decorationId
:
string
,
options
:
ModelDecorationOptions
):
void
{
private
_changeDecorationOptionsImpl
(
decorationsTracker
:
DecorationsTracker
,
decorationId
:
string
,
options
:
ModelDecorationOptions
):
void
{
...
@@ -682,7 +669,7 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
...
@@ -682,7 +669,7 @@ export class TextModelWithDecorations extends TextModelWithMarkers implements ed
decoration
.
setOptions
(
options
);
decoration
.
setOptions
(
options
);
decorationsTracker
.
addUpdatedDecoration
(
decorationId
);
decorationsTracker
.
markDidChangeDecorations
(
);
}
}
private
_removeDecorationImpl
(
decorationsTracker
:
DecorationsTracker
,
decorationId
:
string
):
void
{
private
_removeDecorationImpl
(
decorationsTracker
:
DecorationsTracker
,
decorationId
:
string
):
void
{
...
...
src/vs/editor/common/viewModel/viewModelDecorations.ts
浏览文件 @
a47159ba
...
@@ -9,7 +9,6 @@ import { Range } from 'vs/editor/common/core/range';
...
@@ -9,7 +9,6 @@ import { Range } from 'vs/editor/common/core/range';
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
InlineDecoration
,
ViewModelDecoration
,
ICoordinatesConverter
}
from
'
vs/editor/common/viewModel/viewModel
'
;
import
{
InlineDecoration
,
ViewModelDecoration
,
ICoordinatesConverter
}
from
'
vs/editor/common/viewModel/viewModel
'
;
import
{
IModelDecorationsChangedEvent
}
from
'
vs/editor/common/model/textModelEvents
'
;
export
interface
IDecorationsViewportData
{
export
interface
IDecorationsViewportData
{
/**
/**
...
@@ -58,7 +57,7 @@ export class ViewModelDecorations implements IDisposable {
...
@@ -58,7 +57,7 @@ export class ViewModelDecorations implements IDisposable {
this
.
_clearCachedModelDecorationsResolver
();
this
.
_clearCachedModelDecorationsResolver
();
}
}
public
onModelDecorationsChanged
(
e
:
IModelDecorationsChangedEvent
):
void
{
public
onModelDecorationsChanged
():
void
{
this
.
_decorationsCache
=
Object
.
create
(
null
);
this
.
_decorationsCache
=
Object
.
create
(
null
);
this
.
_clearCachedModelDecorationsResolver
();
this
.
_clearCachedModelDecorationsResolver
();
}
}
...
...
src/vs/editor/common/viewModel/viewModelImpl.ts
浏览文件 @
a47159ba
...
@@ -282,8 +282,7 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel
...
@@ -282,8 +282,7 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel
break
;
break
;
}
}
case
textModelEvents
.
TextModelEventType
.
ModelDecorationsChanged
:
{
case
textModelEvents
.
TextModelEventType
.
ModelDecorationsChanged
:
{
const
e
=
<
textModelEvents
.
IModelDecorationsChangedEvent
>
data
;
this
.
decorations
.
onModelDecorationsChanged
();
this
.
decorations
.
onModelDecorationsChanged
(
e
);
eventsCollector
.
emit
(
new
viewEvents
.
ViewDecorationsChangedEvent
());
eventsCollector
.
emit
(
new
viewEvents
.
ViewDecorationsChangedEvent
());
break
;
break
;
}
}
...
...
src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts
浏览文件 @
a47159ba
...
@@ -38,7 +38,6 @@ import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/r
...
@@ -38,7 +38,6 @@ import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/r
import
{
registerColor
,
activeContrastBorder
,
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
registerColor
,
activeContrastBorder
,
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
registerThemingParticipant
,
ITheme
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
registerThemingParticipant
,
ITheme
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
attachListStyler
,
attachBadgeStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
attachListStyler
,
attachBadgeStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
IModelDecorationsChangedEvent
}
from
'
vs/editor/common/model/textModelEvents
'
;
import
{
IEditorOptions
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
IEditorOptions
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
ModelDecorationOptions
}
from
'
vs/editor/common/model/textModelWithDecorations
'
;
import
{
ModelDecorationOptions
}
from
'
vs/editor/common/model/textModelWithDecorations
'
;
...
@@ -81,7 +80,7 @@ class DecorationsManager implements IDisposable {
...
@@ -81,7 +80,7 @@ class DecorationsManager implements IDisposable {
}
}
private
_addDecorations
(
reference
:
FileReferences
):
void
{
private
_addDecorations
(
reference
:
FileReferences
):
void
{
this
.
_callOnModelChange
.
push
(
this
.
_editor
.
getModel
().
onDidChangeDecorations
((
event
)
=>
this
.
_onDecorationChanged
(
event
)));
this
.
_callOnModelChange
.
push
(
this
.
_editor
.
getModel
().
onDidChangeDecorations
((
event
)
=>
this
.
_onDecorationChanged
()));
this
.
_editor
.
changeDecorations
(
accessor
=>
{
this
.
_editor
.
changeDecorations
(
accessor
=>
{
...
@@ -107,7 +106,7 @@ class DecorationsManager implements IDisposable {
...
@@ -107,7 +106,7 @@ class DecorationsManager implements IDisposable {
});
});
}
}
private
_onDecorationChanged
(
event
:
IModelDecorationsChangedEvent
):
void
{
private
_onDecorationChanged
():
void
{
const
toRemove
:
string
[]
=
[];
const
toRemove
:
string
[]
=
[];
this
.
_decorations
.
forEach
((
reference
,
decorationId
)
=>
{
this
.
_decorations
.
forEach
((
reference
,
decorationId
)
=>
{
...
...
src/vs/editor/test/common/model/modelDecorations.test.ts
浏览文件 @
a47159ba
...
@@ -207,7 +207,6 @@ suite('Editor Model - Model Decorations', () => {
...
@@ -207,7 +207,6 @@ suite('Editor Model - Model Decorations', () => {
let
listenerCalled
=
0
;
let
listenerCalled
=
0
;
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
listenerCalled
++
;
listenerCalled
++
;
assert
.
equal
(
e
.
changedDecorations
.
length
,
0
);
});
});
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
assert
.
equal
(
listenerCalled
,
1
,
'
listener called
'
);
assert
.
equal
(
listenerCalled
,
1
,
'
listener called
'
);
...
@@ -218,8 +217,6 @@ suite('Editor Model - Model Decorations', () => {
...
@@ -218,8 +217,6 @@ suite('Editor Model - Model Decorations', () => {
let
decId
=
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
let
decId
=
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
listenerCalled
++
;
listenerCalled
++
;
assert
.
equal
(
e
.
changedDecorations
.
length
,
1
);
assert
.
equal
(
e
.
changedDecorations
[
0
],
decId
);
});
});
thisModel
.
changeDecorations
((
changeAccessor
)
=>
{
thisModel
.
changeDecorations
((
changeAccessor
)
=>
{
changeAccessor
.
changeDecoration
(
decId
,
new
Range
(
1
,
1
,
1
,
2
));
changeAccessor
.
changeDecoration
(
decId
,
new
Range
(
1
,
1
,
1
,
2
));
...
@@ -232,7 +229,6 @@ suite('Editor Model - Model Decorations', () => {
...
@@ -232,7 +229,6 @@ suite('Editor Model - Model Decorations', () => {
let
decId
=
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
let
decId
=
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
listenerCalled
++
;
listenerCalled
++
;
assert
.
equal
(
e
.
changedDecorations
.
length
,
0
);
});
});
thisModel
.
changeDecorations
((
changeAccessor
)
=>
{
thisModel
.
changeDecorations
((
changeAccessor
)
=>
{
changeAccessor
.
removeDecoration
(
decId
);
changeAccessor
.
removeDecoration
(
decId
);
...
@@ -242,12 +238,10 @@ suite('Editor Model - Model Decorations', () => {
...
@@ -242,12 +238,10 @@ suite('Editor Model - Model Decorations', () => {
test
(
'
decorations emit event when inserting one line text before it
'
,
()
=>
{
test
(
'
decorations emit event when inserting one line text before it
'
,
()
=>
{
let
listenerCalled
=
0
;
let
listenerCalled
=
0
;
let
decId
=
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
addDecoration
(
thisModel
,
1
,
2
,
3
,
2
,
'
myType
'
);
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
thisModel
.
onDidChangeDecorations
((
e
)
=>
{
listenerCalled
++
;
listenerCalled
++
;
assert
.
equal
(
e
.
changedDecorations
.
length
,
1
);
assert
.
equal
(
e
.
changedDecorations
[
0
],
decId
);
});
});
thisModel
.
applyEdits
([
EditOperation
.
insert
(
new
Position
(
1
,
1
),
'
Hallo
'
)]);
thisModel
.
applyEdits
([
EditOperation
.
insert
(
new
Position
(
1
,
1
),
'
Hallo
'
)]);
...
...
src/vs/monaco.d.ts
浏览文件 @
a47159ba
...
@@ -2482,10 +2482,6 @@ declare module monaco.editor {
...
@@ -2482,10 +2482,6 @@ declare module monaco.editor {
* An event describing that model decorations have changed.
* An event describing that model decorations have changed.
*/
*/
export
interface
IModelDecorationsChangedEvent
{
export
interface
IModelDecorationsChangedEvent
{
/**
* Lists of ids for changed decorations.
*/
readonly
changedDecorations
:
string
[];
}
}
/**
/**
...
...
src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts
浏览文件 @
a47159ba
...
@@ -13,7 +13,6 @@ import { IModel, TrackedRangeStickiness, IModelDeltaDecoration, IModelDecoration
...
@@ -13,7 +13,6 @@ import { IModel, TrackedRangeStickiness, IModelDeltaDecoration, IModelDecoration
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IDebugService
,
IBreakpoint
,
IRawBreakpoint
,
State
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IDebugService
,
IBreakpoint
,
IRawBreakpoint
,
State
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IModelDecorationsChangedEvent
}
from
'
vs/editor/common/model/textModelEvents
'
;
import
{
MarkdownString
}
from
'
vs/base/common/htmlContent
'
;
import
{
MarkdownString
}
from
'
vs/base/common/htmlContent
'
;
interface
IDebugEditorModelData
{
interface
IDebugEditorModelData
{
...
@@ -84,7 +83,7 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
...
@@ -84,7 +83,7 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
const
desiredDecorations
=
this
.
createBreakpointDecorations
(
model
,
breakpoints
);
const
desiredDecorations
=
this
.
createBreakpointDecorations
(
model
,
breakpoints
);
const
breakPointDecorations
=
model
.
deltaDecorations
([],
desiredDecorations
);
const
breakPointDecorations
=
model
.
deltaDecorations
([],
desiredDecorations
);
const
toDispose
:
lifecycle
.
IDisposable
[]
=
[
model
.
onDidChangeDecorations
((
e
)
=>
this
.
onModelDecorationsChanged
(
modelUrlStr
,
e
))];
const
toDispose
:
lifecycle
.
IDisposable
[]
=
[
model
.
onDidChangeDecorations
((
e
)
=>
this
.
onModelDecorationsChanged
(
modelUrlStr
))];
const
breakpointDecorationsAsMap
=
new
Map
<
string
,
Range
>
();
const
breakpointDecorationsAsMap
=
new
Map
<
string
,
Range
>
();
breakPointDecorations
.
forEach
((
decorationId
,
index
)
=>
breakpointDecorationsAsMap
.
set
(
decorationId
,
desiredDecorations
[
index
].
range
));
breakPointDecorations
.
forEach
((
decorationId
,
index
)
=>
breakpointDecorationsAsMap
.
set
(
decorationId
,
desiredDecorations
[
index
].
range
));
...
@@ -186,7 +185,7 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
...
@@ -186,7 +185,7 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
}
}
// breakpoints management. Represent data coming from the debug service and also send data back.
// breakpoints management. Represent data coming from the debug service and also send data back.
private
onModelDecorationsChanged
(
modelUrlStr
:
string
,
e
:
IModelDecorationsChangedEvent
):
void
{
private
onModelDecorationsChanged
(
modelUrlStr
:
string
):
void
{
const
modelData
=
this
.
modelDataMap
.
get
(
modelUrlStr
);
const
modelData
=
this
.
modelDataMap
.
get
(
modelUrlStr
);
if
(
modelData
.
breakpointDecorationsAsMap
.
size
===
0
)
{
if
(
modelData
.
breakpointDecorationsAsMap
.
size
===
0
)
{
// I have no decorations
// I have no decorations
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录