Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
9db1b149
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,发现更多精彩内容 >>
未验证
提交
9db1b149
编写于
11月 04, 2020
作者:
J
João Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
c3b5f2bf
09829053
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
50 deletion
+26
-50
extensions/css-language-features/.vscode/launch.json
extensions/css-language-features/.vscode/launch.json
+1
-23
extensions/css-language-features/client/src/node/cssClientMain.ts
...ns/css-language-features/client/src/node/cssClientMain.ts
+1
-2
extensions/html-language-features/client/src/node/htmlClientMain.ts
.../html-language-features/client/src/node/htmlClientMain.ts
+1
-1
extensions/json-language-features/client/src/node/jsonClientMain.ts
.../json-language-features/client/src/node/jsonClientMain.ts
+1
-1
src/vs/editor/contrib/suggest/suggestWidget.ts
src/vs/editor/contrib/suggest/suggestWidget.ts
+3
-3
src/vs/workbench/services/extensionManagement/browser/extensionBisect.ts
...h/services/extensionManagement/browser/extensionBisect.ts
+19
-20
未找到文件。
extensions/css-language-features/.vscode/launch.json
浏览文件 @
9db1b149
{
"version"
:
"0.2.0"
,
"compounds"
:
[
{
"name"
:
"Debug Extension and Language Server"
,
"configurations"
:
[
"Launch Extension"
,
"Attach Language Server"
]
}
],
"configurations"
:
[
{
"name"
:
"Launch Extension"
,
...
...
@@ -41,19 +32,6 @@
]
},
{
"name"
:
"Attach Language Server"
,
"type"
:
"node"
,
"request"
:
"attach"
,
"protocol"
:
"inspector"
,
"port"
:
6044
,
"sourceMaps"
:
true
,
"outFiles"
:
[
"${workspaceFolder}/server/out/**/*.js"
],
"smartStep"
:
true
,
"restart"
:
true
},
{
"name"
:
"Server Unit Tests"
,
"type"
:
"node"
,
"request"
:
"launch"
,
...
...
@@ -74,4 +52,4 @@
]
}
]
}
\ No newline at end of file
}
extensions/css-language-features/client/src/node/cssClientMain.ts
浏览文件 @
9db1b149
...
...
@@ -11,14 +11,13 @@ import { TextDecoder } from 'util';
// this method is called when vs code is activated
export
function
activate
(
context
:
ExtensionContext
)
{
const
clientMain
=
extensions
.
getExtension
(
'
vscode.css-language-features
'
)?.
packageJSON
?.
main
||
''
;
const
serverMain
=
`./server/
${
clientMain
.
indexOf
(
'
/dist/
'
)
!==
-
1
?
'
dist
'
:
'
out
'
}
/node/cssServerMain`
;
const
serverModule
=
context
.
asAbsolutePath
(
serverMain
);
// The debug options for the server
const
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=
6044
'
]
};
const
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=
'
+
(
7000
+
Math
.
round
(
Math
.
random
()
*
999
))
]
};
// If the extension is launch in debug mode the debug server options are use
// Otherwise the run options are used
...
...
extensions/html-language-features/client/src/node/htmlClientMain.ts
浏览文件 @
9db1b149
...
...
@@ -24,7 +24,7 @@ export function activate(context: ExtensionContext) {
const
serverModule
=
context
.
asAbsolutePath
(
serverMain
);
// The debug options for the server
const
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=
6044
'
]
};
const
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=
'
+
(
8000
+
Math
.
round
(
Math
.
random
()
*
999
))
]
};
// If the extension is launch in debug mode the debug server options are use
// Otherwise the run options are used
...
...
extensions/json-language-features/client/src/node/jsonClientMain.ts
浏览文件 @
9db1b149
...
...
@@ -25,7 +25,7 @@ export function activate(context: ExtensionContext) {
const
serverModule
=
context
.
asAbsolutePath
(
serverMain
);
// The debug options for the server
const
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=
6044
'
]
};
const
debugOptions
=
{
execArgv
:
[
'
--nolazy
'
,
'
--inspect=
'
+
(
6000
+
Math
.
round
(
Math
.
random
()
*
999
))
]
};
// If the extension is launch in debug mode the debug server options are use
// Otherwise the run options are used
...
...
src/vs/editor/contrib/suggest/suggestWidget.ts
浏览文件 @
9db1b149
...
...
@@ -169,13 +169,13 @@ export class SuggestWidget implements IDisposable {
if
(
e
.
done
)
{
// only store width or height value that have changed and also
// only store changes that are above a certain threshold
const
threshold
=
Math
.
floor
(
this
.
getLayoutInfo
().
itemHeight
/
3
);
const
threshold
=
Math
.
floor
(
this
.
getLayoutInfo
().
itemHeight
/
2
);
let
{
width
,
height
}
=
this
.
element
.
size
;
if
(
persistedSize
&&
currentSize
)
{
if
(
!
persistHeight
||
Math
.
abs
(
currentSize
.
height
-
height
)
>
threshold
)
{
if
(
!
persistHeight
||
Math
.
abs
(
currentSize
.
height
-
height
)
<=
threshold
)
{
height
=
persistedSize
.
height
;
}
if
(
!
persistWidth
||
Math
.
abs
(
currentSize
.
width
-
width
)
>
threshold
)
{
if
(
!
persistWidth
||
Math
.
abs
(
currentSize
.
width
-
width
)
<=
threshold
)
{
width
=
persistedSize
.
width
;
}
}
...
...
src/vs/workbench/services/extensionManagement/browser/extensionBisect.ts
浏览文件 @
9db1b149
...
...
@@ -5,7 +5,7 @@
import
{
localize
}
from
'
vs/nls
'
;
import
{
IExtensionManagementService
,
IGlobalExtensionEnablementService
,
ILocalExtension
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IStorageService
,
StorageScope
,
StorageTarget
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ExtensionType
,
IExtension
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
{
INotificationService
,
IPromptChoice
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
...
...
@@ -33,9 +33,9 @@ export interface IExtensionBisectService {
isDisabledByBisect
(
extension
:
IExtension
):
boolean
;
isActive
:
boolean
;
disabledCount
:
number
;
start
(
extensions
:
ILocalExtension
[]):
void
;
next
(
seeingBad
:
boolean
):
{
id
:
string
,
bad
:
boolean
}
|
undefined
;
reset
():
void
;
start
(
extensions
:
ILocalExtension
[]):
Promise
<
void
>
;
next
(
seeingBad
:
boolean
):
Promise
<
{
id
:
string
,
bad
:
boolean
}
|
undefined
>
;
reset
():
Promise
<
void
>
;
}
class
BisectState
{
...
...
@@ -106,23 +106,23 @@ class ExtensionBisectService implements IExtensionBisectService {
return
disabled
??
false
;
}
start
(
extensions
:
ILocalExtension
[]):
void
{
async
start
(
extensions
:
ILocalExtension
[]):
Promise
<
void
>
{
if
(
this
.
_state
)
{
throw
new
Error
(
'
invalid state
'
);
}
const
extensionIds
=
extensions
.
map
(
ext
=>
ext
.
identifier
.
id
);
const
newState
=
new
BisectState
(
extensionIds
,
0
,
extensionIds
.
length
);
this
.
_storageService
.
store
(
ExtensionBisectService
.
_storageKey
,
JSON
.
stringify
(
newState
),
StorageScope
.
GLOBAL
);
this
.
_storageService
.
flush
();
this
.
_storageService
.
store
2
(
ExtensionBisectService
.
_storageKey
,
JSON
.
stringify
(
newState
),
StorageScope
.
GLOBAL
,
StorageTarget
.
MACHINE
);
await
this
.
_storageService
.
flush
();
}
next
(
seeingBad
:
boolean
):
{
id
:
string
,
bad
:
boolean
}
|
undefined
{
async
next
(
seeingBad
:
boolean
):
Promise
<
{
id
:
string
;
bad
:
boolean
;
}
|
undefined
>
{
if
(
!
this
.
_state
)
{
throw
new
Error
(
'
invalid state
'
);
}
// check if there is only one left
if
(
this
.
_state
.
low
===
this
.
_state
.
high
-
1
)
{
this
.
reset
();
await
this
.
reset
();
return
{
id
:
this
.
_state
.
extensions
[
this
.
_state
.
low
],
bad
:
seeingBad
};
}
// the second half is disabled so if there is still bad it must be
...
...
@@ -132,14 +132,14 @@ class ExtensionBisectService implements IExtensionBisectService {
seeingBad
?
this
.
_state
.
low
:
this
.
_state
.
mid
,
seeingBad
?
this
.
_state
.
mid
:
this
.
_state
.
high
,
);
this
.
_storageService
.
store
(
ExtensionBisectService
.
_storageKey
,
JSON
.
stringify
(
nextState
),
StorageScope
.
GLOBAL
);
this
.
_storageService
.
flush
();
this
.
_storageService
.
store
2
(
ExtensionBisectService
.
_storageKey
,
JSON
.
stringify
(
nextState
),
StorageScope
.
GLOBAL
,
StorageTarget
.
MACHINE
);
await
this
.
_storageService
.
flush
();
return
undefined
;
}
reset
():
void
{
async
reset
():
Promise
<
void
>
{
this
.
_storageService
.
remove
(
ExtensionBisectService
.
_storageKey
,
StorageScope
.
GLOBAL
);
this
.
_storageService
.
flush
();
await
this
.
_storageService
.
flush
();
}
}
...
...
@@ -220,7 +220,7 @@ registerAction2(class extends Action2 {
});
if
(
res
.
confirmed
)
{
extensionsBisect
.
start
(
extensions
);
await
extensionsBisect
.
start
(
extensions
);
hostService
.
reload
();
}
}
...
...
@@ -252,11 +252,11 @@ registerAction2(class extends Action2 {
seeingBad
=
await
this
.
_checkForBad
(
dialogService
);
}
if
(
seeingBad
===
undefined
)
{
bisectService
.
reset
();
await
bisectService
.
reset
();
hostService
.
reload
();
return
;
}
const
done
=
bisectService
.
next
(
seeingBad
);
const
done
=
await
bisectService
.
next
(
seeingBad
);
if
(
!
done
)
{
hostService
.
reload
();
return
;
...
...
@@ -286,7 +286,7 @@ registerAction2(class extends Action2 {
await
issueService
.
openReporter
({
extensionId
:
done
.
id
});
}
}
bisectService
.
reset
();
await
bisectService
.
reset
();
hostService
.
reload
();
}
...
...
@@ -322,8 +322,7 @@ registerAction2(class extends Action2 {
async
run
(
accessor
:
ServicesAccessor
):
Promise
<
void
>
{
const
extensionsBisect
=
accessor
.
get
(
IExtensionBisectService
);
const
hostService
=
accessor
.
get
(
IHostService
);
extensionsBisect
.
reset
();
hostService
.
reload
();
//todo@jrieken reloadExtensionHost instead? update ext viewlet etc?
await
extensionsBisect
.
reset
();
hostService
.
reload
();
}
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录