Skip to content

Commit e012faa

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/visualstudio-docs-pr into python5
2 parents a6083a8 + a2fe085 commit e012faa

File tree

61 files changed

+607
-571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+607
-571
lines changed

docs/extensibility/internals/best-practices-for-security-in-vspackages.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ manager: douge
1616
ms.workload:
1717
- "vssdk"
1818
---
19-
# Best Practices for Security in VSPackages
20-
To install the [!INCLUDE[vsipsdk](../../extensibility/includes/vsipsdk_md.md)] on your computer, you must be running in a context with administrative credentials. The basic unit of security and deployment of a [!INCLUDE[vsprvs](../../code-quality/includes/vsprvs_md.md)] application is the [VSPackages](../../extensibility/internals/vspackages.md). A VSPackage must be registered by using [!INCLUDE[vsprvs](../../code-quality/includes/vsprvs_md.md)], which also requires administrative credentials.
19+
# Best practices for security in VSPackages
20+
To install the [!INCLUDE[vsipsdk](../../extensibility/includes/vsipsdk_md.md)] on your computer, you must be running in a context with administrative credentials. The basic unit of security and deployment of a [!INCLUDE[vsprvs](../../code-quality/includes/vsprvs_md.md)] application is the [VSPackage](../../extensibility/internals/vspackages.md). A VSPackage must be registered by using [!INCLUDE[vsprvs](../../code-quality/includes/vsprvs_md.md)], which also requires administrative credentials.
2121

2222
Administrators have full permissions to write to the registry and file system, and to run any code. You must have these permissions to develop, deploy, or install a VSPackage.
2323

2424
As soon as it is installed, a VSPackage is fully trusted. Because of this high level of permission associated with a VSPackage, it is possible to inadvertently install a VSPackage that has malicious intent.
2525

2626
Users should ensure that they install VSPackages only from trusted sources. Companies developing VSPackages should strongly name and sign them, to assure the user that tampering is prevented. Companies developing VSPackages should examine their external dependencies, such as web services and remote installation, to evaluate and correct any security issues.
2727

