Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
6a2b5381
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,发现更多精彩内容 >>
提交
6a2b5381
编写于
3月 27, 2020
作者:
S
Sam Harwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated documentation for compressEmptyLines values
上级
83d491a1
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
51 addition
and
10 deletion
+51
-10
src/Features/CSharp/Portable/Structure/Providers/AccessorDeclarationStructureProvider.cs
...ructure/Providers/AccessorDeclarationStructureProvider.cs
+6
-1
src/Features/CSharp/Portable/Structure/Providers/ConstructorDeclarationStructureProvider.cs
...ture/Providers/ConstructorDeclarationStructureProvider.cs
+4
-1
src/Features/CSharp/Portable/Structure/Providers/ConversionOperatorDeclarationStructureProvider.cs
...oviders/ConversionOperatorDeclarationStructureProvider.cs
+4
-1
src/Features/CSharp/Portable/Structure/Providers/EnumDeclarationStructureProvider.cs
...e/Structure/Providers/EnumDeclarationStructureProvider.cs
+4
-1
src/Features/CSharp/Portable/Structure/Providers/EventDeclarationStructureProvider.cs
.../Structure/Providers/EventDeclarationStructureProvider.cs
+6
-1
src/Features/CSharp/Portable/Structure/Providers/IndexerDeclarationStructureProvider.cs
...tructure/Providers/IndexerDeclarationStructureProvider.cs
+6
-1
src/Features/CSharp/Portable/Structure/Providers/MethodDeclarationStructureProvider.cs
...Structure/Providers/MethodDeclarationStructureProvider.cs
+4
-1
src/Features/CSharp/Portable/Structure/Providers/OperatorDeclarationStructureProvider.cs
...ructure/Providers/OperatorDeclarationStructureProvider.cs
+4
-1
src/Features/CSharp/Portable/Structure/Providers/PropertyDeclarationStructureProvider.cs
...ructure/Providers/PropertyDeclarationStructureProvider.cs
+6
-1
src/Features/CSharp/Portable/Structure/Providers/TypeDeclarationStructureProvider.cs
...e/Structure/Providers/TypeDeclarationStructureProvider.cs
+7
-1
未找到文件。
src/Features/CSharp/Portable/Structure/Providers/AccessorDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -32,10 +32,15 @@ internal class AccessorDeclarationStructureProvider : AbstractSyntaxNodeStructur
SyntaxNodeOrToken
current
=
accessorDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
//
// All accessor kinds are grouped together.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
AsNode
()
is
AccessorDeclarationSyntax
;
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
accessorDeclaration
,
accessorDeclaration
.
Keyword
,
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
AsNode
()
is
AccessorDeclarationSyntax
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/ConstructorDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -32,10 +32,13 @@ internal class ConstructorDeclarationStructureProvider : AbstractSyntaxNodeStruc
SyntaxNodeOrToken
current
=
constructorDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
ConstructorDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
constructorDeclaration
,
constructorDeclaration
.
ParameterList
.
GetLastToken
(
includeZeroWidth
:
true
),
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
ConstructorDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/ConversionOperatorDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -32,10 +32,13 @@ internal class ConversionOperatorDeclarationStructureProvider : AbstractSyntaxNo
SyntaxNodeOrToken
current
=
operatorDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
ConversionOperatorDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
operatorDeclaration
,
operatorDeclaration
.
ParameterList
.
GetLastToken
(
includeZeroWidth
:
true
),
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
ConversionOperatorDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/EnumDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -27,10 +27,13 @@ internal class EnumDeclarationStructureProvider : AbstractSyntaxNodeStructurePro
SyntaxNodeOrToken
current
=
enumDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
AsNode
()
is
BaseTypeDeclarationSyntax
;
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
enumDeclaration
,
enumDeclaration
.
Identifier
,
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
AsNode
()
is
BaseTypeDeclarationSyntax
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
false
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/EventDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -33,10 +33,15 @@ internal class EventDeclarationStructureProvider : AbstractSyntaxNodeStructurePr
SyntaxNodeOrToken
current
=
eventDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
//
// Full events are grouped together with event field definitions.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
EventDeclaration
)
||
nextSibling
.
IsKind
(
SyntaxKind
.
EventFieldDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
eventDeclaration
,
eventDeclaration
.
Identifier
,
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
EventDeclaration
)
||
nextSibling
.
IsKind
(
SyntaxKind
.
EventFieldDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/IndexerDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -33,10 +33,15 @@ internal class IndexerDeclarationStructureProvider : AbstractSyntaxNodeStructure
SyntaxNodeOrToken
current
=
indexerDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
//
// Indexers are grouped together with properties.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
IndexerDeclaration
)
||
nextSibling
.
IsKind
(
SyntaxKind
.
PropertyDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
indexerDeclaration
,
indexerDeclaration
.
ParameterList
.
GetLastToken
(
includeZeroWidth
:
true
),
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
IndexerDeclaration
)
||
nextSibling
.
IsKind
(
SyntaxKind
.
PropertyDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/MethodDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -32,10 +32,13 @@ internal class MethodDeclarationStructureProvider : AbstractSyntaxNodeStructureP
SyntaxNodeOrToken
current
=
methodDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
MethodDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
methodDeclaration
,
methodDeclaration
.
ParameterList
.
GetLastToken
(
includeZeroWidth
:
true
),
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
MethodDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/OperatorDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -32,10 +32,13 @@ internal class OperatorDeclarationStructureProvider : AbstractSyntaxNodeStructur
SyntaxNodeOrToken
current
=
operatorDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
OperatorDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
operatorDeclaration
,
operatorDeclaration
.
ParameterList
.
GetLastToken
(
includeZeroWidth
:
true
),
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
OperatorDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/PropertyDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -32,10 +32,15 @@ internal class PropertyDeclarationStructureProvider : AbstractSyntaxNodeStructur
SyntaxNodeOrToken
current
=
propertyDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
//
// Properties are grouped together with indexers.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
PropertyDeclaration
)
||
nextSibling
.
IsKind
(
SyntaxKind
.
IndexerDeclaration
);
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
propertyDeclaration
,
propertyDeclaration
.
Identifier
,
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
IsKind
(
SyntaxKind
.
PropertyDeclaration
)
||
nextSibling
.
IsKind
(
SyntaxKind
.
IndexerDeclaration
)
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
true
,
type
:
BlockTypes
.
Member
,
isCollapsible
:
true
));
...
...
src/Features/CSharp/Portable/Structure/Providers/TypeDeclarationStructureProvider.cs
浏览文件 @
6a2b5381
...
...
@@ -31,10 +31,16 @@ internal class TypeDeclarationStructureProvider : AbstractSyntaxNodeStructurePro
SyntaxNodeOrToken
current
=
typeDeclaration
;
var
nextSibling
=
current
.
GetNextSibling
();
// Check IsNode to compress blank lines after this node if it is the last child of the parent.
//
// Collapse to Definitions doesn't collapse type nodes, but a Toggle All Outlining would collapse groups
// of types to the compressed form of not showing blank lines. All kinds of types are grouped together.
var
compressEmptyLines
=
!
nextSibling
.
IsNode
||
nextSibling
.
AsNode
()
is
BaseTypeDeclarationSyntax
;
spans
.
AddIfNotNull
(
CSharpStructureHelpers
.
CreateBlockSpan
(
typeDeclaration
,
lastToken
,
compressEmptyLines
:
!
nextSibling
.
IsNode
||
nextSibling
.
AsNode
()
is
BaseTypeDeclarationSyntax
,
compressEmptyLines
:
compressEmptyLines
,
autoCollapse
:
false
,
type
:
BlockTypes
.
Type
,
isCollapsible
:
true
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录