提交 36f1d703 编写于 作者: D Daniel Imms

jsdoc and comment cleanup

上级 a0402376
......@@ -458,7 +458,6 @@ export class FileService implements IFileService {
}
public backupFile(resource: uri, content: string): TPromise<IFileStat> {
// TODO: This should not backup unless necessary. Currently this is called for each file on close to ensure the files are backed up.
let registerResourcePromise: TPromise<void>;
if (resource.scheme === 'file') {
registerResourcePromise = this.backupService.registerResourceForBackup(resource);
......
......@@ -265,12 +265,10 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
diag('load() - created text editor model', this.resource, new Date());
if (this.restoreResource) {
// TODO: De-duplicate code
this.createTextEditorModelPromise = this.textFileService.resolveTextContent(this.restoreResource, { acceptTextOnly: true, etag: etag, encoding: this.preferredEncoding }).then((restoreContent) => {
return this.createTextEditorModel(restoreContent.value, content.resource).then(() => {
this.createTextEditorModelPromise = null;
// TODO: This does not set the dirty indicator immediately, making it look like the file is not actually dirty
this.setDirty(true);
this.toDispose.push(this.textEditorModel.onDidChangeRawContent((e: IModelContentChangedEvent) => this.onModelContentChanged(e)));
......
......@@ -322,7 +322,12 @@ export interface ITextFileService extends IDisposable {
*/
confirmSave(resources?: URI[]): ConfirmResult;
// TODO: Doc
/**
* Backs up the provided file to a temporary directory to be used by the hot
* exit feature and crash recovery.
*
* @param resource The resource to backup.
*/
backup(resource: URI): void;
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册