Implemented latest feedback from #28235

This commit is contained in:
Dirk Baeumer
2017-06-21 23:44:32 +02:00
parent c9cf1f51b3
commit 2ef8e48de4
21 changed files with 1121 additions and 592 deletions
+17 -1
View File
@@ -41,6 +41,22 @@
"description": "%config.jake.autoDetect%"
}
}
}
},
"taskTypes": [
{
"taskType": "jake",
"required": ["task"],
"properties": {
"task": {
"type": "string",
"description": "The Jake task to customize"
},
"file": {
"type": "string",
"description": "The Jake file that provides the task. Can be omitted."
}
}
}
]
}
}
+10 -2
View File
@@ -81,6 +81,11 @@ function getOutputChannel(): vscode.OutputChannel {
return _channel;
}
interface JakeTaskIdentifier extends vscode.TaskIdentifier {
task: string;
file?: string;
}
async function getJakeTasks(): Promise<vscode.Task[]> {
let workspaceRoot = vscode.workspace.rootPath;
let emptyTasks: vscode.Task[] = [];
@@ -125,8 +130,11 @@ async function getJakeTasks(): Promise<vscode.Task[]> {
let matches = regExp.exec(line);
if (matches && matches.length === 2) {
let taskName = matches[1];
let task = new vscode.ShellTask(taskName, `${jakeCommand} ${taskName}`);
task.identifier = `jake.${taskName}`;
let identifier: JakeTaskIdentifier = {
type: 'jake',
task: taskName
};
let task = new vscode.ShellTask(identifier, taskName, `${jakeCommand} ${taskName}`);
result.push(task);
let lowerCaseLine = line.toLowerCase();
if (lowerCaseLine === 'build') {