mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Implemented latest feedback from #28235
This commit is contained in:
@@ -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."
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user