You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extensibility/about-file-name-extensions.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -15,23 +15,23 @@ manager: douge
15
15
ms.workload:
16
16
- "vssdk"
17
17
---
18
-
# About File Name Extensions
18
+
# About file name extensions
19
19
When you register a file extension of a VSPackage, you associate it with a version of [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)]. This is important if more than one version of [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] is installed on a computer.
20
20
21
-
File extensions for VSPackages are registered under HKEY_CLASSES_ROOT key with a default value that points to the associated programmatic identifier (ProgID).
21
+
File extensions for VSPackages are registered under **HKEY_CLASSES_ROOT** key with a default value that points to the associated programmatic identifier (ProgID).
22
22
23
-
The following is an example of the registration information for the .vcproj file extension:
23
+
The following example shows registration information for the *.vcproj* file extension:
24
24
25
25
```
26
26
HKEY_CLASSES_ROOT\
27
27
.vcproj\
28
28
(default)=" VisualStudio.vcproj.8.0"
29
29
```
30
30
31
-
Files associated with [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] must have a versioned ProgID, such as `VisualStudio.vcproj.8.0`, to allow side-by-side installations of the product to maintain file extension associations among product versions. A version-specific ProgID also allows you to use standard verbs, such as open, edit, and so on, without the concern of overwriting or being overwritten by other applications or versions of [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)].
31
+
Files associated with [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] must have a versioned ProgID, such as `VisualStudio.vcproj.8.0`. A versioned ProgID allows side-by-side installations of the product to maintain file extension associations among product versions. A version-specific ProgID also allows you to use standard verbs, such as open, edit, and so on, without the concern of overwriting or being overwritten by other applications or versions of [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)].
32
32
33
-
In certain cases, the ProgID associated with a file extension should not be changed. For example, the ProgID for the .htm file extension (progid = htmlfile) is hardcoded in a number of places in the operating system, and is widely known and used in association with .htm and .html files.
33
+
In certain cases, the ProgID associated with a file extension should not be changed. For example, the ProgID for the *.htm* file extension (progid = htmlfile) is hard-coded in a number of places in the operating system, and is widely known and used in association with *.htm* and *.html* files.
34
34
35
-
## See Also
36
-
[Registering File Name Extensions for Side-By-Side Deployments](../extensibility/registering-file-name-extensions-for-side-by-side-deployments.md)
37
-
[Specifying File Handlers for File Name Extensions](../extensibility/specifying-file-handlers-for-file-name-extensions.md)
35
+
## See also
36
+
[Register file name extensions for side-by-side deployments](../extensibility/registering-file-name-extensions-for-side-by-side-deployments.md)
37
+
[Specify file handlers for file name extensions](../extensibility/specifying-file-handlers-for-file-name-extensions.md)
Copy file name to clipboardExpand all lines: docs/extensibility/accessing-stored-font-and-color-settings.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ manager: douge
16
16
ms.workload:
17
17
- "vssdk"
18
18
---
19
-
# Accessing Stored Font and Color Settings
19
+
# Access stored font and color settings
20
20
The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] integrated development environment (IDE) stores modified settings for fonts and colors in the registry. You can use the <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage> interface to access these settings.
21
21
22
-
## To Initiate State Persistence of Fonts and Colors
22
+
## To initiate state persistence of fonts and colors
23
23
Font and color information is stored by category in the following registry location: [HKCU\SOFTWARE\Microsoft \Visual Studio\\*\<Visual Studio version>*\FontAndColors\\*\<CategoryGUID>*], where *\<CategoryGUID>* is the category GUID.
24
24
25
25
Therefore, to initiate persistence, a VSPackage must:
@@ -40,7 +40,7 @@ The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] integrated develop
40
40
41
41
- The format of color values that are used.
42
42
43
-
## To Use State Persistence of Fonts and Colors
43
+
## To use state persistence of fonts and colors
44
44
Persisting fonts and colors involves:
45
45
46
46
- Synchronizing the IDE settings with settings stored in the registry.
@@ -58,7 +58,7 @@ The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] integrated develop
58
58
> [!NOTE]
59
59
> Modifications through the **Font and Color** property page generate events independent of <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage>. You can use the <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorCacheManager> interface to determine whether an update of cached font and color settings is needed before calling the methods of the <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage> class.
60
60
61
-
### Storing and Retrieving Information
61
+
### Store and retrieve information
62
62
To obtain or configure information that a user can modify for a named display item in an open category, VSPackages call the <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage.GetItem%2A> and <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage.SetItem%2A> methods.
63
63
64
64
Information about font attributes for a particular category is obtained by using the <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage.GetFont%2A> and <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorStorage.SetFont%2A> methods.
@@ -73,8 +73,8 @@ The [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)] integrated develop
73
73
74
74
The settings of all **Display Items** in a particular **Category** can be obtained by using the methods of the <xref:Microsoft.VisualStudio.Shell.Interop.IVsFontAndColorDefaults> interface.
Copy file name to clipboardExpand all lines: docs/extensibility/accessing-text-layers-by-using-the-legacy-api.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,12 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Accessing Text Layers by Using the Legacy API
17
+
# Access text layers by using the legacy API
18
18
A text layer typically encapsulates some aspect of text layout. For example, a "function-at-a-time" layer hides text before and after a function containing the caret (text insertion point).
19
19
20
20
A text layer resides between a buffer and a view, and it modifies the way the view sees the buffer's contents.
21
21
22
-
## Text Layer Information
22
+
## Text layer information
23
23
The following list describes how text layers work in [!INCLUDE[vsprvs](../code-quality/includes/vsprvs_md.md)]:
24
24
25
25
- The text in a text layer can be adorned with syntax coloring and markers.
@@ -32,7 +32,7 @@ A text layer typically encapsulates some aspect of text layout. For example, a "
32
32
33
33
- A layer can affect only layers that are below it. It cannot affect the layers above it beyond originating standard events.
34
34
35
-
- In the editor, hidden text, synthetic text, and word wrap are implemented as layers. You can implement hidden and synthetic text without interacting directly with the layers. For more information, see [Outlining in a Legacy Language Service](../extensibility/internals/outlining-in-a-legacy-language-service.md) and <xref:Microsoft.VisualStudio.TextManager.Interop.IVsSyntheticTextSession>.
35
+
- In the editor, hidden text, synthetic text, and word wrap are implemented as layers. You can implement hidden and synthetic text without interacting directly with the layers. For more information, see [Outlining in a legacy language service](../extensibility/internals/outlining-in-a-legacy-language-service.md) and <xref:Microsoft.VisualStudio.TextManager.Interop.IVsSyntheticTextSession>.
36
36
37
37
- Each text layer has its own local coordinate system that is exposed through the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer> interface. The line-wrap layer, for example, might contain two lines while the underlying text buffer might contain only one line.
38
38
@@ -42,7 +42,7 @@ A text layer typically encapsulates some aspect of text layout. For example, a "
42
42
43
43
- Besides <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer>, a text layer must implement <xref:Microsoft.VisualStudio.OLE.Interop.IConnectionPointContainer> and fire the events in the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextLinesEvents> interface.
44
44
45
-
## See Also
46
-
[Syntax Coloring in Custom Editors](../extensibility/syntax-coloring-in-custom-editors.md)
47
-
[Using Text Markers with the Legacy API](../extensibility/using-text-markers-with-the-legacy-api.md)
48
-
[Customizing Editor Controls and Menus by Using the Legacy API](../extensibility/customizing-editor-controls-and-menus-by-using-the-legacy-api.md)
45
+
## See also
46
+
[Syntax coloring in custom editors](../extensibility/syntax-coloring-in-custom-editors.md)
47
+
[Use text markers with the legacy API](../extensibility/using-text-markers-with-the-legacy-api.md)
48
+
[Customize editor controls and menus by using the legacy API](../extensibility/customizing-editor-controls-and-menus-by-using-the-legacy-api.md)
Copy file name to clipboardExpand all lines: docs/extensibility/accessing-the-text-buffer-by-using-the-legacy-api.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Accessing the Text Buffer by Using the Legacy API
17
+
# Access the text buffer by using the legacy API
18
18
The text is responsible for managing text streams and file persistence. Although the buffer can read or write other formats, all ordinary communication with the buffer is performed by using Unicode. In the legacy APIs, the text buffer can use either a one- or a two-dimensional coordinate system to identify character locations in the buffer.
19
19
20
-
## One- and Two-Dimension Coordinate Systems
20
+
## One- and two-dimension coordinate systems
21
21
A one-dimensional coordinate position is based on a character's position from the first character in the buffer, such as 147. You use the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextStream> interface to access a one-dimensional location in the buffer. A two-dimensional coordinate system is based on line and index pairs. For example, a character in the buffer at 43, 5 would be on line 43, five characters to the right of the first character in that line. You access a two-dimensional location in the buffer using the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextLines> interface. Both the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextLines> and the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextStream> interfaces are implemented by the text buffer object (<xref:Microsoft.VisualStudio.TextManager.Interop.VsTextBuffer>) and can be accessed from each other by using `QueryInterface`. The following diagram shows these and other key interfaces on <xref:Microsoft.VisualStudio.TextManager.Interop.VsTextBuffer>.
The text buffer's second responsibility is file persistence. To do this, the text buffer object implements <xref:Microsoft.VisualStudio.Shell.Interop.IVsPersistDocData2> and acts as the document data object component for project items and other environment components involved in persistence. For more information, see [Opening and Saving Project Items](../extensibility/internals/opening-and-saving-project-items.md).
29
29
30
-
## In This Section
31
-
[Changing View Settings by Using the Legacy API](../extensibility/changing-view-settings-by-using-the-legacy-api.md)
30
+
## In this section
31
+
[Change view settings by using the legacy API](../extensibility/changing-view-settings-by-using-the-legacy-api.md)
32
32
Explains how to change view settings using the legacy API.
33
33
34
-
[Using the Text Manager to Monitor Global Settings](../extensibility/using-the-text-manager-to-monitor-global-settings.md)
35
-
Explains how to use the text manager to monitor global settings..
34
+
[Use the text manager to monitor global settings](../extensibility/using-the-text-manager-to-monitor-global-settings.md)
35
+
Explains how to use the text manager to monitor global settings.
36
36
37
-
## See Also
38
-
[Inside the Core Editor](../extensibility/inside-the-core-editor.md)
37
+
## See also
38
+
[Inside the core editor](../extensibility/inside-the-core-editor.md)
Copy file name to clipboardExpand all lines: docs/extensibility/accessing-thetext-view-by-using-the-legacy-api.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Accessing theText View by Using the Legacy API
17
+
# Access the text view by using the legacy API
18
18
A text view is a presentation of the text that is stored in a text buffer. You can access the text view by using the legacy API as shown in the following section.
19
19
20
-
## Text View Object
20
+
## Text view object
21
21
Each view is associated with its own text buffer, and the view is a window on the data in the buffer. The following diagram shows the key interfaces of the text view object, which is represented by <xref:Microsoft.VisualStudio.TextManager.Interop.VsTextView>.
22
22
23
23