28-
For more information, see Secure Coding Guidelines for the .NET Framework ([http://msdn.microsoft.com/library/d55zzx87.aspx](http://msdn.microsoft.com/library/d55zzx87.aspx)).
28+
For more information, see [Secure coding guidelines for the .NET Framework](http://msdn.microsoft.com/library/d55zzx87.aspx).
2929

30-
## See Also
31-
[Add-In Security](http://msdn.microsoft.com/Library/44a5c651-6246-4310-b371-65378917c799)
32-
[DDEX Security](http://msdn.microsoft.com/en-us/44a52a70-5c98-450e-993d-4a3b32f69ba8)
30+
## See also
31+
[Add-in security](http://msdn.microsoft.com/Library/44a5c651-6246-4310-b371-65378917c799)
32+
[DDEX security](http://msdn.microsoft.com/en-us/44a52a70-5c98-450e-993d-4a3b32f69ba8)

docs/extensibility/internals/brace-matching-in-a-legacy-language-service.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ manager: douge
1515
ms.workload:
1616
- "vssdk"
1717
---
18-
# Brace Matching in a Legacy Language Service
18+
# Brace matching in a legacy language service
1919
Brace matching helps the developer track language elements that need to occur together, such as parentheses and curly braces. When a developer enters a closing brace, the opening brace is highlighted.
2020

21-
You can match two or three co-occurring elements, called pairs and triples. Triples are sets of three co-occurring elements. For example, in C#, the `foreach` statement forms a triple: "`foreach()`", "`{`", and "`}`". All three elements are highlighted when the closing brace is typed.
21+
You can match two or three co-occurring elements, called pairs and triples. Triples are sets of three co-occurring elements. For example, in C#, the `foreach` statement forms a triple: `foreach()`, `{`, and `}`. All three elements are highlighted when the closing brace is typed.
2222

23-
Legacy language services are implemented as part of a VSPackage, but the newer way to implement language service features is to use MEF extensions. To find out more about the new way to implement brace matching, see [Walkthrough: Displaying Matching Braces](../../extensibility/walkthrough-displaying-matching-braces.md).
23+
Legacy language services are implemented as part of a VSPackage, but the newer way to implement language service features is to use MEF extensions. To find out more about the new way to implement brace matching, see [Walkthrough: Display matching braces](../../extensibility/walkthrough-displaying-matching-braces.md).
2424

2525
> [!NOTE]
2626
> We recommend that you begin to use the new editor API as soon as possible. This will improve the performance of your language service and let you take advantage of new editor features.
@@ -32,22 +32,22 @@ Brace matching helps the developer track language elements that need to occur to
3232

3333
The <xref:Microsoft.VisualStudio.Package.Source.OnCommand%2A> method calls the scanner to tokenize the line and return the token just before the caret. The scanner indicates that a language element pair has been found by setting a token trigger value of <xref:Microsoft.VisualStudio.Package.TokenTriggers> on the current token. The <xref:Microsoft.VisualStudio.Package.Source.OnCommand%2A> method calls the <xref:Microsoft.VisualStudio.Package.Source.MatchBraces%2A> method that in turn calls the <xref:Microsoft.VisualStudio.Package.LanguageService.BeginParse%2A> method with the parse reason value of <xref:Microsoft.VisualStudio.Package.ParseReason> to locate the matching language element. When the matching language element is found, both elements are highlighted.
3434

35-
For a complete description of how typing a brace triggers the brace highlighting, see the "Example Parse Operation" section in the topic [Legacy Language Service Parser and Scanner](../../extensibility/internals/legacy-language-service-parser-and-scanner.md).
35+
For a complete description of how typing a brace triggers the brace highlighting, see the *Example parse operation* section in the article [Legacy language service parser and scanner](../../extensibility/internals/legacy-language-service-parser-and-scanner.md).
3636

37-
## Enabling Support for Brace Matching
38-
The <xref:Microsoft.VisualStudio.Shell.ProvideLanguageServiceAttribute> attribute can set the `MatchBraces`, `MatchBracesAtCaret`, and `ShowMatchingBrace` named parameters that set the corresponding properties of the <xref:Microsoft.VisualStudio.Package.LanguagePreferences> class. Language preference properties can also be set by the user.
37+
## Enable support for brace matching
38+
The <xref:Microsoft.VisualStudio.Shell.ProvideLanguageServiceAttribute> attribute can set the **MatchBraces**, **MatchBracesAtCaret**, and **ShowMatchingBrace** registry entries that set the corresponding properties of the <xref:Microsoft.VisualStudio.Package.LanguagePreferences> class. Language preference properties can also be set by the user.
3939

40-
|Registry Entry|Property|Description|
40+
|Registry entry|Property|Description|
4141
|--------------------|--------------|-----------------|
42-
|`MatchBraces`|<xref:Microsoft.VisualStudio.Package.LanguagePreferences.EnableMatchBraces%2A>|Enables brace matching|
43-
|`MatchBracesAtCaret`|<xref:Microsoft.VisualStudio.Package.LanguagePreferences.EnableMatchBracesAtCaret%2A>|Enables brace matching as the caret moves.|
44-
|`ShowMatchingBrace`|<xref:Microsoft.VisualStudio.Package.LanguagePreferences.EnableShowMatchingBrace%2A>|Highlights the matching brace.|
42+
|MatchBraces|<xref:Microsoft.VisualStudio.Package.LanguagePreferences.EnableMatchBraces%2A>|Enables brace matching.|
43+
|MatchBracesAtCaret|<xref:Microsoft.VisualStudio.Package.LanguagePreferences.EnableMatchBracesAtCaret%2A>|Enables brace matching as the caret moves.|
44+
|ShowMatchingBrace|<xref:Microsoft.VisualStudio.Package.LanguagePreferences.EnableShowMatchingBrace%2A>|Highlights the matching brace.|
4545

46-
## Matching Conditional Statements
46+
## Match conditional statements
4747
You can match conditional statements, such as `if`, `else if`, and `else`, or `#if`, `#elif`, `#else`, `#endif`, in the same way as matching delimiters. You can subclass the <xref:Microsoft.VisualStudio.Package.AuthoringSink> class and provide a method that can add text spans as well as delimiters to the internal array of matching elements.
4848

49-
## Setting the Trigger
50-
The following example shows how to detect matching parentheses, curly braces and square braces, and setting the trigger for it in the scanner. The <xref:Microsoft.VisualStudio.Package.Source.OnCommand%2A> method on the <xref:Microsoft.VisualStudio.Package.Source> class detects the trigger and calls the parser to find the matching pair (see the "Finding the Match" section in this topic). This example is for illustrative purposes only. It assumes that your scanner contains a method `GetNextToken` that identifies and returns tokens from a line of text.
49+
## Set the trigger
50+
The following example shows how to detect matching parentheses, curly braces and square braces, and setting the trigger for it in the scanner. The <xref:Microsoft.VisualStudio.Package.Source.OnCommand%2A> method on the <xref:Microsoft.VisualStudio.Package.Source> class detects the trigger and calls the parser to find the matching pair (see the *Finding the match* section in this article). This example is for illustrative purposes only. It assumes that your scanner contains a method `GetNextToken` that identifies and returns tokens from a line of text.
5151

5252
```csharp
5353
using Microsoft.VisualStudio.Package;
@@ -81,8 +81,8 @@ namespace TestLanguagePackage
8181
}
8282
```
8383

84-
## Matching the Braces
85-
Here is a simplified example for matching the language elements { }, ( ), and [ ], and adding their spans to the <xref:Microsoft.VisualStudio.Package.AuthoringSink> object. This approach is not a recommended approach to parsing source code; it is for illustrative purposes only.
84+
## Match the braces
85+
Here is a simplified example for matching the language elements `{ }`, `( )`, and `[ ]`, and adding their spans to the <xref:Microsoft.VisualStudio.Package.AuthoringSink> object. This approach is not a recommended approach to parsing source code; it is for illustrative purposes only.
8686

8787
```csharp
8888
using Microsoft.VisualStudio.Package;
@@ -132,6 +132,6 @@ namespace TestLanguagePackage
132132
}
133133
```
134134

135-
## See Also
136-
[Legacy Language Service Features](../../extensibility/internals/legacy-language-service-features1.md)
137-
[Legacy Language Service Parser and Scanner](../../extensibility/internals/legacy-language-service-parser-and-scanner.md)
135+
## See also
136+
[Legacy language service features](../../extensibility/internals/legacy-language-service-features1.md)
137+
[Legacy language service parser and scanner](../../extensibility/internals/legacy-language-service-parser-and-scanner.md)

docs/extensibility/internals/catids-for-objects-that-are-typically-used-to-extend-projects.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ manager: douge
1616
ms.workload:
1717
- "vssdk"
1818
---
19-
# CATIDs for Objects That Are Typically Used to Extend Projects
20-
The following table lists CATIDs that are used to extend `Project` and `ProjectItem` automation objects for [!INCLUDE[vbprvb](../../code-quality/includes/vbprvb_md.md)], [!INCLUDE[csprcs](../../data-tools/includes/csprcs_md.md)], and [!INCLUDE[vcprvc](../../code-quality/includes/vcprvc_md.md)] projects. These CATIDs are defined in VSLangProj.olb.
19+
# CATIDs for objects that are typically used to extend projects
20+
The following table lists CATIDs that are used to extend `Project` and `ProjectItem` automation objects for [!INCLUDE[vbprvb](../../code-quality/includes/vbprvb_md.md)], [!INCLUDE[csprcs](../../data-tools/includes/csprcs_md.md)], and [!INCLUDE[vcprvc](../../code-quality/includes/vcprvc_md.md)] projects. These CATIDs are defined in *VSLangProj.olb*.
2121

2222
## Listing of CATIDs
2323

@@ -27,7 +27,7 @@ The following table lists CATIDs that are used to extend `Project` and `ProjectI
2727
|<xref:VSLangProj.PrjCATID.prjCATIDProjectItem>|{610D4615-D0D5-11D2-8599-006097C68E81}|
2828

2929
## Visual Basic CATIDs
30-
The following table lists CATIDs that are used to extend [!INCLUDE[vbprvb](../../code-quality/includes/vbprvb_md.md)] browse objects. They are all defined in VSLangProj.olb.
30+
The following table lists CATIDs that are used to extend [!INCLUDE[vbprvb](../../code-quality/includes/vbprvb_md.md)] browse objects. They are all defined in *VSLangProj.olb*.
3131

3232
|Name|GUID|
3333
|----------|----------|
@@ -38,7 +38,7 @@ The following table lists CATIDs that are used to extend `Project` and `ProjectI
3838
|<xref:VSLangProj.PrjBrowseObjectCATID.prjCATIDVBReferenceBrowseObject>|{2289B812-8191-4e81-B7B3-174045AB0CB5}|
3939

4040
## Visual C# CATIDs
41-
The following CATIDs can be used to extend [!INCLUDE[csprcs](../../data-tools/includes/csprcs_md.md)] browse objects. They are all defined in VSLangProj.olb.
41+
The following CATIDs can be used to extend [!INCLUDE[csprcs](../../data-tools/includes/csprcs_md.md)] browse objects. They are all defined in *VSLangProj.olb*.
4242

4343
|Name|GUID|
4444
|----------|----------|
@@ -69,7 +69,7 @@ const LPOLESTR CVCFileNode::s_wszCATID = L"{EE8299C9-19B6-4f20-ABEA-E1FD9A33B683
6969

7070
|Name|GUID|
7171
|----------|----------|
72-
|`CVCAssemblyReferenceNode` **:**|{FE8299C9-19B6-4f20-ABEA-E1FD9A33B683}|
72+
|`CVCAssemblyReferenceNode`|{FE8299C9-19B6-4f20-ABEA-E1FD9A33B683}|
7373
|`CVCProjectReferenceNode`|{593DCFCE-20A7-48e4-ACA1-49ADE9049887}|
7474
|`CVCActiveXReferenceNode`|{9E8182D3-C60A-44f4-A74B-14C90EF9CACE}|
7575
|`CVCReferences`|{FE8299CA-19B6-4f20-ABEA-E1FD9A33B683}|
@@ -90,6 +90,6 @@ const LPOLESTR CVCReferences::s_wszCATID = L"{FE8299CA-19B6-4f20-ABEA-E1FD9A33B6
9090
|[!INCLUDE[csprcs](../../data-tools/includes/csprcs_md.md)]|{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}|
9191
|[!INCLUDE[vbprvb](../../code-quality/includes/vbprvb_md.md)]|{F184B08F-C81C-45F6-A57F-5ABD9991F28F}|
9292

93-
## See Also
94-
[Adding Project and Project Item Templates](../../extensibility/internals/adding-project-and-project-item-templates.md)
95-
[Registering Project and Item Templates](../../extensibility/internals/registering-project-and-item-templates.md)
93+
## See also
94+
[Add project and project item templates](../../extensibility/internals/adding-project-and-project-item-templates.md)
95+
[Register project and item templates](../../extensibility/internals/registering-project-and-item-templates.md)

0 commit comments

Comments
 (0)