Comments (2)
Fixed with this code still don't understand where my mistake was.
Could it be the constructor ??
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
export class TaskProvider implements vscode.TaskProvider {
static esp_tool_task_type = 'esp_tool_tasks';
private tasks: vscode.Task[] | undefined;
// We use a CustomExecution task when state needs to be shared across runs of the task or when
// the task requires use of some VS Code API to run.
// If you don't need to share state between runs and if you don't need to execute VS Code API in your task,
// then a simple ShellExecution or ProcessExecution should be enough.
// Since our build has this shared state, the CustomExecution is used below.
constructor(private workspaceRoot: string) { }
public async provideTasks(): Promise<vscode.Task[]> {
return this.getTasks();
}
public resolveTask(_task: vscode.Task): vscode.Task | undefined {
return this.getTask(_task.definition);
}
private getTasks(): vscode.Task[] {
if (this.tasks !== undefined) {
return this.tasks;
}
this.tasks = [];
this.tasks.push(this.getTask({type:TaskProvider.esp_tool_task_type}));
return this.tasks;
}
private getTask(definition: any): vscode.Task {
if (definition === undefined) {
definition = {type: TaskProvider.esp_tool_task_type};
}
const execution = new vscode.ShellExecution("echo \"Hello World\"");
const problemMatchers = ["$myProblemMatcher"];
return (new vscode.Task(definition, vscode.TaskScope.Workspace,
"Build", "myExtension", execution, problemMatchers));
}
}
from vscode-extension-samples.
Related Issues (20)
- chat-sample: Error from participant: Language model 'copilot-gpt-3.5-turbo' errored, check cause for more details HOT 1
- comment-sample has many error when open developer window HOT 1
- test-provider-sample uses outdated testCoverage proposal HOT 1
- helloworld-test-sample failed when rerun HOT 2
- Error while initiating multi LSP server
- the sample is not compitable with the current api HOT 1
- Running VSCode Extension with Proposed GitHub Copilot Chat Integration (using Chat-Sample)
- timeout has wrong type in decorator-sample HOT 1
- Contributing guide could be improved with getting started section for bugs and issues HOT 3
- wasm:lose an example of a function with a return type of string HOT 2
- lsp-embedded-language-service example (potentially) missing activation event
- Codicons didn't display on WebviewViewProvider
- FTP connection failure on tree-view-sample
- Error compiling test-provider-sample executionCount does not exist on type StatementCoverage HOT 3
- hello-world-web-sample doesn't load if developing in WSL HOT 2
- Authentication provider sample can't log out HOT 1
- Inline completion not working HOT 3
- Custom Text Editor dirty flag inconsistencies
- Create Terminal.shellIntegration sample
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-extension-samples.