vscode APIs
- workspace
- window
- ExtensionContext
- Uri
- commands
- Range
- Position
- TextDocument
- Disposable
- CancellationToken
- languages
- TextEditor
- EventEmitter
- ViewColumn
- QuickPickItem
- Event
- OutputChannel
- MarkdownString
- extensions
- ProviderResult
- env
- StatusBarItem
- StatusBarAlignment
- WorkspaceConfiguration
- Location
- TreeItemCollapsibleState
- TreeItem
- Selection
- CompletionItem
- WorkspaceFolder
- TreeDataProvider
- TextEdit
- CompletionItemKind
- Command
- Hover
- WorkspaceEdit
- WebviewPanel
- Diagnostic
- DiagnosticSeverity
- ConfigurationTarget
- ProgressLocation
- ThemeColor
- TextEditorDecorationType
- TextDocumentChangeEvent
- CodeActionProvider
- HoverProvider
- ThemeIcon
- SnippetString
- CompletionList
- DecorationOptions
- RelativePattern
- DiagnosticCollection
- CompletionContext
- CompletionItemProvider
- CodeAction
- CodeActionKind
- InputBoxOptions
- ColorThemeKind
- ConfigurationChangeEvent
- FileSystemWatcher
- TextEditorEdit
- TextDocumentContentChangeEvent
- Extension
- CodeActionContext
- FileStat
- QuickPickOptions
- DocumentSymbol
- SymbolKind
- QuickInputButton
- Webview
- IndentAction
- debug
- FileSystemError
- TreeView
- TextEditorRevealType
- FileSystemProvider
- FileChangeEvent
- Memento
- Definition
- FormattingOptions
- DocumentFilter
- DecorationRenderOptions
- QuickPick
- WebviewView
- WebviewViewProvider
- DocumentHighlight
- DebugConfiguration
- Terminal
- FileType
- TextDocumentWillSaveEvent
- FileChangeType
- OpenDialogOptions
- DocumentSelector
- DefinitionProvider
- LocationLink
- TextDocumentShowOptions
- DecorationRangeBehavior
- OverviewRulerLane
- SignatureHelp
- SemanticTokens
- Progress
- DocumentFormattingEditProvider
- SemanticTokensBuilder
- WebviewViewResolveContext
- CustomDocument
- DebugSession
- CodeLens
- CodeLensProvider
- WebviewOptions
- WebviewPanelOptions
- FileRenameEvent
- TextDocumentSaveReason
- CancellationTokenSource
- CustomTextEditorProvider
- QuickPickItemKind
- DocumentLink
- DocumentHighlightKind
- FileDecoration
- FileDecorationProvider
- TextDocumentContentProvider
- GlobPattern
- FileDeleteEvent
- SaveDialogOptions
- SignatureInformation
- CompletionItemTag
- FileCreateEvent
- ReferenceContext
- SemanticTokensLegend
- TreeViewVisibilityChangeEvent
- QuickInput
- QuickInputButtons
- CustomReadonlyEditorProvider
- DiagnosticRelatedInformation
- DebugConfigurationProvider
- DebugAdapterExecutable
- DebugAdapterDescriptor
- DebugAdapterDescriptorFactory
- DebugAdapterServer
- FileSearchOptions
- FileSearchProvider
- FileSearchQuery
- TextSearchComplete
- TextSearchOptions
- TextSearchProvider
- TextSearchQuery
- TextSearchResult
- EndOfLine
- FileWillRenameEvent
- FoldingRangeKind
- MessageItem
- TextEditorVisibleRangesChangeEvent
- ColorTheme
- CustomEditorProvider
- CustomDocumentBackupContext
- CustomDocumentBackup
- CustomDocumentOpenContext
- CustomDocumentContentChangeEvent
- SymbolInformation
- DecorationInstanceRenderOptions
- DefinitionLink
- DocumentLinkProvider
- TerminalOptions
- CodeActionProviderMetadata
- MarkedString
- tasks
- Task
- TaskDefinition
- ShellExecution
- TaskGroup
- DocumentRangeFormattingEditProvider
- TaskScope
- TextEditorSelectionChangeKind
- RenameProvider
- TextLine
- WorkspaceFoldersChangeEvent
- TreeItemLabel
Other Related APIs
- vscode#workspace
- vscode#window
- vscode#Uri
- vscode#ExtensionContext
- vscode#Disposable
- vscode#commands
- vscode#TextDocument
- vscode#OutputChannel
- vscode#languages
- vscode#Range
- vscode#CancellationToken
- vscode#env
- vscode#DocumentFormattingEditProvider
- vscode#FormattingOptions
- vscode#TextEdit
- vscode#Task
- vscode#TaskDefinition
- vscode#ShellExecution
- vscode#TaskGroup
- vscode#DocumentRangeFormattingEditProvider
- vscode#TaskScope
vscode#tasks TypeScript Examples
The following examples show how to use
vscode#tasks.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: extension.ts From vscode-crestron-splus with GNU General Public License v3.0 | 5 votes |
export function activate(context: ExtensionContext) {
if (workspace.workspaceFolders === undefined) {
let fileName = window.activeTextEditor.document.uri.path;
let fileFolder = fileName.slice(0, fileName.lastIndexOf("/") + 1);
commands.executeCommand("vscode.openFolder", Uri.parse(fileFolder));
}
let localhelp_command = commands.registerCommand("splus.localHelp", () => {
callShellCommand(workspace.getConfiguration("splus").helpLocation);
});
let webhelp_command = commands.registerCommand("splus.webHelp", openWebHelp);
function rebuildTaskList(): void {
if (taskProvider) {
taskProvider.dispose();
taskProvider = undefined;
}
if (!taskProvider && window.activeTextEditor.document.languageId === "splus-source") {
let splusPromise: Thenable<Task[]> | undefined = undefined;
taskProvider = tasks.registerTaskProvider('splus', {
provideTasks: () => {
if (!splusPromise) {
splusPromise = getCompileTasks();
}
return splusPromise;
},
resolveTask: () => {
return undefined;
}
})
}
}
let thisFormatProvider = new formattingProvider(formatProvider);
languages.registerDocumentFormattingEditProvider({ scheme: 'file', language: 'splus-source' }, thisFormatProvider);
context.subscriptions.push(localhelp_command);
context.subscriptions.push(webhelp_command);
workspace.onDidChangeConfiguration(rebuildTaskList);
workspace.onDidOpenTextDocument(rebuildTaskList);
workspace.onDidSaveTextDocument(rebuildTaskList);
window.onDidChangeActiveTextEditor(rebuildTaskList);
rebuildTaskList();
}