Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -7,8 +7,7 @@
import 'vs/css!./media/progressService2';
import * as dom from 'vs/base/browser/dom';
import { localize } from 'vs/nls';
import { IActivityBarService, ProgressBadge } from 'vs/workbench/services/activity/common/activityBarService';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { IDisposable } from 'vs/base/common/lifecycle';
import { IProgressService2, IProgressOptions, ProgressLocation, IProgress, IProgressStep, Progress, emptyProgress } from 'vs/platform/progress/common/progress';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
@@ -61,7 +60,6 @@ export class ProgressService2 implements IProgressService2 {
private _stack: [IProgressOptions, Progress<IProgressStep>][] = [];
constructor(
@IActivityBarService private _activityBar: IActivityBarService,
@IViewletService private _viewletService: IViewletService
) {
//
@@ -151,34 +149,34 @@ export class ProgressService2 implements IProgressService2 {
}
// show activity bar
let activityProgress: IDisposable;
let delayHandle = setTimeout(() => {
delayHandle = undefined;
const handle = this._activityBar.showActivity(
viewletId,
new ProgressBadge(() => ''),
'progress-badge'
);
const startTimeVisible = Date.now();
const minTimeVisible = 300;
activityProgress = {
dispose() {
const d = Date.now() - startTimeVisible;
if (d < minTimeVisible) {
// should at least show for Nms
setTimeout(() => handle.dispose(), minTimeVisible - d);
} else {
// shown long enough
handle.dispose();
}
}
};
}, 300);
// let activityProgress: IDisposable;
// let delayHandle = setTimeout(() => {
// delayHandle = undefined;
// const handle = this._activityBar.showActivity(
// viewletId,
// new ProgressBadge(() => ''),
// 'progress-badge'
// );
// const startTimeVisible = Date.now();
// const minTimeVisible = 300;
// activityProgress = {
// dispose() {
// const d = Date.now() - startTimeVisible;
// if (d < minTimeVisible) {
// // should at least show for Nms
// setTimeout(() => handle.dispose(), minTimeVisible - d);
// } else {
// // shown long enough
// handle.dispose();
// }
// }
// };
// }, 300);
always(promise, () => {
clearTimeout(delayHandle);
dispose(activityProgress);
});
// always(promise, () => {
// clearTimeout(delayHandle);
// dispose(activityProgress);
// });
}
}