Skip to content

Commit

Permalink
match provider type in TaskDefinition and registerTaskProvider
Browse files Browse the repository at this point in the history
1.44.x's new task pick won't work with different names. The
symptom are tasks in the Recent list that don't work, and
the per-provider presentation of tasks that does not work either.
  • Loading branch information
doudou committed Apr 27, 2020
1 parent b11fb07 commit b38707a
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 245 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@
"mode": {
"type": "string",
"enum": [
"update",
"checkout",
"build",
"checkout",
"force-build",
"build-no-deps",
"force-build"
"update"
],
"description": "The operation mode"
}
Expand All @@ -375,11 +375,12 @@
"mode": {
"type": "string",
"enum": [
"osdeps",
"watch",
"build",
"checkout",
"osdeps",
"update-config",
"update",
"checkout"
"update"
],
"description": "The operation mode"
}
Expand Down
15 changes: 11 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ export function activate(extensionContext: vscode.ExtensionContext) {

let outputChannel = vscode.window.createOutputChannel('Rock');
let workspaces = new autoproj.Workspaces(null, outputChannel);
let autoprojTaskProvider = new tasks.AutoprojProvider(workspaces);
let autoprojWorkspaceTaskProvider =
new tasks.AutoprojWorkspaceTaskProvider(workspaces);
let autoprojPackageTaskProvider =
new tasks.AutoprojPackageTaskProvider(workspaces);
let rockContext = new context.Context(vscodeWrapper, workspaces,
new packages.PackageFactory(vscodeWrapper),
outputChannel);

let configManager = new config.ConfigManager(workspaces, vscodeWrapper);
let vscodeWorkspaceManager = new VSCodeWorkspaceManager(
rockContext, workspaces, autoprojTaskProvider, configManager, fileWatcher);
rockContext, workspaces, autoprojWorkspaceTaskProvider,
autoprojPackageTaskProvider, configManager, fileWatcher);
let rockCommands = new commands.Commands(rockContext, vscodeWrapper, configManager);
let rockLint = new linter.Linter(rockContext, vscodeWrapper,
vscode.languages.createDiagnosticCollection('lint'));
Expand All @@ -52,10 +56,13 @@ export function activate(extensionContext: vscode.ExtensionContext) {
)

extensionContext.subscriptions.push(
vscode.workspace.registerTaskProvider('autoproj', autoprojTaskProvider));
vscode.workspace.registerTaskProvider('autoproj-workspace', autoprojWorkspaceTaskProvider));
extensionContext.subscriptions.push(
vscode.workspace.registerTaskProvider('autoproj-package', autoprojPackageTaskProvider));

vscodeWorkspaceManager.initializeWorkspaces(vscodeWrapper.workspaceFolders);
autoprojTaskProvider.reloadTasks();
autoprojPackageTaskProvider.reloadTasks();
autoprojWorkspaceTaskProvider.reloadTasks();
extensionContext.subscriptions.push(
vscode.workspace.onDidChangeWorkspaceFolders((event) => {
vscodeWorkspaceManager.handleWorkspaceChangeEvent(event)
Expand Down

0 comments on commit b38707a

Please sign in to comment.