Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e49f1ab4
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e49f1ab4
编写于
7月 08, 2020
作者:
A
Ankita Khera
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
trying to get colors to change
上级
96f230cd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
6 deletion
+34
-6
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsFormatDefinition.cs
...eterNameHints/InlineParameterNameHintsFormatDefinition.cs
+5
-0
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTag.cs
...f/InlineParameterNameHints/InlineParameterNameHintsTag.cs
+5
-4
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTagger.cs
...nlineParameterNameHints/InlineParameterNameHintsTagger.cs
+3
-1
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTaggerProvider.cs
...ameterNameHints/InlineParameterNameHintsTaggerProvider.cs
+5
-1
src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2017.xml
src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2017.xml
+8
-0
src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2019.xml
src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2019.xml
+8
-0
未找到文件。
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsFormatDefinition.cs
浏览文件 @
e49f1ab4
...
...
@@ -6,11 +6,16 @@
using
System.ComponentModel.Composition
;
using
System.Windows.Media
;
using
Microsoft.CodeAnalysis.Host.Mef
;
using
Microsoft.VisualStudio.Language.StandardClassification
;
using
Microsoft.VisualStudio.Text.Classification
;
using
Microsoft.VisualStudio.Utilities
;
namespace
Microsoft.CodeAnalysis.Editor.InlineParameterNameHints
{
[
Export
(
typeof
(
EditorFormatDefinition
))]
[
Name
(
InlineParameterNameHintsTag
.
TagId
)]
[
Order
(
After
=
LanguagePriority
.
NaturalLanguage
,
Before
=
LanguagePriority
.
FormalLanguage
)]
[
UserVisible
(
true
)]
internal
sealed
class
InlineParameterNameHintsFormatDefinition
:
EditorFormatDefinition
{
[
ImportingConstructor
]
...
...
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTag.cs
浏览文件 @
e49f1ab4
...
...
@@ -18,6 +18,7 @@ namespace Microsoft.CodeAnalysis.Editor.InlineParameterNameHints
/// </summary>
internal
class
InlineParameterNameHintsTag
:
IntraTextAdornmentTag
{
public
const
string
TagId
=
"inline parameter name hints"
;
/// <summary>
/// Creates the UIElement on call
/// Uses PositionAffinity.Successor because we want the tag to be associated with the following character
...
...
@@ -41,15 +42,15 @@ private static UIElement CreateElement(string text, double lineHeight, TextForma
FontFamily
=
format
.
Typeface
.
FontFamily
,
//new System.Windows.Media.FontFamily("Consolas"),
FontSize
=
format
.
FontRenderingEmSize
-
1
,
Padding
=
new
Thickness
(
0
),
Background
=
System
.
Windows
.
Media
.
Brushes
.
Lavender
,
Foreground
=
System
.
Windows
.
Media
.
Brushes
.
Gray
Background
=
format
.
BackgroundBrush
,
//
System.Windows.Media.Brushes.Lavender,
Foreground
=
format
.
ForegroundBrush
//
System.Windows.Media.Brushes.Gray
};
var
border
=
new
Border
{
CornerRadius
=
new
CornerRadius
(
2
),
Background
=
System
.
Windows
.
Media
.
Brushes
.
Lavender
,
BorderBrush
=
System
.
Windows
.
Media
.
Brushes
.
Lavender
,
Background
=
format
.
BackgroundBrush
,
//
System.Windows.Media.Brushes.Lavender,
BorderBrush
=
format
.
BackgroundBrush
,
//
System.Windows.Media.Brushes.Lavender,
BorderThickness
=
new
Thickness
(
1
),
VerticalAlignment
=
VerticalAlignment
.
Center
,
Height
=
lineHeight
,
...
...
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTagger.cs
浏览文件 @
e49f1ab4
...
...
@@ -28,6 +28,7 @@ internal sealed class InlineParameterNameHintsTagger : ITagger<IntraTextAdornmen
private
ITextSnapshot
_cacheSnapshot
;
private
readonly
IClassificationFormatMap
_formatMap
;
private
TextFormattingRunProperties
_format
;
private
readonly
IClassificationType
_keyword
;
public
event
EventHandler
<
SnapshotSpanEventArgs
>
TagsChanged
;
...
...
@@ -38,6 +39,7 @@ public InlineParameterNameHintsTagger(InlineParameterNameHintsTaggerProvider tag
_buffer
=
buffer
;
_tagAggregator
=
tagAggregator
;
_formatMap
=
taggerProvider
.
ClassificationFormatMapService
.
GetClassificationFormatMap
(
textView
);
_keyword
=
taggerProvider
.
ClassificationTypeRegistryService
.
GetClassificationType
(
InlineParameterNameHintsTag
.
TagId
);
_formatMap
.
ClassificationFormatMappingChanged
+=
this
.
OnClassificationFormatMappingChanged
;
_format
=
_formatMap
.
DefaultTextProperties
;
_tagAggregator
.
TagsChanged
+=
OnTagAggregatorTagsChanged
;
...
...
@@ -67,7 +69,7 @@ private TextFormattingRunProperties Format
get
{
if
(
_format
==
null
)
_format
=
_formatMap
.
DefaultTextProperties
;
_format
=
_formatMap
.
GetTextProperties
(
_keyword
)
;
return
_format
;
}
...
...
src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTaggerProvider.cs
浏览文件 @
e49f1ab4
...
...
@@ -25,13 +25,17 @@ internal class InlineParameterNameHintsTaggerProvider : IViewTaggerProvider
{
private
readonly
IBufferTagAggregatorFactoryService
_bufferTagAggregatorFactoryService
;
public
readonly
IClassificationFormatMapService
ClassificationFormatMapService
;
public
readonly
IClassificationTypeRegistryService
ClassificationTypeRegistryService
;
[
ImportingConstructor
]
[
Obsolete
(
MefConstruction
.
ImportingConstructorMessage
,
error
:
true
)]
public
InlineParameterNameHintsTaggerProvider
(
IBufferTagAggregatorFactoryService
bufferTagAggregatorFactoryService
,
[
Import
]
IClassificationFormatMapService
classificationFormatMapService
)
public
InlineParameterNameHintsTaggerProvider
(
IBufferTagAggregatorFactoryService
bufferTagAggregatorFactoryService
,
[
Import
]
IClassificationFormatMapService
classificationFormatMapService
,
[
Import
]
IClassificationTypeRegistryService
classificationTypeRegistryService
)
{
_bufferTagAggregatorFactoryService
=
bufferTagAggregatorFactoryService
;
this
.
ClassificationFormatMapService
=
classificationFormatMapService
;
this
.
ClassificationTypeRegistryService
=
classificationTypeRegistryService
;
}
/*
...
...
src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2017.xml
浏览文件 @
e49f1ab4
...
...
@@ -63,6 +63,10 @@
</Color>
<Color
Name=
"label name"
>
</Color>
<Color
Name=
"inline parameter name hints"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
<Background
Type=
"CT_RAW"
Source=
"FFE6E6FA"
/>
</Color>
<Color
Name=
"xml doc comment - attribute name"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
</Color>
...
...
@@ -214,6 +218,10 @@
</Color>
<Color
Name=
"label name"
>
</Color>
<Color
Name=
"inline parameter name hints"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
<Background
Type=
"CT_RAW"
Source=
"FFE6E6FA"
/>
</Color>
<Color
Name=
"xml doc comment - attribute name"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
</Color>
...
...
src/VisualStudio/Core/Def/ColorSchemes/VisualStudio2019.xml
浏览文件 @
e49f1ab4
...
...
@@ -69,6 +69,10 @@
</Color>
<Color
Name=
"label name"
>
</Color>
<Color
Name=
"inline parameter name hints"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
<Background
Type=
"CT_RAW"
Source=
"FFE6E6FA"
/>
</Color>
<Color
Name=
"xml doc comment - attribute name"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
</Color>
...
...
@@ -226,6 +230,10 @@
</Color>
<Color
Name=
"label name"
>
</Color>
<Color
Name=
"inline parameter name hints"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
<Background
Type=
"CT_RAW"
Source=
"FFE6E6FA"
/>
</Color>
<Color
Name=
"xml doc comment - attribute name"
>
<Foreground
Type=
"CT_RAW"
Source=
"FF808080"
/>
</Color>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录