Skip to content

Commit

Permalink
resolve changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hypercubestart committed Oct 18, 2019
1 parent 5322313 commit cdb6d34
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 39 deletions.
4 changes: 2 additions & 2 deletions src/vs/base/common/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ export class LRUCache<K, V> extends LinkedMap<K, V> {
return super.get(key, Touch.None);
}

set(key: K, value: V, touch: Touch = Touch.AsNew): void {
super.set(key, value, touch);
set(key: K, value: V): void {
super.set(key, value);
this.checkTrim();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ export const tocData: ITOCEntry = {
settings: ['terminal.*']
},
{
id: 'features/quickopen',
label: localize('quickopen', "Quick Open"),
settings: ['quickOpen.*']
id: 'features/task',
label: localize('task', "Task"),
settings: ['task.*']
},
{
id: 'features/problems',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import { VIEW_PICKER_PREFIX, OpenViewPickerAction, QuickOpenViewPickerAction, Vi
import { inQuickOpenContext, getQuickNavigateHandler } from 'vs/workbench/browser/parts/quickopen/quickopen';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { registerQuickOpenConfiguration } from 'vs/workbench/contrib/quickopen/common/quickOpenConfig';

// register quick open settings
registerQuickOpenConfiguration();

// Register Actions
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
Expand Down
25 changes: 0 additions & 25 deletions src/vs/workbench/contrib/quickopen/common/quickOpenConfig.ts

This file was deleted.

8 changes: 4 additions & 4 deletions src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as strings from 'vs/base/common/strings';
import { ValidationStatus, ValidationState } from 'vs/base/common/parsers';
import * as UUID from 'vs/base/common/uuid';
import * as Platform from 'vs/base/common/platform';
import { LRUCache, Touch } from 'vs/base/common/map';
import { LRUCache } from 'vs/base/common/map';

import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import { IMarkerService } from 'vs/platform/markers/common/markers';
Expand Down Expand Up @@ -80,7 +80,7 @@ import { IPreferencesService } from 'vs/workbench/services/preferences/common/pr
import { find } from 'vs/base/common/arrays';
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';

const QUICKOPEN_HISTORY_LIMIT_CONFIG = 'quickOpen.history';
const QUICKOPEN_HISTORY_LIMIT_CONFIG = 'task.quickOpen.history';

export namespace ConfigureTaskAction {
export const ID = 'workbench.action.tasks.configureTaskRunner';
Expand Down Expand Up @@ -631,7 +631,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
}

private setRecentlyUsedTask(key: string): void {
this.getRecentlyUsedTasks().set(key, key, Touch.AsOld);
this.getRecentlyUsedTasks().set(key, key);
this.saveRecentlyUsedTasks();
}

Expand Down Expand Up @@ -1925,7 +1925,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
taskMap[key] = task;
}
});
recentlyUsedTasks.keys().forEach(key => {
recentlyUsedTasks.keys().reverse().forEach(key => {
let task = taskMap[key];
if (task) {
recent.push(task);
Expand Down
7 changes: 6 additions & 1 deletion src/vs/workbench/contrib/tasks/browser/task.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ configurationRegistry.registerConfiguration({
}
],
default: true
}
},
'task.quickOpen.history': {
markdownDescription: nls.localize('task.quickOpen.history', "Controls the number of recent items tracked in task quick open dialog."),
type: 'number',
default: 30, minimum: 0, maximum: 30
},
}
});

0 comments on commit cdb6d34

Please sign in to comment.