|
|
@ -205,7 +205,7 @@ export class DiagnostcsAdapter extends Adapter {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private _tsDiagnosticCategoryToMarkerSeverity(category: ts.DiagnosticCategory): monaco.MarkerSeverity {
|
|
|
|
private _tsDiagnosticCategoryToMarkerSeverity(category: ts.DiagnosticCategory): monaco.MarkerSeverity {
|
|
|
|
switch(category) {
|
|
|
|
switch (category) {
|
|
|
|
case ts.DiagnosticCategory.Error: return monaco.MarkerSeverity.Error
|
|
|
|
case ts.DiagnosticCategory.Error: return monaco.MarkerSeverity.Error
|
|
|
|
case ts.DiagnosticCategory.Message: return monaco.MarkerSeverity.Info
|
|
|
|
case ts.DiagnosticCategory.Message: return monaco.MarkerSeverity.Info
|
|
|
|
case ts.DiagnosticCategory.Warning: return monaco.MarkerSeverity.Warning
|
|
|
|
case ts.DiagnosticCategory.Warning: return monaco.MarkerSeverity.Warning
|
|
|
@ -369,7 +369,7 @@ export class SignatureHelpAdapter extends Adapter implements monaco.languages.Si
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
value: ret,
|
|
|
|
value: ret,
|
|
|
|
dispose() {}
|
|
|
|
dispose() { }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -656,8 +656,7 @@ export class CodeActionAdaptor extends FormatHelper implements monaco.languages.
|
|
|
|
const start = this._positionToOffset(resource, { lineNumber: range.startLineNumber, column: range.startColumn });
|
|
|
|
const start = this._positionToOffset(resource, { lineNumber: range.startLineNumber, column: range.startColumn });
|
|
|
|
const end = this._positionToOffset(resource, { lineNumber: range.endLineNumber, column: range.endColumn });
|
|
|
|
const end = this._positionToOffset(resource, { lineNumber: range.endLineNumber, column: range.endColumn });
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: where to get the current formatting options from?
|
|
|
|
const formatOptions = FormatHelper._convertOptions(model.getOptions());
|
|
|
|
const formatOptions = FormatHelper._convertOptions({insertSpaces: true, tabSize: 2});
|
|
|
|
|
|
|
|
const errorCodes = context.markers.filter(m => m.code).map(m => m.code).map(Number);
|
|
|
|
const errorCodes = context.markers.filter(m => m.code).map(m => m.code).map(Number);
|
|
|
|
|
|
|
|
|
|
|
|
return worker.getCodeFixesAtPosition(resource.toString(), start, end, errorCodes, formatOptions);
|
|
|
|
return worker.getCodeFixesAtPosition(resource.toString(), start, end, errorCodes, formatOptions);
|
|
|
@ -673,7 +672,7 @@ export class CodeActionAdaptor extends FormatHelper implements monaco.languages.
|
|
|
|
}).then(result => {
|
|
|
|
}).then(result => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
actions: result,
|
|
|
|
actions: result,
|
|
|
|
dispose: () => {}
|
|
|
|
dispose: () => { }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|