提交 5ea34f9d 编写于 作者: B Benjamin Pasero

return early from confirmSave when we are in extension development mode

上级 2c09792e
......@@ -29,6 +29,7 @@ suite('workspace-namespace', () => {
test('openTextDocument', () => {
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => {
assert.ok(doc);
assert.equal(workspace.textDocuments.length, 1);
});
});
......
......@@ -63,10 +63,6 @@ export class TextFileService extends BrowserTextFileService {
public beforeShutdown(): boolean | TPromise<boolean> {
super.beforeShutdown();
if (!!this.contextService.getConfiguration().env.pluginDevelopmentPath) {
return false; // no veto when we are in plugin dev mode because we want to reload often
}
// Dirty files need treatment on shutdown
if (this.getDirty().length) {
let confirm = this.confirmSave();
......@@ -156,6 +152,10 @@ export class TextFileService extends BrowserTextFileService {
}
public confirmSave(resource?: URI): ConfirmResult {
if (!!this.contextService.getConfiguration().env.pluginDevelopmentPath) {
return ConfirmResult.DONT_SAVE; // no veto when we are in plugin dev mode because we cannot assum we run interactive (e.g. tests)
}
let resourcesToConfirm = this.getDirty(resource);
if (resourcesToConfirm.length === 0) {
return ConfirmResult.DONT_SAVE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册