Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
9f45f7fc
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9f45f7fc
编写于
4月 18, 2017
作者:
S
Saul Rennison
提交者:
Kevin Ransom (msft)
4月 18, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add "Unused opens" to the "Code Fixes" settings (#2876)
上级
f3e952cb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
6 deletion
+21
-6
vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs
...harp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs
+0
-1
vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs
...Sharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs
+1
-0
vsintegration/src/FSharp.Editor/Options/EditorOptions.fs
vsintegration/src/FSharp.Editor/Options/EditorOptions.fs
+4
-2
vsintegration/src/FSharp.UIResources/CodeFixesOptionControl.xaml
...ration/src/FSharp.UIResources/CodeFixesOptionControl.xaml
+2
-1
vsintegration/src/FSharp.UIResources/Strings.Designer.cs
vsintegration/src/FSharp.UIResources/Strings.Designer.cs
+10
-1
vsintegration/src/FSharp.UIResources/Strings.resx
vsintegration/src/FSharp.UIResources/Strings.resx
+4
-1
未找到文件。
vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs
浏览文件 @
9f45f7fc
...
...
@@ -18,7 +18,6 @@ open Microsoft.VisualStudio.FSharp.LanguageService
type
private
TextVersionHash
=
int
// TODO Turn it on when user settings dialog is ready to switch it on and off.
[<
DiagnosticAnalyzer
(
FSharpConstants
.
FSharpLanguageName
)>]
type
internal
SimplifyNameDiagnosticAnalyzer
()
=
inherit
DocumentDiagnosticAnalyzer
()
...
...
vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs
浏览文件 @
9f45f7fc
...
...
@@ -160,6 +160,7 @@ type internal UnusedOpensDiagnosticAnalyzer() =
static
member
GetUnusedOpenRanges
(
document
:
Document
,
options
,
checker
:
FSharpChecker
)
=
asyncMaybe
{
do
!
Option
.
guard
Settings
.
CodeFixes
.
UnusedOpens
let
!
sourceText
=
document
.
GetTextAsync
()
let
!
_,
parsedInput
,
checkResults
=
checker
.
ParseAndCheckDocument
(
document
,
options
,
sourceText
=
sourceText
,
allowStaleResults
=
true
)
let
!
symbolUses
=
checkResults
.
GetAllUsesOfAllSymbolsInFile
()
|>
liftAsync
...
...
vsintegration/src/FSharp.Editor/Options/EditorOptions.fs
浏览文件 @
9f45f7fc
...
...
@@ -24,7 +24,8 @@ type QuickInfoOptions() =
[<
CLIMutable
>]
type
CodeFixesOptions
=
{
SimplifyName
:
bool
}
{
SimplifyName
:
bool
UnusedOpens
:
bool
}
[<
Export
(
typeof
<
ISettings
>)>]
type
internal
Settings
[<
ImportingConstructor
>](
store
:
SettingsStore
)
=
...
...
@@ -37,7 +38,8 @@ type internal Settings [<ImportingConstructor>](store: SettingsStore) =
QuickInfoOptions
()
|>
store
.
RegisterDefault
{
SimplifyName
=
true
}
{
SimplifyName
=
true
UnusedOpens
=
true
}
|>
store
.
RegisterDefault
interface
ISettings
...
...
vsintegration/src/FSharp.UIResources/CodeFixesOptionControl.xaml
浏览文件 @
9f45f7fc
...
...
@@ -21,7 +21,8 @@
<StackPanel>
<CheckBox x:Name="simplifyName" IsChecked="{Binding SimplifyName}"
Content="{x:Static local:Strings.Simplify_name_code_fix}"/>
<StackPanel Margin="15 0 0 0"/>
<CheckBox x:Name="unusedOpens" IsChecked="{Binding UnusedOpens}"
Content="{x:Static local:Strings.Unused_opens_code_fix}"/>
</StackPanel>
</GroupBox>
</StackPanel>
...
...
vsintegration/src/FSharp.UIResources/Strings.Designer.cs
浏览文件 @
9f45f7fc
...
...
@@ -133,7 +133,7 @@ public class Strings {
}
/// <summary>
/// Looks up a localized string similar to Simplify
Name
.
/// Looks up a localized string similar to Simplify
names (remove unnecessary qualifiers)
.
/// </summary>
public
static
string
Simplify_name_code_fix
{
get
{
...
...
@@ -149,5 +149,14 @@ public class Strings {
return
ResourceManager
.
GetString
(
"Solid_underline"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Remove unused open statements.
/// </summary>
public
static
string
Unused_opens_code_fix
{
get
{
return
ResourceManager
.
GetString
(
"Unused_opens_code_fix"
,
resourceCulture
);
}
}
}
}
vsintegration/src/FSharp.UIResources/Strings.resx
浏览文件 @
9f45f7fc
...
...
@@ -142,9 +142,12 @@
<value>
S_how navigation links as
</value>
</data>
<data
name=
"Simplify_name_code_fix"
xml:space=
"preserve"
>
<value>
Simplify
Name
</value>
<value>
Simplify
names (remove unnecessary qualifiers)
</value>
</data>
<data
name=
"Solid_underline"
xml:space=
"preserve"
>
<value>
_Solid underline
</value>
</data>
<data
name=
"Unused_opens_code_fix"
xml:space=
"preserve"
>
<value>
Remove unused open statements
</value>
</data>
</root>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录