@@ -27,14 +27,14 @@ Text view object
27
27
28
28
A view enables other services or processes to intercept incoming commands and act on them before the view acts on them. The most common service to do this is a language service. A language service might need, for example, to intercept the command for the ENTER key to provide custom indenting behavior or tool tips.
29
29
30
-
## Adding Functionality to the Text View
30
+
## Add functionality to the text view
31
31
You can customize text view behavior by handling specific keystrokes. To intercept the keystrokes, you implement <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextViewFilter> on your object, and provide a command target (<xref:Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget>) to monitor and intercept commands.
32
32
33
33
The text view uses sequential architecture for command filters. New command filters (<xref:Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget> objects) are added to the sequence by calling the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextView.AddCommandFilter%2A> method.
34
34
35
35
Event notification for the text view is provided by using the <xref:Microsoft.VisualStudio.TextManager.Interop.IVsTextViewEvents> interface. Implement this interface on your client object to receive notification of changes to the text view. Expose this interface to the text view by using the <xref:Microsoft.VisualStudio.OLE.Interop.IConnectionPointContainer> interface on the text view to receive notification of changes from the view.
36
36
37
-
## See Also
37
+
## See also
38
38
39
-
-[Changing View Settings by Using the Legacy API](../extensibility/changing-view-settings-by-using-the-legacy-api.md)
40
-
-[Using the Text Manager to Monitor Global Settings](../extensibility/using-the-text-manager-to-monitor-global-settings.md)
39
+
-[Change view settings by using the legacy API](../extensibility/changing-view-settings-by-using-the-legacy-api.md)
40
+
-[Use the text manager to monitor global settings](../extensibility/using-the-text-manager-to-monitor-global-settings.md)
0 commit comments