Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
197b7a17
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,发现更多精彩内容 >>
提交
197b7a17
编写于
12月 15, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/Microsoft/vscode
上级
17bda4b2
bed86d2b
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
79 addition
and
38 deletion
+79
-38
extensions/css/client/src/cssMain.ts
extensions/css/client/src/cssMain.ts
+1
-1
extensions/css/server/package.json
extensions/css/server/package.json
+1
-1
extensions/css/server/src/cssServerMain.ts
extensions/css/server/src/cssServerMain.ts
+1
-1
extensions/css/server/yarn.lock
extensions/css/server/yarn.lock
+3
-3
extensions/git/package.json
extensions/git/package.json
+21
-1
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+15
-11
extensions/git/src/git.ts
extensions/git/src/git.ts
+1
-1
extensions/git/src/model.ts
extensions/git/src/model.ts
+12
-3
extensions/git/src/repository.ts
extensions/git/src/repository.ts
+4
-9
extensions/git/src/util.ts
extensions/git/src/util.ts
+10
-0
extensions/html/client/src/htmlMain.ts
extensions/html/client/src/htmlMain.ts
+1
-1
extensions/html/server/src/htmlServerMain.ts
extensions/html/server/src/htmlServerMain.ts
+1
-1
extensions/json/client/src/jsonMain.ts
extensions/json/client/src/jsonMain.ts
+1
-1
extensions/json/server/src/jsonServerMain.ts
extensions/json/server/src/jsonServerMain.ts
+1
-1
extensions/ruby/language-configuration.json
extensions/ruby/language-configuration.json
+1
-1
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-1
src/vs/workbench/parts/scm/electron-browser/scmMenus.ts
src/vs/workbench/parts/scm/electron-browser/scmMenus.ts
+1
-1
src/vs/workbench/services/themes/electron-browser/fileIconThemeData.ts
...nch/services/themes/electron-browser/fileIconThemeData.ts
+3
-0
未找到文件。
extensions/css/client/src/cssMain.ts
浏览文件 @
197b7a17
...
...
@@ -21,7 +21,7 @@ export function activate(context: ExtensionContext) {
// The server is implemented in node
let
serverModule
=
context
.
asAbsolutePath
(
path
.
join
(
'
server
'
,
'
out
'
,
'
cssServerMain.js
'
));
// The debug options for the server
let
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=60
0
4
'
]
};
let
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=60
4
4
'
]
};
// If the extension is launch in debug mode the debug server options are use
// Otherwise the run options are used
...
...
extensions/css/server/package.json
浏览文件 @
197b7a17
...
...
@@ -8,7 +8,7 @@
"node"
:
"*"
},
"dependencies"
:
{
"vscode-css-languageservice"
:
"^3.0.
2
"
,
"vscode-css-languageservice"
:
"^3.0.
3
"
,
"vscode-languageserver"
:
"^3.5.0"
},
"devDependencies"
:
{
...
...
extensions/css/server/src/cssServerMain.ts
浏览文件 @
197b7a17
...
...
@@ -122,7 +122,7 @@ function updateConfiguration(settings: Settings) {
}
let
pendingValidationRequests
:
{
[
uri
:
string
]:
NodeJS
.
Timer
}
=
{};
const
validationDelayMs
=
2
00
;
const
validationDelayMs
=
5
00
;
// The content of a text document has changed. This event is emitted
// when the text document first opened or when its content has changed.
...
...
extensions/css/server/yarn.lock
浏览文件 @
197b7a17
...
...
@@ -6,9 +6,9 @@
version "7.0.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.43.tgz#a187e08495a075f200ca946079c914e1a5fe962c"
vscode-css-languageservice@^3.0.
2
:
version "3.0.
2
"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.
2.tgz#ae0c43836318455aa290c777556394d6127b8f6c
"
vscode-css-languageservice@^3.0.
3
:
version "3.0.
3
"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-3.0.
3.tgz#02cc4efa5335f5104e0a2f3b6920faaf59db4f7a
"
dependencies:
vscode-languageserver-types "3.5.0"
vscode-nls "^2.0.1"
...
...
extensions/git/package.json
浏览文件 @
197b7a17
...
...
@@ -701,11 +701,21 @@
"when"
:
"scmProvider == git && scmResourceGroup == merge"
,
"group"
:
"1_modification"
},
{
"command"
:
"git.openFile"
,
"when"
:
"scmProvider == git && scmResourceGroup == merge"
,
"group"
:
"navigation"
},
{
"command"
:
"git.stage"
,
"when"
:
"scmProvider == git && scmResourceGroup == merge"
,
"group"
:
"inline"
},
{
"command"
:
"git.openFile"
,
"when"
:
"scmProvider == git && scmResourceGroup == merge"
,
"group"
:
"inline0"
},
{
"command"
:
"git.openChange"
,
"when"
:
"scmProvider == git && scmResourceGroup == index"
,
...
...
@@ -731,6 +741,11 @@
"when"
:
"scmProvider == git && scmResourceGroup == index"
,
"group"
:
"inline"
},
{
"command"
:
"git.openFile"
,
"when"
:
"scmProvider == git && scmResourceGroup == index"
,
"group"
:
"inline0"
},
{
"command"
:
"git.openChange"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
...
...
@@ -766,6 +781,11 @@
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"inline"
},
{
"command"
:
"git.openFile"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"inline0"
},
{
"command"
:
"git.ignore"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
...
...
@@ -979,4 +999,4 @@
"@types/which"
:
"^1.0.28"
,
"mocha"
:
"^3.2.0"
}
}
}
\ No newline at end of file
extensions/git/src/commands.ts
浏览文件 @
197b7a17
...
...
@@ -504,7 +504,10 @@ export class CommandCenter {
}
if
(
resource
)
{
uris
=
[...
resourceStates
.
map
(
r
=>
r
.
resourceUri
),
resource
.
resourceUri
];
const
resources
=
([
resource
,
...
resourceStates
]
as
Resource
[])
.
filter
(
r
=>
r
.
type
!==
Status
.
DELETED
&&
r
.
type
!==
Status
.
INDEX_DELETED
);
uris
=
resources
.
map
(
r
=>
r
.
resourceUri
);
}
}
...
...
@@ -1313,25 +1316,26 @@ export class CommandCenter {
return
;
}
const
p
icks
=
remotes
.
map
(
r
=>
({
label
:
r
.
name
,
description
:
r
.
url
}));
const
remoteP
icks
=
remotes
.
map
(
r
=>
({
label
:
r
.
name
,
description
:
r
.
url
}));
const
placeHolder
=
localize
(
'
pick remote pull repo
'
,
"
Pick a remote to pull the branch from
"
);
const
pick
=
await
window
.
showQuickPick
(
p
icks
,
{
placeHolder
});
const
remotePick
=
await
window
.
showQuickPick
(
remoteP
icks
,
{
placeHolder
});
if
(
!
p
ick
)
{
if
(
!
remoteP
ick
)
{
return
;
}
const
branchName
=
await
window
.
showInputBox
({
placeHolder
:
localize
(
'
branch name
'
,
"
Branch name
"
),
prompt
:
localize
(
'
provide branch name
'
,
"
Please provide a branch name
"
),
ignoreFocusOut
:
true
});
const
remoteRefs
=
repository
.
refs
;
const
remoteRefsFiltered
=
remoteRefs
.
filter
(
r
=>
(
r
.
remote
===
remotePick
.
label
));
const
branchPicks
=
remoteRefsFiltered
.
map
(
r
=>
({
label
:
r
.
name
}))
as
{
label
:
string
;
description
:
string
}[];
const
branchPick
=
await
window
.
showQuickPick
(
branchPicks
,
{
placeHolder
});
if
(
!
branch
Name
)
{
if
(
!
branch
Pick
)
{
return
;
}
repository
.
pull
(
false
,
pick
.
label
,
branchName
);
const
remoteCharCnt
=
remotePick
.
label
.
length
;
repository
.
pull
(
false
,
remotePick
.
label
,
branchPick
.
label
.
slice
(
remoteCharCnt
+
1
));
}
@
command
(
'
git.pull
'
,
{
repository
:
true
})
...
...
extensions/git/src/git.ts
浏览文件 @
197b7a17
...
...
@@ -1150,7 +1150,7 @@ export class Repository {
}
async
getRefs
():
Promise
<
Ref
[]
>
{
const
result
=
await
this
.
run
([
'
for-each-ref
'
,
'
--format
'
,
'
%(refname) %(objectname)
'
]);
const
result
=
await
this
.
run
([
'
for-each-ref
'
,
'
--format
'
,
'
%(refname) %(objectname)
'
,
'
--sort
'
,
'
-committerdate
'
]);
const
fn
=
(
line
:
string
):
Ref
|
null
=>
{
let
match
:
RegExpExecArray
|
null
;
...
...
extensions/git/src/model.ts
浏览文件 @
197b7a17
...
...
@@ -8,7 +8,7 @@
import
{
workspace
,
WorkspaceFoldersChangeEvent
,
Uri
,
window
,
Event
,
EventEmitter
,
QuickPickItem
,
Disposable
,
SourceControl
,
SourceControlResourceGroup
,
TextEditor
,
Memento
,
ConfigurationChangeEvent
}
from
'
vscode
'
;
import
{
Repository
,
RepositoryState
}
from
'
./repository
'
;
import
{
memoize
,
sequentialize
,
debounce
}
from
'
./decorators
'
;
import
{
dispose
,
anyEvent
,
filterEvent
,
IDisposable
,
isDescendant
}
from
'
./util
'
;
import
{
dispose
,
anyEvent
,
filterEvent
,
IDisposable
,
isDescendant
,
find
,
firstIndex
}
from
'
./util
'
;
import
{
Git
,
GitErrorCodes
}
from
'
./git
'
;
import
*
as
path
from
'
path
'
;
import
*
as
fs
from
'
fs
'
;
...
...
@@ -27,7 +27,7 @@ class RepositoryPick implements QuickPickItem {
.
join
(
'
'
);
}
constructor
(
public
readonly
repository
:
Repository
)
{
}
constructor
(
public
readonly
repository
:
Repository
,
public
readonly
index
:
number
)
{
}
}
export
interface
ModelChangeEvent
{
...
...
@@ -256,7 +256,16 @@ export class Model {
throw
new
Error
(
localize
(
'
no repositories
'
,
"
There are no available repositories
"
));
}
const
picks
=
this
.
openRepositories
.
map
(
e
=>
new
RepositoryPick
(
e
.
repository
));
const
picks
=
this
.
openRepositories
.
map
((
e
,
index
)
=>
new
RepositoryPick
(
e
.
repository
,
index
));
const
active
=
window
.
activeTextEditor
;
const
repository
=
active
&&
this
.
getRepository
(
active
.
document
.
fileName
);
const
index
=
firstIndex
(
picks
,
pick
=>
pick
.
repository
===
repository
);
// Move repository pick containing the active text editor to appear first
if
(
index
>
-
1
)
{
picks
.
unshift
(...
picks
.
splice
(
index
,
1
));
}
const
placeHolder
=
localize
(
'
pick repo
'
,
"
Choose a repository
"
);
const
pick
=
await
window
.
showQuickPick
(
picks
,
{
placeHolder
});
...
...
extensions/git/src/repository.ts
浏览文件 @
197b7a17
...
...
@@ -105,7 +105,7 @@ export class Resource implements SourceControlResourceState {
}
};
private
getIconPath
(
theme
:
string
):
Uri
|
undefined
{
private
getIconPath
(
theme
:
string
):
Uri
{
switch
(
this
.
type
)
{
case
Status
.
INDEX_MODIFIED
:
return
Resource
.
Icons
[
theme
].
Modified
;
case
Status
.
MODIFIED
:
return
Resource
.
Icons
[
theme
].
Modified
;
...
...
@@ -123,7 +123,6 @@ export class Resource implements SourceControlResourceState {
case
Status
.
DELETED_BY_US
:
return
Resource
.
Icons
[
theme
].
Conflict
;
case
Status
.
BOTH_ADDED
:
return
Resource
.
Icons
[
theme
].
Conflict
;
case
Status
.
BOTH_MODIFIED
:
return
Resource
.
Icons
[
theme
].
Conflict
;
default
:
return
void
0
;
}
}
...
...
@@ -182,7 +181,7 @@ export class Resource implements SourceControlResourceState {
return
{
strikeThrough
,
faded
,
tooltip
,
light
,
dark
,
letter
,
color
,
source
:
'
git.resource
'
/*todo@joh*/
};
}
get
letter
():
string
|
undefined
{
get
letter
():
string
{
switch
(
this
.
type
)
{
case
Status
.
INDEX_MODIFIED
:
case
Status
.
MODIFIED
:
...
...
@@ -207,12 +206,10 @@ export class Resource implements SourceControlResourceState {
case
Status
.
BOTH_ADDED
:
case
Status
.
BOTH_MODIFIED
:
return
'
C
'
;
default
:
return
undefined
;
}
}
get
color
():
ThemeColor
|
undefined
{
get
color
():
ThemeColor
{
switch
(
this
.
type
)
{
case
Status
.
INDEX_MODIFIED
:
case
Status
.
MODIFIED
:
...
...
@@ -235,8 +232,6 @@ export class Resource implements SourceControlResourceState {
case
Status
.
BOTH_ADDED
:
case
Status
.
BOTH_MODIFIED
:
return
new
ThemeColor
(
'
gitDecoration.conflictingResourceForeground
'
);
default
:
return
undefined
;
}
}
...
...
@@ -261,7 +256,7 @@ export class Resource implements SourceControlResourceState {
}
}
get
resourceDecoration
():
DecorationData
|
undefined
{
get
resourceDecoration
():
DecorationData
{
const
title
=
this
.
tooltip
;
const
abbreviation
=
this
.
letter
;
const
color
=
this
.
color
;
...
...
extensions/git/src/util.ts
浏览文件 @
197b7a17
...
...
@@ -195,6 +195,16 @@ export function uniqueFilter<T>(keyFn: (t: T) => string): (t: T) => boolean {
};
}
export
function
firstIndex
<
T
>
(
array
:
T
[],
fn
:
(
t
:
T
)
=>
boolean
):
number
{
for
(
let
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
fn
(
array
[
i
]))
{
return
i
;
}
}
return
-
1
;
}
export
function
find
<
T
>
(
array
:
T
[],
fn
:
(
t
:
T
)
=>
boolean
):
T
|
undefined
{
let
result
:
T
|
undefined
=
undefined
;
...
...
extensions/html/client/src/htmlMain.ts
浏览文件 @
197b7a17
...
...
@@ -39,7 +39,7 @@ export function activate(context: ExtensionContext) {
// The server is implemented in node
let
serverModule
=
context
.
asAbsolutePath
(
path
.
join
(
'
server
'
,
'
out
'
,
'
htmlServerMain.js
'
));
// The debug options for the server
let
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=60
04
'
]
};
let
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=60
45
'
]
};
// If the extension is launch in debug mode the debug server options are use
// Otherwise the run options are used
...
...
extensions/html/server/src/htmlServerMain.ts
浏览文件 @
197b7a17
...
...
@@ -168,7 +168,7 @@ connection.onDidChangeConfiguration((change) => {
});
let
pendingValidationRequests
:
{
[
uri
:
string
]:
NodeJS
.
Timer
}
=
{};
const
validationDelayMs
=
2
00
;
const
validationDelayMs
=
5
00
;
// The content of a text document has changed. This event is emitted
// when the text document first opened or when its content has changed.
...
...
extensions/json/client/src/jsonMain.ts
浏览文件 @
197b7a17
...
...
@@ -67,7 +67,7 @@ export function activate(context: ExtensionContext) {
// The server is implemented in node
let
serverModule
=
context
.
asAbsolutePath
(
path
.
join
(
'
server
'
,
'
out
'
,
'
jsonServerMain.js
'
));
// The debug options for the server
let
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect
'
]
};
let
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect
=6046
'
]
};
// If the extension is launch in debug mode the debug server options are use
// Otherwise the run options are used
...
...
extensions/json/server/src/jsonServerMain.ts
浏览文件 @
197b7a17
...
...
@@ -232,7 +232,7 @@ documents.onDidClose(event => {
});
let
pendingValidationRequests
:
{
[
uri
:
string
]:
NodeJS
.
Timer
;
}
=
{};
const
validationDelayMs
=
2
00
;
const
validationDelayMs
=
5
00
;
function
cleanPendingValidation
(
textDocument
:
TextDocument
):
void
{
let
request
=
pendingValidationRequests
[
textDocument
.
uri
];
...
...
extensions/ruby/language-configuration.json
浏览文件 @
197b7a17
...
...
@@ -23,7 +23,7 @@
[
"'"
,
"'"
]
],
"indentationRules"
:
{
"increaseIndentPattern"
:
"^
\\
s*((begin|class|(private|protected)
\\
s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(
.*
\\
sdo
\\
b)|(.*=
\\
s*(case|if|unless)))
\\
b[^
\\
{;]*
$"
,
"increaseIndentPattern"
:
"^
\\
s*((begin|class|(private|protected)
\\
s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|(
[^#]*
\\
sdo
\\
b)|([^#]*=
\\
s*(case|if|unless)))
\\
b([^#
\\
{;]|(
\"
|'|
\/
).*
\\
4)*(#.*)?
$"
,
"decreaseIndentPattern"
:
"^
\\
s*([}
\\
]]([,)]?
\\
s*(#|$)|
\\
.[a-zA-Z_]
\\
w*
\\
b)|(end|rescue|ensure|else|elsif|when)
\\
b)"
}
}
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
197b7a17
...
...
@@ -750,7 +750,7 @@ export const MainContext = {
MainThreadEditors
:
createMainId
<
MainThreadEditorsShape
>
(
'
MainThreadEditors
'
),
MainThreadErrors
:
createMainId
<
MainThreadErrorsShape
>
(
'
MainThreadErrors
'
),
MainThreadTreeViews
:
createMainId
<
MainThreadTreeViewsShape
>
(
'
MainThreadTreeViews
'
),
MainThreadLanguageFeatures
:
createMainId
<
MainThreadLanguageFeaturesShape
>
(
'
MainThreadLanguageFeatures
'
,
ProxyType
.
CustomMarshaller
),
MainThreadLanguageFeatures
:
createMainId
<
MainThreadLanguageFeaturesShape
>
(
'
MainThreadLanguageFeatures
'
),
MainThreadLanguages
:
createMainId
<
MainThreadLanguagesShape
>
(
'
MainThreadLanguages
'
),
MainThreadMessageService
:
createMainId
<
MainThreadMessageServiceShape
>
(
'
MainThreadMessageService
'
),
MainThreadOutputService
:
createMainId
<
MainThreadOutputServiceShape
>
(
'
MainThreadOutputService
'
),
...
...
src/vs/workbench/parts/scm/electron-browser/scmMenus.ts
浏览文件 @
197b7a17
...
...
@@ -88,7 +88,7 @@ export class SCMMenus implements IDisposable {
const
primary
:
IAction
[]
=
[];
const
secondary
:
IAction
[]
=
[];
const
result
=
{
primary
,
secondary
};
fillInActions
(
menu
,
{
shouldForwardArgs
:
true
},
result
,
g
=>
g
===
'
inline
'
);
fillInActions
(
menu
,
{
shouldForwardArgs
:
true
},
result
,
g
=>
/^inline/
.
test
(
g
)
);
menu
.
dispose
();
contextKeyService
.
dispose
();
...
...
src/vs/workbench/services/themes/electron-browser/fileIconThemeData.ts
浏览文件 @
197b7a17
...
...
@@ -244,6 +244,9 @@ function _processIconThemeDocument(id: string, iconThemeDocumentPath: string, ic
let
languageIds
=
associations
.
languageIds
;
if
(
languageIds
)
{
if
(
!
languageIds
.
jsonc
&&
languageIds
.
json
)
{
languageIds
.
jsonc
=
languageIds
.
json
;
}
for
(
let
languageId
in
languageIds
)
{
addSelector
(
`
${
qualifier
}
.
${
escapeCSS
(
languageId
)}
-lang-file-icon.file-icon::before`
,
languageIds
[
languageId
]);
result
.
hasFileIcons
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录