forked from jzoss/Git-Source-Control-Provider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and export a ViewOptionDefinition for controlling visibility of t…
…he diff margin
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace GitScc.Diff | ||
{ | ||
using System.ComponentModel.Composition; | ||
using Microsoft.VisualStudio.Text.Editor; | ||
using Microsoft.VisualStudio.Utilities; | ||
|
||
[Export(typeof(EditorOptionDefinition))] | ||
[Name(GitTextViewOptions.DiffMarginName)] | ||
public sealed class DiffMarginEnabled : ViewOptionDefinition<bool> | ||
{ | ||
public override bool Default | ||
{ | ||
get | ||
{ | ||
return true; | ||
} | ||
} | ||
|
||
public override EditorOptionKey<bool> Key | ||
{ | ||
get | ||
{ | ||
return GitTextViewOptions.DiffMarginId; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace GitScc.Diff | ||
{ | ||
using Microsoft.VisualStudio.Text.Editor; | ||
|
||
public static class GitTextViewOptions | ||
{ | ||
public const string DiffMarginName = "GitScc/DiffMarginName"; | ||
|
||
public static readonly EditorOptionKey<bool> DiffMarginId = new EditorOptionKey<bool>(DiffMarginName); | ||
} | ||
} |