提交 98175378 编写于 作者: J Joao Moreno

Merge remote-tracking branch 'origin/master'

...@@ -25,17 +25,17 @@ export interface IQuickFix2 extends IQuickFix { ...@@ -25,17 +25,17 @@ export interface IQuickFix2 extends IQuickFix {
export function getQuickFixes(model: IModel, range: IRange): TPromise<IQuickFix2[]> { export function getQuickFixes(model: IModel, range: IRange): TPromise<IQuickFix2[]> {
const quickFixes: IQuickFix2[] = []; const quickFixes: IQuickFix2[] = [];
let idPool = 0;
const promises = QuickFixRegistry.all(model).map(support => { const promises = QuickFixRegistry.all(model).map(support => {
return support.getQuickFixes(model.getAssociatedResource(), range).then(result => { return support.getQuickFixes(model.getAssociatedResource(), range).then(result => {
if (!Array.isArray(result)) { if (!Array.isArray(result)) {
return return
} }
let c = 0;
for (let fix of result) { for (let fix of result) {
quickFixes.push({ quickFixes.push({
command: fix.command, command: fix.command,
score: fix.score, score: fix.score,
id: `quickfix_#${c++}`, id: `quickfix_#${idPool++}`,
support support
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册