Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
1d91c75e
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,发现更多精彩内容 >>
提交
1d91c75e
编写于
6月 02, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Provide C# options for controlling new Dev15 features.
上级
3f314720
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
70 addition
and
20 deletion
+70
-20
src/Features/Core/Portable/Completion/CompletionOptions.cs
src/Features/Core/Portable/Completion/CompletionOptions.cs
+4
-0
src/Features/Core/Portable/Completion/CompletionOptionsProvider.cs
...res/Core/Portable/Completion/CompletionOptionsProvider.cs
+9
-12
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
+18
-0
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
+6
-0
src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
+12
-0
src/VisualStudio/CSharp/Impl/Options/CSharpSettingsManagerOptionSerializer.cs
...arp/Impl/Options/CSharpSettingsManagerOptionSerializer.cs
+4
-0
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml
...io/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml
+9
-8
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs
...CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs
+2
-0
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageStrings.cs
...udio/CSharp/Impl/Options/IntelliSenseOptionPageStrings.cs
+6
-0
未找到文件。
src/Features/Core/Portable/Completion/CompletionOptions.cs
浏览文件 @
1d91c75e
...
...
@@ -17,5 +17,9 @@ internal static class CompletionOptions
public
static
readonly
Option
<
bool
>
AlwaysShowBuilder
=
new
Option
<
bool
>(
ControllerFeatureName
,
"AlwaysShowBuilder"
,
defaultValue
:
false
);
public
static
readonly
Option
<
bool
>
FilterOutOfScopeLocals
=
new
Option
<
bool
>(
ControllerFeatureName
,
"FilterOutOfScopeLocals"
,
defaultValue
:
true
);
public
static
readonly
Option
<
bool
>
ShowXmlDocCommentCompletion
=
new
Option
<
bool
>(
ControllerFeatureName
,
"ShowXmlDocCommentCompletion"
,
defaultValue
:
true
);
// Dev15 options
public
static
readonly
PerLanguageOption
<
bool
>
ShowCompletionItemFilters
=
new
PerLanguageOption
<
bool
>(
FeatureName
,
nameof
(
ShowCompletionItemFilters
),
defaultValue
:
false
);
public
static
readonly
PerLanguageOption
<
bool
>
HighlightMatchingPortionsOfCompletionListItems
=
new
PerLanguageOption
<
bool
>(
FeatureName
,
nameof
(
HighlightMatchingPortionsOfCompletionListItems
),
defaultValue
:
false
);
}
}
src/Features/Core/Portable/Completion/CompletionOptionsProvider.cs
浏览文件 @
1d91c75e
...
...
@@ -11,17 +11,14 @@ namespace Microsoft.CodeAnalysis.Completion
[
ExportOptionProvider
,
Shared
]
internal
class
CompletionOptionsProvider
:
IOptionProvider
{
private
readonly
IEnumerable
<
IOption
>
_options
=
new
List
<
IOption
>
{
CompletionOptions
.
HideAdvancedMember
s
,
CompletionOptions
.
IncludeKeywords
,
CompletionOptions
.
TriggerOnTyping
,
CompletionOptions
.
TriggerOnTypingLetters
}.
ToImmutableArray
(
);
private
readonly
IEnumerable
<
IOption
>
_options
=
ImmutableArray
.
Create
<
IOption
>(
CompletionOptions
.
HideAdvancedMembers
,
CompletionOptions
.
IncludeKeyword
s
,
CompletionOptions
.
TriggerOnTyping
,
CompletionOptions
.
TriggerOnTypingLetters
,
CompletionOptions
.
ShowCompletionItemFilters
,
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
);
public
IEnumerable
<
IOption
>
GetOptions
()
{
return
_options
;
}
public
IEnumerable
<
IOption
>
GetOptions
()
=>
_options
;
}
}
}
\ No newline at end of file
src/VisualStudio/CSharp/Impl/CSharpVSResources.Designer.cs
浏览文件 @
1d91c75e
...
...
@@ -483,6 +483,15 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Highlight matching portions of completion list items.
/// </summary>
internal
static
string
Option_Highlight_matching_portions_of_completion_list_items
{
get
{
return
ResourceManager
.
GetString
(
"Option_Highlight_matching_portions_of_completion_list_items"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Highlighting.
/// </summary>
...
...
@@ -591,6 +600,15 @@ internal class CSharpVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Show completion item filters.
/// </summary>
internal
static
string
Option_Show_completion_item_filters
{
get
{
return
ResourceManager
.
GetString
(
"Option_Show_completion_item_filters"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Place _keywords in completion lists.
/// </summary>
...
...
src/VisualStudio/CSharp/Impl/CSharpVSResources.resx
浏览文件 @
1d91c75e
...
...
@@ -459,4 +459,10 @@
<data
name=
"Option_Split_string_literals_on_enter"
xml:space=
"preserve"
>
<value>
Split string literals on _enter
</value>
</data>
<data
name=
"Option_Highlight_matching_portions_of_completion_list_items"
xml:space=
"preserve"
>
<value>
Highlight matching portions of completion list items
</value>
</data>
<data
name=
"Option_Show_completion_item_filters"
xml:space=
"preserve"
>
<value>
Show completion item filters
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
浏览文件 @
1d91c75e
...
...
@@ -45,6 +45,18 @@ public int BringUpOnIdentifier
set
{
SetBooleanOption
(
CompletionOptions
.
TriggerOnTypingLetters
,
value
);
}
}
public
int
HighlightMatchingPortionsOfCompletionListItems
{
get
{
return
GetBooleanOption
(
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
);
}
set
{
SetBooleanOption
(
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
,
value
);
}
}
public
int
ShowCompletionItemFilters
{
get
{
return
GetBooleanOption
(
CompletionOptions
.
ShowCompletionItemFilters
);
}
set
{
SetBooleanOption
(
CompletionOptions
.
ShowCompletionItemFilters
,
value
);
}
}
[
Obsolete
(
"This SettingStore option has now been deprecated in favor of CSharpClosedFileDiagnostics"
)]
public
int
ClosedFileDiagnostics
{
...
...
src/VisualStudio/CSharp/Impl/Options/CSharpSettingsManagerOptionSerializer.cs
浏览文件 @
1d91c75e
...
...
@@ -82,6 +82,8 @@ private bool ShouldIncludeOnOffOption(FieldInfo fieldInfo)
{
new
KeyValuePair
<
string
,
IOption
>(
GetStorageKeyForOption
(
CompletionOptions
.
IncludeKeywords
),
CompletionOptions
.
IncludeKeywords
),
new
KeyValuePair
<
string
,
IOption
>(
GetStorageKeyForOption
(
CompletionOptions
.
TriggerOnTypingLetters
),
CompletionOptions
.
TriggerOnTypingLetters
),
new
KeyValuePair
<
string
,
IOption
>(
GetStorageKeyForOption
(
CompletionOptions
.
ShowCompletionItemFilters
),
CompletionOptions
.
ShowCompletionItemFilters
),
new
KeyValuePair
<
string
,
IOption
>(
GetStorageKeyForOption
(
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
),
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
),
});
Type
[]
types
=
new
[]
...
...
@@ -145,6 +147,8 @@ protected override bool SupportsOption(IOption option, string languageName)
{
if
(
option
==
CompletionOptions
.
IncludeKeywords
||
option
==
CompletionOptions
.
TriggerOnTypingLetters
||
option
==
CompletionOptions
.
ShowCompletionItemFilters
||
option
==
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
||
option
.
Feature
==
SimplificationOptions
.
PerLanguageFeatureName
||
option
.
Feature
==
ExtractMethodOptions
.
FeatureName
||
option
.
Feature
==
ServiceFeatureOnOffOptions
.
OptionName
||
...
...
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml
浏览文件 @
1d91c75e
...
...
@@ -27,17 +27,18 @@
<CheckBox x:Uid="ShowSnippets"
x:Name="ShowSnippets"
Content="{x:Static local:IntelliSenseOptionPageStrings.Option_ShowSnippets}" />
<CheckBox x:Uid="InsertNewlineOnEnterWithWholeWord"
x:Name="InsertNewlineOnEnterWithWholeWord"
Content="{x:Static local:IntelliSenseOptionPageStrings.Option_InsertNewlineOnEnterWithWholeWord}" />
<CheckBox x:Uid="Highlight_matching_portions_of_completion_list_items"
x:Name="Highlight_matching_portions_of_completion_list_items"
Content="{x:Static local:IntelliSenseOptionPageStrings.Option_Highlight_matching_portions_of_completion_list_items}" />
<CheckBox x:Uid="Show_completion_item_filters"
x:Name="Show_completion_item_filters"
Content="{x:Static local:IntelliSenseOptionPageStrings.Option_Show_completion_item_filters}" />
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox x:Uid="SelectionInCompletionListGroupBox"
Header="{x:Static local:IntelliSenseOptionPageStrings.Option_SelectionInCompletionList}">
<StackPanel>
<CheckBox x:Uid="InsertNewlineOnEnterWithWholeWord"
x:Name="InsertNewlineOnEnterWithWholeWord"
Content="{x:Static local:IntelliSenseOptionPageStrings.Option_InsertNewlineOnEnterWithWholeWord}" />
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</options:AbstractOptionPageControl>
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageControl.xaml.cs
浏览文件 @
1d91c75e
...
...
@@ -14,6 +14,8 @@ public IntelliSenseOptionPageControl(IServiceProvider serviceProvider) : base(se
{
InitializeComponent
();
BindToOption
(
Show_completion_item_filters
,
CompletionOptions
.
ShowCompletionItemFilters
,
LanguageNames
.
CSharp
);
BindToOption
(
Highlight_matching_portions_of_completion_list_items
,
CompletionOptions
.
HighlightMatchingPortionsOfCompletionListItems
,
LanguageNames
.
CSharp
);
BindToOption
(
InsertNewlineOnEnterWithWholeWord
,
CSharpCompletionOptions
.
AddNewLineOnEnterAfterFullyTypedWord
);
BindToOption
(
ShowSnippets
,
CSharpCompletionOptions
.
IncludeSnippets
);
BindToOption
(
ShowKeywords
,
CompletionOptions
.
IncludeKeywords
,
LanguageNames
.
CSharp
);
...
...
src/VisualStudio/CSharp/Impl/Options/IntelliSenseOptionPageStrings.cs
浏览文件 @
1d91c75e
...
...
@@ -33,5 +33,11 @@ public static string Option_ShowSnippets
{
get
{
return
CSharpVSResources
.
Option_ShowSnippets
;
}
}
public
static
string
Option_Highlight_matching_portions_of_completion_list_items
=>
CSharpVSResources
.
Option_Highlight_matching_portions_of_completion_list_items
;
public
static
string
Option_Show_completion_item_filters
=>
CSharpVSResources
.
Option_Show_completion_item_filters
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录