Skip to content

Commit 5289ed7

Browse files
authored
Merge pull request #111115 from su-jie/intellisense
Add doc for Stream Analytics vs code intellisense
2 parents cdf0a8f + dfdd8e6 commit 5289ed7

File tree

7 files changed

+73
-0
lines changed

7 files changed

+73
-0
lines changed

articles/stream-analytics/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@
199199
href: stream-analytics-tools-for-visual-studio-cicd.md
200200
- name: Visual Studio Code
201201
items:
202+
- name: Complete code with IntelliSense
203+
href: vs-code-intellisense.md
202204
- name: Test locally with sample data
203205
href: visual-studio-code-local-run.md
204206
- name: Test locally with live data
3.79 MB
Loading
1.28 MB
Loading
4.19 MB
Loading
8.68 MB
Loading
3.88 MB
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: IntelliSense in Azure Stream Analytics tools for Visual Studio Code
3+
description: This article describes how to use IntelliSense features in Azure Stream Analytics tools for Visual Studio Code.
4+
ms.service: stream-analytics
5+
author: su-jie
6+
ms.author: sujie
7+
ms.date: 4/11/2020
8+
ms.topic: conceptual
9+
---
10+
# IntelliSense in Azure Stream Analytics tools for Visual Studio Code
11+
12+
IntelliSense is available for [Stream Analytics Query Language](https://docs.microsoft.com/stream-analytics-query/stream-analytics-query-language-reference?toc=https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fstream-analytics%2Ftoc.json&bc=https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fbread%2Ftoc.json) in [Azure Stream Analytics tools for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-bigdatatools.vscode-asa&ssr=false#overview). IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. IntelliSense features are sometimes called by other names such as "code completion", "content assist", and "code hinting".
13+
14+
![IntelliSense demo](./media/vs-code-intellisense/intellisense.gif)
15+
16+
## IntelliSense features
17+
18+
The IntelliSense features in Stream Analytics tools for VS Code are powered by a language service. A language service analyzes your source code and provides intelligent code completions based on language semantics. If a language service knows possible completions, IntelliSense suggestions pop up as you type. If you continue typing, a list of members, such as variables and methods, is filtered to only include members that contain the characters you typed. When you press the `Tab` or `Enter` keys, IntelliSense inserts the member you selected.
19+
20+
You can trigger IntelliSense in any editor window by typing a trigger character, such as the dot character `.`.
21+
22+
![intellisense autocompletion](./media/vs-code-intellisense/auto-completion.gif)
23+
24+
> [!TIP]
25+
> The suggestions widget supports CamelCase filtering. You can type the letters which are uppercased in a method name to limit the suggestions. For example, "cra" will quickly bring up "createApplication".
26+
27+
### Types of completions
28+
29+
Stream Analytics tools for VS Code IntelliSense offers different types of completions, including language server suggestions, snippets, and simple word-based textual completions.
30+
31+
| | | |
32+
| ----- | ------- | ----- |
33+
| Keywords | `keyword`
34+
| Functions | `build-in function`, `user defined function` |
35+
| Data Set Name| `input`, `output`, `intermediate result set`|
36+
| Data Set Column Name|`input`, `intermediate result set`|
37+
|
38+
39+
#### Name completion
40+
41+
Aside from keyword auto-completion, Stream Analytics tools for VS Code reads the list of job input and output names, as well as the names of the columns in your data sources when they are configured. The extension remembers this information to provide name completion capabilities that are useful for entering statements with few keystrokes:
42+
43+
While coding, you don't need to leave the editor to perform searches on job input names, output name, and column names. You can keep your context, find the information you need, insert elements directly into your code, and have IntelliSense complete your typing for you.
44+
45+
Note that you need to configure either local input or live input and save the configuration file to be able to use name completion.
46+
47+
![name completion](./media/vs-code-intellisense/name-completion.gif)
48+
49+
### Parameter Info
50+
51+
The IntelliSense **Parameter Info** option opens a parameters list that provides information about the number, names, and types of the parameters that are required by a function. The parameter in bold indicates the next parameter that is required as you type a function.
52+
53+
The parameter list is also displayed for nested functions. If you type a function as a parameter to another function, the parameter list displays the parameters for the inner function. Then, when the inner function parameter list is complete, the parameter list reverts to displaying the outer function parameters.
54+
55+
![parameter info](./media/vs-code-intellisense/parameter-info.gif)
56+
57+
### Quick Info
58+
59+
As provided by the language service, you can see **Quick Info** for each identifier in your code. Some examples of identifiers are input, output, an intermediate result set, or function. When you move the mouse pointer over an identifier, its declaration is displayed in a pop-up window. The properties and data schemas for inputs, if configured, and intermediate data set are shown.
60+
61+
![quick info](./media/vs-code-intellisense/quick-info.gif)
62+
63+
## Troubleshoot IntelliSense
64+
65+
This issue is caused by missing input configuration which provides data. You can check if a [local input](visual-studio-code-local-run.md#define-a-local-input) or [live input](visual-studio-code-local-run-live-input.md#define-a-live-stream-input) has been configured correctly.
66+
67+
## Next steps
68+
69+
* [Quickstart: Create an Azure Stream Analytics job in Visual Studio Code](quick-create-vs-code.md)
70+
* [Test Stream Analytics queries locally with sample data using Visual Studio Code](visual-studio-code-local-run.md)
71+
* [Test Stream Analytics queries locally against live stream input by using Visual Studio Code](visual-studio-code-local-run-live-input.md)

0 commit comments

Comments
 (0)