Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
e8f7ac78
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e8f7ac78
编写于
8月 23, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
上级
156de5ea
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
51 addition
and
68 deletion
+51
-68
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
+6
-9
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
+9
-12
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+10
-14
src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts
...ch/parts/debug/electron-browser/statusbarColorProvider.ts
+2
-5
src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts
.../parts/feedback/electron-browser/feedbackStatusbarItem.ts
+6
-0
src/vs/workbench/parts/markers/browser/markersPanel.ts
src/vs/workbench/parts/markers/browser/markersPanel.ts
+9
-12
src/vs/workbench/parts/output/browser/outputPanel.ts
src/vs/workbench/parts/output/browser/outputPanel.ts
+2
-11
src/vs/workbench/parts/search/browser/searchViewlet.ts
src/vs/workbench/parts/search/browser/searchViewlet.ts
+1
-5
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+6
-0
未找到文件。
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
浏览文件 @
e8f7ac78
...
@@ -40,7 +40,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
...
@@ -40,7 +40,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
private
static
PRIORITY_PROP
=
'
priority
'
;
private
static
PRIORITY_PROP
=
'
priority
'
;
private
static
ALIGNMENT_PROP
=
'
alignment
'
;
private
static
ALIGNMENT_PROP
=
'
alignment
'
;
private
toDispose
:
IDisposable
[];
private
statusItemsContainer
:
Builder
;
private
statusItemsContainer
:
Builder
;
private
statusMsgDispose
:
IDisposable
;
private
statusMsgDispose
:
IDisposable
;
...
@@ -52,7 +51,11 @@ export class StatusbarPart extends Part implements IStatusbarService {
...
@@ -52,7 +51,11 @@ export class StatusbarPart extends Part implements IStatusbarService {
)
{
)
{
super
(
id
,
{
hasTitle
:
false
},
themeService
);
super
(
id
,
{
hasTitle
:
false
},
themeService
);
this
.
toDispose
=
[];
this
.
registerListeners
();
}
private
registerListeners
():
void
{
this
.
toUnbind
.
push
(
this
.
contextService
.
onDidChangeWorkspaceRoots
(()
=>
this
.
updateStyles
()));
}
}
public
addEntry
(
entry
:
IStatusbarEntry
,
alignment
:
StatusbarAlignment
,
priority
:
number
=
0
):
IDisposable
{
public
addEntry
(
entry
:
IStatusbarEntry
,
alignment
:
StatusbarAlignment
,
priority
:
number
=
0
):
IDisposable
{
...
@@ -120,7 +123,7 @@ export class StatusbarPart extends Part implements IStatusbarService {
...
@@ -120,7 +123,7 @@ export class StatusbarPart extends Part implements IStatusbarService {
const
descriptors
=
rightDescriptors
.
concat
(
leftDescriptors
);
// right first because they float
const
descriptors
=
rightDescriptors
.
concat
(
leftDescriptors
);
// right first because they float
this
.
to
Dispose
.
push
(...
descriptors
.
map
(
descriptor
=>
{
this
.
to
Unbind
.
push
(...
descriptors
.
map
(
descriptor
=>
{
const
item
=
this
.
instantiationService
.
createInstance
(
descriptor
.
syncDescriptor
);
const
item
=
this
.
instantiationService
.
createInstance
(
descriptor
.
syncDescriptor
);
const
el
=
this
.
doCreateStatusItem
(
descriptor
.
alignment
,
descriptor
.
priority
);
const
el
=
this
.
doCreateStatusItem
(
descriptor
.
alignment
,
descriptor
.
priority
);
...
@@ -200,12 +203,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
...
@@ -200,12 +203,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
return
dispose
;
return
dispose
;
}
}
public
dispose
():
void
{
this
.
toDispose
=
dispose
(
this
.
toDispose
);
super
.
dispose
();
}
}
}
let
manageExtensionAction
:
ManageExtensionAction
;
let
manageExtensionAction
:
ManageExtensionAction
;
...
...
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
浏览文件 @
e8f7ac78
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
import
'
vs/css!vs/workbench/parts/debug/browser/media/debugActionsWidget
'
;
import
'
vs/css!vs/workbench/parts/debug/browser/media/debugActionsWidget
'
;
import
*
as
lifecycle
from
'
vs/base/common/lifecycle
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
*
as
browser
from
'
vs/base/browser/browser
'
;
import
*
as
browser
from
'
vs/base/browser/browser
'
;
...
@@ -45,7 +44,6 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -45,7 +44,6 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
private
$el
:
builder
.
Builder
;
private
$el
:
builder
.
Builder
;
private
dragArea
:
builder
.
Builder
;
private
dragArea
:
builder
.
Builder
;
private
toDispose
:
lifecycle
.
IDisposable
[];
private
actionBar
:
ActionBar
;
private
actionBar
:
ActionBar
;
private
allActions
:
AbstractDebugAction
[];
private
allActions
:
AbstractDebugAction
[];
private
activeActions
:
AbstractDebugAction
[];
private
activeActions
:
AbstractDebugAction
[];
...
@@ -72,7 +70,6 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -72,7 +70,6 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
const
actionBarContainter
=
$
().
div
().
addClass
(
'
.action-bar-container
'
);
const
actionBarContainter
=
$
().
div
().
addClass
(
'
.action-bar-container
'
);
this
.
$el
.
append
(
actionBarContainter
);
this
.
$el
.
append
(
actionBarContainter
);
this
.
toDispose
=
[];
this
.
activeActions
=
[];
this
.
activeActions
=
[];
this
.
actionBar
=
new
ActionBar
(
actionBarContainter
,
{
this
.
actionBar
=
new
ActionBar
(
actionBarContainter
,
{
orientation
:
ActionsOrientation
.
HORIZONTAL
,
orientation
:
ActionsOrientation
.
HORIZONTAL
,
...
@@ -87,7 +84,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -87,7 +84,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
this
.
updateStyles
();
this
.
updateStyles
();
this
.
to
Dispose
.
push
(
this
.
actionBar
);
this
.
to
Unbind
.
push
(
this
.
actionBar
);
this
.
registerListeners
();
this
.
registerListeners
();
this
.
hide
();
this
.
hide
();
...
@@ -95,9 +92,9 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -95,9 +92,9 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
}
}
private
registerListeners
():
void
{
private
registerListeners
():
void
{
this
.
to
Dispose
.
push
(
this
.
debugService
.
onDidChangeState
(
state
=>
this
.
update
(
state
)));
this
.
to
Unbind
.
push
(
this
.
debugService
.
onDidChangeState
(
state
=>
this
.
update
(
state
)));
this
.
to
Dispose
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(()
=>
this
.
update
(
this
.
debugService
.
state
)));
this
.
to
Unbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(()
=>
this
.
update
(
this
.
debugService
.
state
)));
this
.
to
Dispose
.
push
(
this
.
actionBar
.
actionRunner
.
addListener
(
EventType
.
RUN
,
(
e
:
any
)
=>
{
this
.
to
Unbind
.
push
(
this
.
actionBar
.
actionRunner
.
addListener
(
EventType
.
RUN
,
(
e
:
any
)
=>
{
// check for error
// check for error
if
(
e
.
error
&&
!
errors
.
isPromiseCanceledError
(
e
.
error
))
{
if
(
e
.
error
&&
!
errors
.
isPromiseCanceledError
(
e
.
error
))
{
this
.
messageService
.
show
(
severity
.
Error
,
e
.
error
);
this
.
messageService
.
show
(
severity
.
Error
,
e
.
error
);
...
@@ -108,7 +105,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -108,7 +105,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
this
.
telemetryService
.
publicLog
(
'
workbenchActionExecuted
'
,
{
id
:
e
.
action
.
id
,
from
:
'
debugActionsWidget
'
});
this
.
telemetryService
.
publicLog
(
'
workbenchActionExecuted
'
,
{
id
:
e
.
action
.
id
,
from
:
'
debugActionsWidget
'
});
}
}
}));
}));
$
(
window
).
on
(
dom
.
EventType
.
RESIZE
,
()
=>
this
.
setXCoordinate
(),
this
.
to
Dispose
);
$
(
window
).
on
(
dom
.
EventType
.
RESIZE
,
()
=>
this
.
setXCoordinate
(),
this
.
to
Unbind
);
this
.
dragArea
.
on
(
dom
.
EventType
.
MOUSE_UP
,
(
event
:
MouseEvent
)
=>
{
this
.
dragArea
.
on
(
dom
.
EventType
.
MOUSE_UP
,
(
event
:
MouseEvent
)
=>
{
const
mouseClickEvent
=
new
StandardMouseEvent
(
event
);
const
mouseClickEvent
=
new
StandardMouseEvent
(
event
);
...
@@ -137,8 +134,8 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -137,8 +134,8 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
});
});
});
});
this
.
to
Dispose
.
push
(
this
.
partService
.
onTitleBarVisibilityChange
(()
=>
this
.
positionDebugWidget
()));
this
.
to
Unbind
.
push
(
this
.
partService
.
onTitleBarVisibilityChange
(()
=>
this
.
positionDebugWidget
()));
this
.
to
Dispose
.
push
(
browser
.
onDidChangeZoomLevel
(()
=>
this
.
positionDebugWidget
()));
this
.
to
Unbind
.
push
(
browser
.
onDidChangeZoomLevel
(()
=>
this
.
positionDebugWidget
()));
}
}
private
storePosition
():
void
{
private
storePosition
():
void
{
...
@@ -235,7 +232,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -235,7 +232,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
ReverseContinueAction
,
ReverseContinueAction
.
ID
,
ReverseContinueAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
ReverseContinueAction
,
ReverseContinueAction
.
ID
,
ReverseContinueAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
FocusProcessAction
,
FocusProcessAction
.
ID
,
FocusProcessAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
FocusProcessAction
,
FocusProcessAction
.
ID
,
FocusProcessAction
.
LABEL
));
this
.
allActions
.
forEach
(
a
=>
{
this
.
allActions
.
forEach
(
a
=>
{
this
.
to
Dispose
.
push
(
a
);
this
.
to
Unbind
.
push
(
a
);
});
});
}
}
...
@@ -271,7 +268,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
...
@@ -271,7 +268,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi
}
}
public
dispose
():
void
{
public
dispose
():
void
{
this
.
toDispose
=
lifecycle
.
dispose
(
this
.
toDispose
);
super
.
dispose
(
);
if
(
this
.
$el
)
{
if
(
this
.
$el
)
{
this
.
$el
.
destroy
();
this
.
$el
.
destroy
();
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
e8f7ac78
...
@@ -9,7 +9,6 @@ import uri from 'vs/base/common/uri';
...
@@ -9,7 +9,6 @@ import uri from 'vs/base/common/uri';
import
{
wireCancellationToken
}
from
'
vs/base/common/async
'
;
import
{
wireCancellationToken
}
from
'
vs/base/common/async
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
*
as
lifecycle
from
'
vs/base/common/lifecycle
'
;
import
{
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IAction
}
from
'
vs/base/common/actions
'
;
import
{
Dimension
,
Builder
}
from
'
vs/base/browser/builder
'
;
import
{
Dimension
,
Builder
}
from
'
vs/base/browser/builder
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
...
@@ -73,7 +72,6 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -73,7 +72,6 @@ export class Repl extends Panel implements IPrivateReplService {
private
static
REPL_INPUT_INITIAL_HEIGHT
=
19
;
private
static
REPL_INPUT_INITIAL_HEIGHT
=
19
;
private
static
REPL_INPUT_MAX_HEIGHT
=
170
;
private
static
REPL_INPUT_MAX_HEIGHT
=
170
;
private
toDispose
:
lifecycle
.
IDisposable
[];
private
tree
:
ITree
;
private
tree
:
ITree
;
private
renderer
:
ReplExpressionsRenderer
;
private
renderer
:
ReplExpressionsRenderer
;
private
characterWidthSurveyor
:
HTMLElement
;
private
characterWidthSurveyor
:
HTMLElement
;
...
@@ -99,15 +97,14 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -99,15 +97,14 @@ export class Repl extends Panel implements IPrivateReplService {
super
(
debug
.
REPL_ID
,
telemetryService
,
themeService
);
super
(
debug
.
REPL_ID
,
telemetryService
,
themeService
);
this
.
replInputHeight
=
Repl
.
REPL_INPUT_INITIAL_HEIGHT
;
this
.
replInputHeight
=
Repl
.
REPL_INPUT_INITIAL_HEIGHT
;
this
.
toDispose
=
[];
this
.
registerListeners
();
this
.
registerListeners
();
}
}
private
registerListeners
():
void
{
private
registerListeners
():
void
{
this
.
to
Dispose
.
push
(
this
.
debugService
.
getModel
().
onDidChangeReplElements
(()
=>
{
this
.
to
Unbind
.
push
(
this
.
debugService
.
getModel
().
onDidChangeReplElements
(()
=>
{
this
.
refreshReplElements
(
this
.
debugService
.
getModel
().
getReplElements
().
length
===
0
);
this
.
refreshReplElements
(
this
.
debugService
.
getModel
().
getReplElements
().
length
===
0
);
}));
}));
this
.
to
Dispose
.
push
(
this
.
panelService
.
onDidPanelOpen
(
panel
=>
this
.
refreshReplElements
(
true
)));
this
.
to
Unbind
.
push
(
this
.
panelService
.
onDidPanelOpen
(
panel
=>
this
.
refreshReplElements
(
true
)));
}
}
private
refreshReplElements
(
noDelay
:
boolean
):
void
{
private
refreshReplElements
(
noDelay
:
boolean
):
void
{
...
@@ -154,8 +151,8 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -154,8 +151,8 @@ export class Repl extends Panel implements IPrivateReplService {
controller
controller
},
replTreeOptions
);
},
replTreeOptions
);
this
.
to
Dispose
.
push
(
attachListStyler
(
this
.
tree
,
this
.
themeService
));
this
.
to
Unbind
.
push
(
attachListStyler
(
this
.
tree
,
this
.
themeService
));
this
.
to
Dispose
.
push
(
this
.
listService
.
register
(
this
.
tree
));
this
.
to
Unbind
.
push
(
this
.
listService
.
register
(
this
.
tree
));
if
(
!
Repl
.
HISTORY
)
{
if
(
!
Repl
.
HISTORY
)
{
Repl
.
HISTORY
=
new
ReplHistory
(
JSON
.
parse
(
this
.
storageService
.
get
(
HISTORY_STORAGE_KEY
,
StorageScope
.
WORKSPACE
,
'
[]
'
)));
Repl
.
HISTORY
=
new
ReplHistory
(
JSON
.
parse
(
this
.
storageService
.
get
(
HISTORY_STORAGE_KEY
,
StorageScope
.
WORKSPACE
,
'
[]
'
)));
...
@@ -168,7 +165,7 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -168,7 +165,7 @@ export class Repl extends Panel implements IPrivateReplService {
this
.
replInputContainer
=
dom
.
append
(
container
,
$
(
'
.repl-input-wrapper
'
));
this
.
replInputContainer
=
dom
.
append
(
container
,
$
(
'
.repl-input-wrapper
'
));
const
scopedContextKeyService
=
this
.
contextKeyService
.
createScoped
(
this
.
replInputContainer
);
const
scopedContextKeyService
=
this
.
contextKeyService
.
createScoped
(
this
.
replInputContainer
);
this
.
to
Dispose
.
push
(
scopedContextKeyService
);
this
.
to
Unbind
.
push
(
scopedContextKeyService
);
debug
.
CONTEXT_IN_DEBUG_REPL
.
bindTo
(
scopedContextKeyService
).
set
(
true
);
debug
.
CONTEXT_IN_DEBUG_REPL
.
bindTo
(
scopedContextKeyService
).
set
(
true
);
const
onFirstReplLine
=
debug
.
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
.
bindTo
(
scopedContextKeyService
);
const
onFirstReplLine
=
debug
.
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
.
bindTo
(
scopedContextKeyService
);
onFirstReplLine
.
set
(
true
);
onFirstReplLine
.
set
(
true
);
...
@@ -197,20 +194,20 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -197,20 +194,20 @@ export class Repl extends Panel implements IPrivateReplService {
}
}
});
});
this
.
to
Dispose
.
push
(
this
.
replInput
.
onDidScrollChange
(
e
=>
{
this
.
to
Unbind
.
push
(
this
.
replInput
.
onDidScrollChange
(
e
=>
{
if
(
!
e
.
scrollHeightChanged
)
{
if
(
!
e
.
scrollHeightChanged
)
{
return
;
return
;
}
}
this
.
replInputHeight
=
Math
.
max
(
Repl
.
REPL_INPUT_INITIAL_HEIGHT
,
Math
.
min
(
Repl
.
REPL_INPUT_MAX_HEIGHT
,
e
.
scrollHeight
,
this
.
dimension
.
height
));
this
.
replInputHeight
=
Math
.
max
(
Repl
.
REPL_INPUT_INITIAL_HEIGHT
,
Math
.
min
(
Repl
.
REPL_INPUT_MAX_HEIGHT
,
e
.
scrollHeight
,
this
.
dimension
.
height
));
this
.
layout
(
this
.
dimension
);
this
.
layout
(
this
.
dimension
);
}));
}));
this
.
to
Dispose
.
push
(
this
.
replInput
.
onDidChangeCursorPosition
(
e
=>
{
this
.
to
Unbind
.
push
(
this
.
replInput
.
onDidChangeCursorPosition
(
e
=>
{
onFirstReplLine
.
set
(
e
.
position
.
lineNumber
===
1
);
onFirstReplLine
.
set
(
e
.
position
.
lineNumber
===
1
);
onLastReplLine
.
set
(
e
.
position
.
lineNumber
===
this
.
replInput
.
getModel
().
getLineCount
());
onLastReplLine
.
set
(
e
.
position
.
lineNumber
===
this
.
replInput
.
getModel
().
getLineCount
());
}));
}));
this
.
to
Dispose
.
push
(
dom
.
addStandardDisposableListener
(
this
.
replInputContainer
,
dom
.
EventType
.
FOCUS
,
()
=>
dom
.
addClass
(
this
.
replInputContainer
,
'
synthetic-focus
'
)));
this
.
to
Unbind
.
push
(
dom
.
addStandardDisposableListener
(
this
.
replInputContainer
,
dom
.
EventType
.
FOCUS
,
()
=>
dom
.
addClass
(
this
.
replInputContainer
,
'
synthetic-focus
'
)));
this
.
to
Dispose
.
push
(
dom
.
addStandardDisposableListener
(
this
.
replInputContainer
,
dom
.
EventType
.
BLUR
,
()
=>
dom
.
removeClass
(
this
.
replInputContainer
,
'
synthetic-focus
'
)));
this
.
to
Unbind
.
push
(
dom
.
addStandardDisposableListener
(
this
.
replInputContainer
,
dom
.
EventType
.
BLUR
,
()
=>
dom
.
removeClass
(
this
.
replInputContainer
,
'
synthetic-focus
'
)));
}
}
public
navigateHistory
(
previous
:
boolean
):
void
{
public
navigateHistory
(
previous
:
boolean
):
void
{
...
@@ -270,7 +267,7 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -270,7 +267,7 @@ export class Repl extends Panel implements IPrivateReplService {
];
];
this
.
actions
.
forEach
(
a
=>
{
this
.
actions
.
forEach
(
a
=>
{
this
.
to
Dispose
.
push
(
a
);
this
.
to
Unbind
.
push
(
a
);
});
});
}
}
...
@@ -311,7 +308,6 @@ export class Repl extends Panel implements IPrivateReplService {
...
@@ -311,7 +308,6 @@ export class Repl extends Panel implements IPrivateReplService {
public
dispose
():
void
{
public
dispose
():
void
{
this
.
replInput
.
dispose
();
this
.
replInput
.
dispose
();
this
.
toDispose
=
lifecycle
.
dispose
(
this
.
toDispose
);
super
.
dispose
();
super
.
dispose
();
}
}
}
}
...
...
src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts
浏览文件 @
e8f7ac78
...
@@ -48,11 +48,8 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri
...
@@ -48,11 +48,8 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri
}
}
private
registerListeners
():
void
{
private
registerListeners
():
void
{
this
.
toUnbind
.
push
(
this
.
debugService
.
onDidChangeState
(
state
=>
this
.
onDidChangeState
(
state
)));
this
.
toUnbind
.
push
(
this
.
debugService
.
onDidChangeState
(
state
=>
this
.
updateStyles
()));
}
this
.
toUnbind
.
push
(
this
.
contextService
.
onDidChangeWorkspaceRoots
(
state
=>
this
.
updateStyles
()));
private
onDidChangeState
(
state
:
State
):
void
{
this
.
updateStyles
();
}
}
protected
updateStyles
():
void
{
protected
updateStyles
():
void
{
...
...
src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts
浏览文件 @
e8f7ac78
...
@@ -58,6 +58,12 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem {
...
@@ -58,6 +58,12 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem {
@
IThemeService
themeService
:
IThemeService
@
IThemeService
themeService
:
IThemeService
)
{
)
{
super
(
themeService
);
super
(
themeService
);
this
.
registerListeners
();
}
private
registerListeners
():
void
{
this
.
toUnbind
.
push
(
this
.
contextService
.
onDidChangeWorkspaceRoots
(()
=>
this
.
updateStyles
()));
}
}
protected
updateStyles
():
void
{
protected
updateStyles
():
void
{
...
...
src/vs/workbench/parts/markers/browser/markersPanel.ts
浏览文件 @
e8f7ac78
...
@@ -10,7 +10,6 @@ import URI from 'vs/base/common/uri';
...
@@ -10,7 +10,6 @@ import URI from 'vs/base/common/uri';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Delayer
}
from
'
vs/base/common/async
'
;
import
{
Delayer
}
from
'
vs/base/common/async
'
;
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
lifecycle
=
require
(
'
vs/base/common/lifecycle
'
);
import
builder
=
require
(
'
vs/base/browser/builder
'
);
import
builder
=
require
(
'
vs/base/browser/builder
'
);
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
...
@@ -44,7 +43,6 @@ export class MarkersPanel extends Panel {
...
@@ -44,7 +43,6 @@ export class MarkersPanel extends Panel {
public
markersModel
:
MarkersModel
;
public
markersModel
:
MarkersModel
;
private
toDispose
:
lifecycle
.
IDisposable
[];
private
delayedRefresh
:
Delayer
<
void
>
;
private
delayedRefresh
:
Delayer
<
void
>
;
private
lastSelectedRelativeTop
:
number
=
0
;
private
lastSelectedRelativeTop
:
number
=
0
;
...
@@ -78,7 +76,6 @@ export class MarkersPanel extends Panel {
...
@@ -78,7 +76,6 @@ export class MarkersPanel extends Panel {
@
IThemeService
themeService
:
IThemeService
@
IThemeService
themeService
:
IThemeService
)
{
)
{
super
(
Constants
.
MARKERS_PANEL_ID
,
telemetryService
,
themeService
);
super
(
Constants
.
MARKERS_PANEL_ID
,
telemetryService
,
themeService
);
this
.
toDispose
=
[];
this
.
delayedRefresh
=
new
Delayer
<
void
>
(
500
);
this
.
delayedRefresh
=
new
Delayer
<
void
>
(
500
);
this
.
autoExpanded
=
new
Set
<
string
>
();
this
.
autoExpanded
=
new
Set
<
string
>
();
this
.
markerFocusContextKey
=
Constants
.
MarkerFocusContextKey
.
bindTo
(
contextKeyService
);
this
.
markerFocusContextKey
=
Constants
.
MarkerFocusContextKey
.
bindTo
(
contextKeyService
);
...
@@ -89,7 +86,7 @@ export class MarkersPanel extends Panel {
...
@@ -89,7 +86,7 @@ export class MarkersPanel extends Panel {
this
.
markersModel
=
new
MarkersModel
();
this
.
markersModel
=
new
MarkersModel
();
this
.
rangeHighlightDecorations
=
this
.
instantiationService
.
createInstance
(
RangeHighlightDecorations
);
this
.
rangeHighlightDecorations
=
this
.
instantiationService
.
createInstance
(
RangeHighlightDecorations
);
this
.
to
Dispose
.
push
(
this
.
rangeHighlightDecorations
);
this
.
to
Unbind
.
push
(
this
.
rangeHighlightDecorations
);
dom
.
addClass
(
parent
.
getHTMLElement
(),
'
markers-panel
'
);
dom
.
addClass
(
parent
.
getHTMLElement
(),
'
markers-panel
'
);
...
@@ -233,7 +230,7 @@ export class MarkersPanel extends Panel {
...
@@ -233,7 +230,7 @@ export class MarkersPanel extends Panel {
this
.
markerFocusContextKey
.
set
(
false
);
this
.
markerFocusContextKey
.
set
(
false
);
});
});
this
.
to
Dispose
.
push
(
this
.
listService
.
register
(
this
.
tree
));
this
.
to
Unbind
.
push
(
this
.
listService
.
register
(
this
.
tree
));
}
}
private
createActions
():
void
{
private
createActions
():
void
{
...
@@ -244,15 +241,15 @@ export class MarkersPanel extends Panel {
...
@@ -244,15 +241,15 @@ export class MarkersPanel extends Panel {
this
.
collapseAllAction
this
.
collapseAllAction
];
];
this
.
actions
.
forEach
(
a
=>
{
this
.
actions
.
forEach
(
a
=>
{
this
.
to
Dispose
.
push
(
a
);
this
.
to
Unbind
.
push
(
a
);
});
});
}
}
private
createListeners
():
void
{
private
createListeners
():
void
{
this
.
to
Dispose
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
onConfigurationsUpdated
(
this
.
configurationService
.
getConfiguration
<
IProblemsConfiguration
>
())));
this
.
to
Unbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
onConfigurationsUpdated
(
this
.
configurationService
.
getConfiguration
<
IProblemsConfiguration
>
())));
this
.
to
Dispose
.
push
(
this
.
markerService
.
onMarkerChanged
(
this
.
onMarkerChanged
,
this
));
this
.
to
Unbind
.
push
(
this
.
markerService
.
onMarkerChanged
(
this
.
onMarkerChanged
,
this
));
this
.
to
Dispose
.
push
(
this
.
editorGroupService
.
onEditorsChanged
(
this
.
onEditorsChanged
,
this
));
this
.
to
Unbind
.
push
(
this
.
editorGroupService
.
onEditorsChanged
(
this
.
onEditorsChanged
,
this
));
this
.
to
Dispose
.
push
(
this
.
tree
.
addListener
(
'
selection
'
,
()
=>
this
.
onSelected
()));
this
.
to
Unbind
.
push
(
this
.
tree
.
addListener
(
'
selection
'
,
()
=>
this
.
onSelected
()));
}
}
private
onMarkerChanged
(
changedResources
:
URI
[])
{
private
onMarkerChanged
(
changedResources
:
URI
[])
{
...
@@ -409,10 +406,10 @@ export class MarkersPanel extends Panel {
...
@@ -409,10 +406,10 @@ export class MarkersPanel extends Panel {
}
}
public
dispose
():
void
{
public
dispose
():
void
{
super
.
dispose
();
this
.
delayedRefresh
.
cancel
();
this
.
delayedRefresh
.
cancel
();
this
.
toDispose
=
lifecycle
.
dispose
(
this
.
toDispose
);
this
.
tree
.
dispose
();
this
.
tree
.
dispose
();
this
.
markersModel
.
dispose
();
this
.
markersModel
.
dispose
();
super
.
dispose
();
}
}
}
}
\ No newline at end of file
src/vs/workbench/parts/output/browser/outputPanel.ts
浏览文件 @
e8f7ac78
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
import
'
vs/css!./media/output
'
;
import
'
vs/css!./media/output
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
nls
=
require
(
'
vs/nls
'
);
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Action
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
Action
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
Builder
}
from
'
vs/base/browser/builder
'
;
import
{
Builder
}
from
'
vs/base/browser/builder
'
;
...
@@ -27,7 +26,6 @@ import { IModeService } from 'vs/editor/common/services/modeService';
...
@@ -27,7 +26,6 @@ import { IModeService } from 'vs/editor/common/services/modeService';
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
export
class
OutputPanel
extends
TextResourceEditor
{
export
class
OutputPanel
extends
TextResourceEditor
{
private
toDispose
:
IDisposable
[];
private
actions
:
IAction
[];
private
actions
:
IAction
[];
private
scopedInstantiationService
:
IInstantiationService
;
private
scopedInstantiationService
:
IInstantiationService
;
...
@@ -46,7 +44,6 @@ export class OutputPanel extends TextResourceEditor {
...
@@ -46,7 +44,6 @@ export class OutputPanel extends TextResourceEditor {
super
(
telemetryService
,
instantiationService
,
storageService
,
configurationService
,
themeService
,
editorGroupService
,
modeService
,
textFileService
);
super
(
telemetryService
,
instantiationService
,
storageService
,
configurationService
,
themeService
,
editorGroupService
,
modeService
,
textFileService
);
this
.
scopedInstantiationService
=
instantiationService
;
this
.
scopedInstantiationService
=
instantiationService
;
this
.
toDispose
=
[];
}
}
public
getId
():
string
{
public
getId
():
string
{
...
@@ -62,7 +59,7 @@ export class OutputPanel extends TextResourceEditor {
...
@@ -62,7 +59,7 @@ export class OutputPanel extends TextResourceEditor {
];
];
this
.
actions
.
forEach
(
a
=>
{
this
.
actions
.
forEach
(
a
=>
{
this
.
to
Dispose
.
push
(
a
);
this
.
to
Unbind
.
push
(
a
);
});
});
}
}
...
@@ -111,7 +108,7 @@ export class OutputPanel extends TextResourceEditor {
...
@@ -111,7 +108,7 @@ export class OutputPanel extends TextResourceEditor {
// First create the scoped instantation service and only then construct the editor using the scoped service
// First create the scoped instantation service and only then construct the editor using the scoped service
const
scopedContextKeyService
=
this
.
contextKeyService
.
createScoped
(
parent
.
getHTMLElement
());
const
scopedContextKeyService
=
this
.
contextKeyService
.
createScoped
(
parent
.
getHTMLElement
());
this
.
to
Dispose
.
push
(
scopedContextKeyService
);
this
.
to
Unbind
.
push
(
scopedContextKeyService
);
this
.
scopedInstantiationService
=
this
.
instantiationService
.
createChild
(
new
ServiceCollection
([
IContextKeyService
,
scopedContextKeyService
]));
this
.
scopedInstantiationService
=
this
.
instantiationService
.
createChild
(
new
ServiceCollection
([
IContextKeyService
,
scopedContextKeyService
]));
super
.
createEditor
(
parent
);
super
.
createEditor
(
parent
);
...
@@ -122,10 +119,4 @@ export class OutputPanel extends TextResourceEditor {
...
@@ -122,10 +119,4 @@ export class OutputPanel extends TextResourceEditor {
public
get
instantiationService
():
IInstantiationService
{
public
get
instantiationService
():
IInstantiationService
{
return
this
.
scopedInstantiationService
;
return
this
.
scopedInstantiationService
;
}
}
public
dispose
():
void
{
this
.
toDispose
=
dispose
(
this
.
toDispose
);
super
.
dispose
();
}
}
}
src/vs/workbench/parts/search/browser/searchViewlet.ts
浏览文件 @
e8f7ac78
...
@@ -69,7 +69,6 @@ export class SearchViewlet extends Viewlet {
...
@@ -69,7 +69,6 @@ export class SearchViewlet extends Viewlet {
private
static
SHOW_REPLACE_STORAGE_KEY
=
'
vs.search.show.replace
'
;
private
static
SHOW_REPLACE_STORAGE_KEY
=
'
vs.search.show.replace
'
;
private
isDisposed
:
boolean
;
private
isDisposed
:
boolean
;
private
toDispose
:
lifecycle
.
IDisposable
[];
private
loading
:
boolean
;
private
loading
:
boolean
;
private
queryBuilder
:
QueryBuilder
;
private
queryBuilder
:
QueryBuilder
;
...
@@ -126,7 +125,6 @@ export class SearchViewlet extends Viewlet {
...
@@ -126,7 +125,6 @@ export class SearchViewlet extends Viewlet {
)
{
)
{
super
(
Constants
.
VIEWLET_ID
,
telemetryService
,
themeService
);
super
(
Constants
.
VIEWLET_ID
,
telemetryService
,
themeService
);
this
.
toDispose
=
[];
this
.
viewletVisible
=
Constants
.
SearchViewletVisibleKey
.
bindTo
(
contextKeyService
);
this
.
viewletVisible
=
Constants
.
SearchViewletVisibleKey
.
bindTo
(
contextKeyService
);
this
.
inputBoxFocused
=
Constants
.
InputBoxFocusedKey
.
bindTo
(
this
.
contextKeyService
);
this
.
inputBoxFocused
=
Constants
.
InputBoxFocusedKey
.
bindTo
(
this
.
contextKeyService
);
this
.
inputPatternIncludesFocused
=
Constants
.
PatternIncludesFocusedKey
.
bindTo
(
this
.
contextKeyService
);
this
.
inputPatternIncludesFocused
=
Constants
.
PatternIncludesFocusedKey
.
bindTo
(
this
.
contextKeyService
);
...
@@ -483,7 +481,7 @@ export class SearchViewlet extends Viewlet {
...
@@ -483,7 +481,7 @@ export class SearchViewlet extends Viewlet {
keyboardSupport
:
false
keyboardSupport
:
false
});
});
this
.
to
Dispose
.
push
(
attachListStyler
(
this
.
tree
,
this
.
themeService
));
this
.
to
Unbind
.
push
(
attachListStyler
(
this
.
tree
,
this
.
themeService
));
this
.
tree
.
setInput
(
this
.
viewModel
.
searchResult
);
this
.
tree
.
setInput
(
this
.
viewModel
.
searchResult
);
this
.
toUnbind
.
push
(
renderer
);
this
.
toUnbind
.
push
(
renderer
);
...
@@ -1427,8 +1425,6 @@ export class SearchViewlet extends Viewlet {
...
@@ -1427,8 +1425,6 @@ export class SearchViewlet extends Viewlet {
public
dispose
():
void
{
public
dispose
():
void
{
this
.
isDisposed
=
true
;
this
.
isDisposed
=
true
;
this
.
toDispose
=
lifecycle
.
dispose
(
this
.
toDispose
);
if
(
this
.
tree
)
{
if
(
this
.
tree
)
{
this
.
tree
.
dispose
();
this
.
tree
.
dispose
();
}
}
...
...
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
e8f7ac78
...
@@ -283,6 +283,12 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
...
@@ -283,6 +283,12 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
this
.
activeCount
=
0
;
this
.
activeCount
=
0
;
this
.
icons
=
[];
this
.
icons
=
[];
this
.
registerListeners
();
}
private
registerListeners
():
void
{
this
.
toUnbind
.
push
(
this
.
contextService
.
onDidChangeWorkspaceRoots
(()
=>
this
.
updateStyles
()));
}
}
protected
updateStyles
():
void
{
protected
updateStyles
():
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录