Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
b68c8e33
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,发现更多精彩内容 >>
提交
b68c8e33
编写于
3月 30, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
automatically marshal scm resources
上级
ccfcbe6c
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
153 addition
and
60 deletion
+153
-60
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+3
-16
src/vs/base/common/marshalling.ts
src/vs/base/common/marshalling.ts
+14
-6
src/vs/platform/actions/browser/menuItemActionItem.ts
src/vs/platform/actions/browser/menuItemActionItem.ts
+3
-3
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-0
src/vs/workbench/api/node/extHostSCM.ts
src/vs/workbench/api/node/extHostSCM.ts
+44
-11
src/vs/workbench/api/node/mainThreadSCM.ts
src/vs/workbench/api/node/mainThreadSCM.ts
+35
-5
src/vs/workbench/parts/scm/electron-browser/scmMenus.ts
src/vs/workbench/parts/scm/electron-browser/scmMenus.ts
+1
-1
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
+51
-18
src/vs/workbench/services/scm/common/scm.ts
src/vs/workbench/services/scm/common/scm.ts
+1
-0
未找到文件。
extensions/git/src/commands.ts
浏览文件 @
b68c8e33
...
...
@@ -11,7 +11,6 @@ import { Model, Resource, Status, CommitOptions } from './model';
import
*
as
staging
from
'
./staging
'
;
import
*
as
path
from
'
path
'
;
import
*
as
os
from
'
os
'
;
import
{
uniqueFilter
}
from
'
./util
'
;
import
TelemetryReporter
from
'
vscode-extension-telemetry
'
;
import
*
as
nls
from
'
vscode-nls
'
;
...
...
@@ -271,9 +270,7 @@ export class CommandCenter {
}
@
command
(
'
git.stage
'
)
async
stage
(...
uris
:
Uri
[]):
Promise
<
void
>
{
const
resources
=
this
.
toSCMResources
(
uris
);
async
stage
(...
resources
:
Resource
[]):
Promise
<
void
>
{
if
(
!
resources
.
length
)
{
return
;
}
...
...
@@ -366,9 +363,7 @@ export class CommandCenter {
}
@
command
(
'
git.unstage
'
)
async
unstage
(...
uris
:
Uri
[]):
Promise
<
void
>
{
const
resources
=
this
.
toSCMResources
(
uris
);
async
unstage
(...
resources
:
Resource
[]):
Promise
<
void
>
{
if
(
!
resources
.
length
)
{
return
;
}
...
...
@@ -423,9 +418,7 @@ export class CommandCenter {
}
@
command
(
'
git.clean
'
)
async
clean
(...
uris
:
Uri
[]):
Promise
<
void
>
{
const
resources
=
this
.
toSCMResources
(
uris
);
async
clean
(...
resources
:
Resource
[]):
Promise
<
void
>
{
if
(
!
resources
.
length
)
{
return
;
}
...
...
@@ -786,12 +779,6 @@ export class CommandCenter {
}
}
private
toSCMResources
(
uris
:
Uri
[]):
Resource
[]
{
return
uris
.
filter
(
uniqueFilter
(
uri
=>
uri
.
toString
()))
.
map
(
uri
=>
this
.
resolveSCMResource
(
uri
))
.
filter
(
r
=>
!!
r
)
as
Resource
[];
}
dispose
():
void
{
this
.
disposables
.
forEach
(
d
=>
d
.
dispose
());
}
...
...
src/vs/base/common/marshalling.ts
浏览文件 @
b68c8e33
...
...
@@ -30,17 +30,25 @@ function replacer(key: string, value: any): any {
return
value
;
}
// TODO@Joao hack?
export
const
ResolverRegistry
:
{
[
mid
:
number
]:
(
value
:
any
)
=>
any
;
}
=
Object
.
create
(
null
);
function
reviver
(
key
:
string
,
value
:
any
):
any
{
let
marshallingConst
:
number
;
if
(
value
!==
void
0
&&
value
!==
null
)
{
marshallingConst
=
(
<
MarshalledObject
>
value
).
$mid
;
}
if
(
marshallingConst
===
1
)
{
return
URI
.
revive
(
value
);
}
else
if
(
marshallingConst
===
2
)
{
return
new
RegExp
(
value
.
source
,
value
.
flags
);
switch
(
marshallingConst
)
{
case
1
:
return
URI
.
revive
(
value
);
case
2
:
return
new
RegExp
(
value
.
source
,
value
.
flags
);
default
:
const
resolver
=
ResolverRegistry
[
marshallingConst
];
if
(
resolver
)
{
return
resolver
(
value
);
}
else
{
return
value
;
}
}
}
src/vs/platform/actions/browser/menuItemActionItem.ts
浏览文件 @
b68c8e33
...
...
@@ -92,19 +92,19 @@ const _altKey = new class extends Emitter<boolean> {
}
};
class
MenuItemActionItem
extends
ActionItem
{
export
class
MenuItemActionItem
extends
ActionItem
{
private
_wantsAltCommand
:
boolean
=
false
;
constructor
(
action
:
MenuItemAction
,
@
IKeybindingService
private
_keybindingService
:
IKeybindingService
,
@
IMessageService
pr
ivate
_messageService
:
IMessageService
@
IMessageService
pr
otected
_messageService
:
IMessageService
)
{
super
(
undefined
,
action
,
{
icon
:
!!
action
.
class
,
label
:
!
action
.
class
});
}
pr
ivate
get
_commandAction
():
IAction
{
pr
otected
get
_commandAction
():
IAction
{
return
this
.
_wantsAltCommand
&&
(
<
MenuItemAction
>
this
.
_action
).
alt
||
this
.
_action
;
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
b68c8e33
...
...
@@ -260,6 +260,7 @@ export interface SCMGroupFeatures {
}
export
type
SCMRawResource
=
[
number
/*handle*/
,
string
/*resourceUri*/
,
modes
.
Command
/*command*/
,
string
[]
/*icons: light, dark*/
,
...
...
src/vs/workbench/api/node/extHostSCM.ts
浏览文件 @
b68c8e33
...
...
@@ -12,6 +12,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic
import
{
ExtHostCommands
,
CommandsConverter
}
from
'
vs/workbench/api/node/extHostCommands
'
;
import
{
MainContext
,
MainThreadSCMShape
,
SCMRawResource
}
from
'
./extHost.protocol
'
;
import
*
as
vscode
from
'
vscode
'
;
import
*
as
marshalling
from
'
vs/base/common/marshalling
'
;
function
getIconPath
(
decorations
:
vscode
.
SourceControlResourceThemableDecorations
)
{
if
(
!
decorations
)
{
...
...
@@ -70,6 +71,8 @@ export class ExtHostSCMInputBox {
class
ExtHostSourceControlResourceGroup
implements
vscode
.
SourceControlResourceGroup
{
private
static
_handlePool
:
number
=
0
;
private
_resourceHandlePool
:
number
=
0
;
private
_resourceStates
:
Map
<
ResourceStateHandle
,
vscode
.
SourceControlResourceState
>
=
new
Map
<
ResourceStateHandle
,
vscode
.
SourceControlResourceState
>
();
get
id
():
string
{
return
this
.
_id
;
...
...
@@ -90,16 +93,13 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
this
.
_proxy
.
$updateGroup
(
this
.
_sourceControlHandle
,
this
.
_handle
,
{
hideWhenEmpty
});
}
private
_resourcesStates
:
vscode
.
SourceControlResourceState
[]
=
[];
get
resourceStates
():
vscode
.
SourceControlResourceState
[]
{
return
this
.
_resourcesStates
;
}
set
resourceStates
(
resources
:
vscode
.
SourceControlResourceState
[])
{
this
.
_resource
sStates
=
resources
;
this
.
_resource
States
.
clear
()
;
const
rawResources
=
resources
.
map
(
r
=>
{
const
handle
=
this
.
_resourceHandlePool
++
;
this
.
_resourceStates
.
set
(
handle
,
r
);
const
sourceUri
=
r
.
resourceUri
.
toString
();
const
command
=
this
.
_commands
.
toInternal
(
r
.
command
);
const
iconPath
=
getIconPath
(
r
.
decorations
);
...
...
@@ -117,13 +117,16 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
const
strikeThrough
=
r
.
decorations
&&
!!
r
.
decorations
.
strikeThrough
;
return
[
sourceUri
,
command
,
icons
,
strikeThrough
]
as
SCMRawResource
;
return
[
handle
,
sourceUri
,
command
,
icons
,
strikeThrough
]
as
SCMRawResource
;
});
this
.
_proxy
.
$updateGroupResourceStates
(
this
.
_sourceControlHandle
,
this
.
_handle
,
rawResources
);
}
private
_handle
:
number
=
ExtHostSourceControlResourceGroup
.
_handlePool
++
;
private
_handle
:
GroupHandle
=
ExtHostSourceControlResourceGroup
.
_handlePool
++
;
get
handle
():
GroupHandle
{
return
this
.
_handle
;
}
constructor
(
private
_proxy
:
MainThreadSCMShape
,
...
...
@@ -135,6 +138,10 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
this
.
_proxy
.
$registerGroup
(
_sourceControlHandle
,
this
.
_handle
,
_id
,
_label
);
}
getResourceState
(
handle
:
number
):
vscode
.
SourceControlResourceState
|
undefined
{
return
this
.
_resourceStates
.
get
(
handle
);
}
dispose
():
void
{
this
.
_proxy
.
$unregisterGroup
(
this
.
_sourceControlHandle
,
this
.
_handle
);
}
...
...
@@ -143,6 +150,7 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
class
ExtHostSourceControl
implements
vscode
.
SourceControl
{
private
static
_handlePool
:
number
=
0
;
private
_groups
:
Map
<
GroupHandle
,
ExtHostSourceControlResourceGroup
>
=
new
Map
<
GroupHandle
,
ExtHostSourceControlResourceGroup
>
();
get
id
():
string
{
return
this
.
_id
;
...
...
@@ -186,7 +194,19 @@ class ExtHostSourceControl implements vscode.SourceControl {
}
createResourceGroup
(
id
:
string
,
label
:
string
):
ExtHostSourceControlResourceGroup
{
return
new
ExtHostSourceControlResourceGroup
(
this
.
_proxy
,
this
.
_commands
,
this
.
_handle
,
id
,
label
);
const
group
=
new
ExtHostSourceControlResourceGroup
(
this
.
_proxy
,
this
.
_commands
,
this
.
_handle
,
id
,
label
);
this
.
_groups
.
set
(
group
.
handle
,
group
);
return
group
;
}
getResourceState
(
groupHandle
:
GroupHandle
,
handle
:
number
):
vscode
.
SourceControlResourceState
|
undefined
{
const
group
=
this
.
_groups
.
get
(
groupHandle
);
if
(
!
group
)
{
return
undefined
;
}
return
group
.
getResourceState
(
handle
);
}
dispose
():
void
{
...
...
@@ -195,13 +215,15 @@ class ExtHostSourceControl implements vscode.SourceControl {
}
type
ProviderHandle
=
number
;
type
GroupHandle
=
number
;
type
ResourceStateHandle
=
number
;
export
class
ExtHostSCM
{
private
static
_handlePool
:
number
=
0
;
private
_proxy
:
MainThreadSCMShape
;
private
_sourceControls
:
Map
<
ProviderHandle
,
vscode
.
SourceControl
>
=
new
Map
<
ProviderHandle
,
vscode
.
SourceControl
>
();
private
_sourceControls
:
Map
<
ProviderHandle
,
ExtHostSourceControl
>
=
new
Map
<
ProviderHandle
,
ExtHost
SourceControl
>
();
private
_onDidChangeActiveProvider
=
new
Emitter
<
vscode
.
SourceControl
>
();
get
onDidChangeActiveProvider
():
Event
<
vscode
.
SourceControl
>
{
return
this
.
_onDidChangeActiveProvider
.
event
;
}
...
...
@@ -218,6 +240,17 @@ export class ExtHostSCM {
)
{
this
.
_proxy
=
threadService
.
get
(
MainContext
.
MainThreadSCM
);
this
.
_inputBox
=
new
ExtHostSCMInputBox
(
this
.
_proxy
);
// TODO@joao HACK
marshalling
.
ResolverRegistry
[
3
]
=
value
=>
{
const
sourceControl
=
this
.
_sourceControls
.
get
(
value
.
sourceControlHandle
);
if
(
!
sourceControl
)
{
return
value
;
}
return
sourceControl
.
getResourceState
(
value
.
groupHandle
,
value
.
handle
);
};
}
createSourceControl
(
id
:
string
,
label
:
string
):
vscode
.
SourceControl
{
...
...
src/vs/workbench/api/node/mainThreadSCM.ts
浏览文件 @
b68c8e33
...
...
@@ -14,8 +14,11 @@ import { ISCMService, ISCMProvider, ISCMResource, ISCMResourceGroup } from 'vs/w
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ExtHostContext
,
MainThreadSCMShape
,
ExtHostSCMShape
,
SCMProviderFeatures
,
SCMRawResource
,
SCMGroupFeatures
}
from
'
./extHost.protocol
'
;
import
{
Command
}
from
'
vs/editor/common/modes
'
;
interface
IMainThreadSCMResourceGroup
{
handle
:
number
;
provider
:
ISCMProvider
;
uri
:
URI
;
features
:
SCMGroupFeatures
;
label
:
string
;
...
...
@@ -23,6 +26,28 @@ interface IMainThreadSCMResourceGroup {
resources
:
ISCMResource
[];
}
class
MainThreadSCMResource
implements
ISCMResource
{
constructor
(
private
sourceControlHandle
:
number
,
private
groupHandle
:
number
,
private
handle
:
number
,
public
sourceUri
:
URI
,
public
command
:
Command
,
public
resourceGroup
:
ISCMResourceGroup
,
public
decorations
)
{
}
toJSON
():
any
{
return
{
$mid
:
3
,
sourceControlHandle
:
this
.
sourceControlHandle
,
groupHandle
:
this
.
groupHandle
,
handle
:
this
.
handle
};
}
}
class
MainThreadSCMProvider
implements
ISCMProvider
{
private
_groups
:
IMainThreadSCMResourceGroup
[]
=
[];
...
...
@@ -61,6 +86,8 @@ class MainThreadSCMProvider implements ISCMProvider {
$registerGroup
(
handle
:
number
,
id
:
string
,
label
:
string
):
void
{
const
group
:
IMainThreadSCMResourceGroup
=
{
handle
,
provider
:
this
,
contextKey
:
id
,
label
,
uri
:
null
,
...
...
@@ -91,7 +118,7 @@ class MainThreadSCMProvider implements ISCMProvider {
}
group
.
resources
=
resources
.
map
(
rawResource
=>
{
const
[
sourceUri
,
command
,
icons
,
strikeThrough
]
=
rawResource
;
const
[
handle
,
sourceUri
,
command
,
icons
,
strikeThrough
]
=
rawResource
;
const
icon
=
icons
[
0
];
const
iconDark
=
icons
[
1
]
||
icon
;
const
decorations
=
{
...
...
@@ -100,12 +127,15 @@ class MainThreadSCMProvider implements ISCMProvider {
strikeThrough
};
return
{
sourceUri
:
URI
.
parse
(
sourceUri
),
return
new
MainThreadSCMResource
(
this
.
handle
,
group
.
handle
,
handle
,
URI
.
parse
(
sourceUri
),
command
,
resourceGroup
:
group
,
group
,
decorations
}
;
)
;
});
this
.
_onDidChange
.
fire
();
...
...
src/vs/workbench/parts/scm/electron-browser/scmMenus.ts
浏览文件 @
b68c8e33
...
...
@@ -142,7 +142,7 @@ export class SCMMenus implements IDisposable {
const
primary
=
[];
const
secondary
=
[];
const
result
=
{
primary
,
secondary
};
fillInActions
(
menu
,
resource
.
uri
,
result
,
g
=>
g
===
'
inline
'
);
fillInActions
(
menu
,
null
,
result
,
g
=>
g
===
'
inline
'
);
menu
.
dispose
();
contextKeyService
.
dispose
();
...
...
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
浏览文件 @
b68c8e33
...
...
@@ -34,16 +34,44 @@ import { IMessageService } from 'vs/platform/message/common/message';
import
{
IListService
}
from
'
vs/platform/list/browser/listService
'
;
import
{
IMenuService
,
MenuItemAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IAction
,
IActionItem
,
ActionRunner
}
from
'
vs/base/common/actions
'
;
import
{
create
ActionItem
}
from
'
vs/platform/actions/browser/menuItemActionItem
'
;
import
{
MenuItem
ActionItem
}
from
'
vs/platform/actions/browser/menuItemActionItem
'
;
import
{
SCMMenus
}
from
'
./scmMenus
'
;
import
{
ActionBar
,
IActionItemProvider
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IThemeService
,
LIGHT
}
from
"
vs/platform/theme/common/themeService
"
;
import
{
InputBox
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
comparePaths
}
from
'
vs/base/common/comparers
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
isSCMResource
}
from
'
./scmUtil
'
;
import
{
attachInputBoxStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
Severity
from
'
vs/base/common/severity
'
;
// TODO@Joao
// Need to subclass MenuItemActionItem in order to respect
// the action context coming from any action bar, without breaking
// existing users
class
SCMMenuItemActionItem
extends
MenuItemActionItem
{
onClick
(
event
:
MouseEvent
):
void
{
event
.
preventDefault
();
event
.
stopPropagation
();
this
.
actionRunner
.
run
(
this
.
_commandAction
,
this
.
_context
)
.
done
(
undefined
,
err
=>
this
.
_messageService
.
show
(
Severity
.
Error
,
err
));
}
}
// TODO@Joao
// Rename contextKey to something else
function
identityProvider
(
r
:
ISCMResourceGroup
|
ISCMResource
):
string
{
if
(
isSCMResource
(
r
))
{
const
group
=
r
.
resourceGroup
;
const
provider
=
group
.
provider
;
return
`
${
provider
.
contextKey
}
/
${
group
.
contextKey
}
/
${
r
.
sourceUri
.
toString
()}
`
;
}
else
{
const
provider
=
r
.
provider
;
return
`
${
provider
.
contextKey
}
/
${
r
.
contextKey
}
`
;
}
}
interface
SearchInputEvent
extends
Event
{
target
:
HTMLInputElement
;
...
...
@@ -98,22 +126,20 @@ interface ResourceTemplate {
class
MultipleSelectionActionRunner
extends
ActionRunner
{
constructor
(
private
getSelectedResources
:
()
=>
URI
[])
{
constructor
(
private
getSelectedResources
:
()
=>
(
ISCMResource
|
ISCMResourceGroup
)
[])
{
super
();
}
/**
* Calls the action.run method with the current selection. Note
* that these actions already have the current scm resource context
* within, so we don't want to pass in the selection if there is only
* one selected element. The user should be able to select a single
* item and run an action on another element and only the latter should
* be influenced.
*/
runAction
(
action
:
IAction
,
context
?:
any
):
TPromise
<
any
>
{
runAction
(
action
:
IAction
,
context
:
ISCMResource
|
ISCMResourceGroup
):
TPromise
<
any
>
{
if
(
action
instanceof
MenuItemAction
)
{
const
selection
=
this
.
getSelectedResources
();
return
selection
.
length
>
1
?
action
.
run
(...
selection
)
:
action
.
run
();
const
filteredSelection
=
selection
.
filter
(
s
=>
s
!==
context
);
if
(
selection
.
length
===
filteredSelection
.
length
||
selection
.
length
===
1
)
{
return
action
.
run
(
context
);
}
return
action
.
run
(
context
,
...
filteredSelection
);
}
return
super
.
runAction
(
action
,
context
);
...
...
@@ -128,7 +154,7 @@ class ResourceRenderer implements IRenderer<ISCMResource, ResourceTemplate> {
constructor
(
private
scmMenus
:
SCMMenus
,
private
actionItemProvider
:
IActionItemProvider
,
private
getSelectedResources
:
()
=>
URI
[],
private
getSelectedResources
:
()
=>
ISCMResource
[],
@
IThemeService
private
themeService
:
IThemeService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
)
{
}
...
...
@@ -151,6 +177,7 @@ class ResourceRenderer implements IRenderer<ISCMResource, ResourceTemplate> {
renderElement
(
resource
:
ISCMResource
,
index
:
number
,
template
:
ResourceTemplate
):
void
{
template
.
fileLabel
.
setFile
(
resource
.
sourceUri
);
template
.
actionBar
.
clear
();
template
.
actionBar
.
context
=
resource
;
template
.
actionBar
.
push
(
this
.
scmMenus
.
getResourceActions
(
resource
));
toggleClass
(
template
.
name
,
'
strike-through
'
,
resource
.
decorations
.
strikeThrough
);
...
...
@@ -263,7 +290,7 @@ export class SCMViewlet extends Viewlet {
];
this
.
list
=
new
List
(
this
.
listContainer
,
delegate
,
renderers
,
{
identityProvider
:
e
=>
e
.
uri
.
toString
()
,
identityProvider
,
keyboardSupport
:
false
});
...
...
@@ -337,7 +364,11 @@ export class SCMViewlet extends Viewlet {
}
getActionItem
(
action
:
IAction
):
IActionItem
{
return
createActionItem
(
action
,
this
.
keybindingService
,
this
.
messageService
);
if
(
!
(
action
instanceof
MenuItemAction
))
{
return
undefined
;
}
return
new
SCMMenuItemActionItem
(
action
,
this
.
keybindingService
,
this
.
messageService
);
}
private
onListContextMenu
(
e
:
IListContextMenuEvent
<
ISCMResourceGroup
|
ISCMResource
>
):
void
{
...
...
@@ -353,12 +384,14 @@ export class SCMViewlet extends Viewlet {
this
.
contextMenuService
.
showContextMenu
({
getAnchor
:
()
=>
e
.
anchor
,
getActions
:
()
=>
TPromise
.
as
(
actions
),
getActionsContext
:
()
=>
element
,
actionRunner
:
new
MultipleSelectionActionRunner
(()
=>
this
.
getSelectedResources
())
});
}
private
getSelectedResources
():
URI
[]
{
return
this
.
list
.
getSelectedElements
().
map
(
r
=>
r
.
uri
);
private
getSelectedResources
():
ISCMResource
[]
{
return
this
.
list
.
getSelectedElements
()
.
filter
(
r
=>
isSCMResource
(
r
))
as
ISCMResource
[];
}
dispose
():
void
{
...
...
src/vs/workbench/services/scm/common/scm.ts
浏览文件 @
b68c8e33
...
...
@@ -34,6 +34,7 @@ export interface ISCMResource {
export
interface
ISCMResourceGroup
{
// readonly uri: URI;
readonly
provider
:
ISCMProvider
;
readonly
label
:
string
;
readonly
contextKey
?:
string
;
readonly
resources
:
ISCMResource
[];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录