Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d09f1641
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,发现更多精彩内容 >>
提交
d09f1641
编写于
12月 16, 2019
作者:
D
David Barbet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move down content type name definitions and use in ILanguageClient.
上级
4446e2b7
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
23 addition
and
15 deletion
+23
-15
src/EditorFeatures/Text/ContentTypeNames.cs
src/EditorFeatures/Text/ContentTypeNames.cs
+3
-0
src/VisualStudio/Core/Def/Implementation/LanguageClient/LiveShareLanguageServerClient.cs
...mentation/LanguageClient/LiveShareLanguageServerClient.cs
+3
-2
src/VisualStudio/LiveShare/Impl/Client/Debugging/CSharpLspContentTypeLanguageService.cs
...l/Client/Debugging/CSharpLspContentTypeLanguageService.cs
+1
-1
src/VisualStudio/LiveShare/Impl/Client/Debugging/CSharpLspDebuggerIntelliSenseContext.cs
.../Client/Debugging/CSharpLspDebuggerIntelliSenseContext.cs
+2
-1
src/VisualStudio/LiveShare/Impl/Client/Debugging/CSharpLspLanguageService.cs
...veShare/Impl/Client/Debugging/CSharpLspLanguageService.cs
+2
-1
src/VisualStudio/LiveShare/Impl/Client/Debugging/VBLspContentTypeLanguageService.cs
.../Impl/Client/Debugging/VBLspContentTypeLanguageService.cs
+2
-2
src/VisualStudio/LiveShare/Impl/Client/Razor/CSharpLspContainedLanguageProvider.cs
...e/Impl/Client/Razor/CSharpLspContainedLanguageProvider.cs
+2
-1
src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs
...ualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs
+2
-1
src/VisualStudio/LiveShare/Impl/Client/StringConstants.cs
src/VisualStudio/LiveShare/Impl/Client/StringConstants.cs
+0
-2
src/VisualStudio/LiveShare/Impl/Client/Tagger/ModeAwareSyntacticClassificationTaggerProvider.cs
.../Tagger/ModeAwareSyntacticClassificationTaggerProvider.cs
+3
-2
src/VisualStudio/LiveShare/Impl/Client/Tagger/ModeAwareSyntacticClassificationViewTaggerProvider.cs
...ger/ModeAwareSyntacticClassificationViewTaggerProvider.cs
+3
-2
未找到文件。
src/EditorFeatures/Text/ContentTypeNames.cs
浏览文件 @
d09f1641
...
@@ -12,5 +12,8 @@ internal static class ContentTypeNames
...
@@ -12,5 +12,8 @@ internal static class ContentTypeNames
public
const
string
XamlContentType
=
"XAML"
;
public
const
string
XamlContentType
=
"XAML"
;
public
const
string
JavaScriptContentTypeName
=
"JavaScript"
;
public
const
string
JavaScriptContentTypeName
=
"JavaScript"
;
public
const
string
TypeScriptContentTypeName
=
"TypeScript"
;
public
const
string
TypeScriptContentTypeName
=
"TypeScript"
;
public
const
string
CSharpLspContentTypeName
=
"C#_LSP"
;
public
const
string
VBLspContentTypeName
=
"VB_LSP"
;
}
}
}
}
src/VisualStudio/Core/Def/Implementation/LanguageClient/LiveShareLanguageServerClient.cs
浏览文件 @
d09f1641
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.CodeAnalysis.Host.Mef
;
using
Microsoft.CodeAnalysis.Host.Mef
;
using
Microsoft.CodeAnalysis.LanguageServer
;
using
Microsoft.CodeAnalysis.LanguageServer
;
using
Microsoft.CodeAnalysis.Remote
;
using
Microsoft.CodeAnalysis.Remote
;
...
@@ -19,8 +20,8 @@
...
@@ -19,8 +20,8 @@
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
{
{
[
ContentType
(
"C#_LSP"
)]
[
ContentType
(
ContentTypeNames
.
CSharpLspContentTypeName
)]
[
ContentType
(
"VB_LSP"
)]
[
ContentType
(
ContentTypeNames
.
VBLspContentTypeName
)]
[
Export
(
typeof
(
ILanguageClient
))]
[
Export
(
typeof
(
ILanguageClient
))]
internal
class
LiveShareLanguageServerClient
:
ILanguageClient
internal
class
LiveShareLanguageServerClient
:
ILanguageClient
{
{
...
...
src/VisualStudio/LiveShare/Impl/Client/Debugging/CSharpLspContentTypeLanguageService.cs
浏览文件 @
d09f1641
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
namespace
Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Debugging
namespace
Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Debugging
{
{
[
ExportContentTypeLanguageService
(
StringConstant
s
.
CSharpLspContentTypeName
,
StringConstants
.
CSharpLspLanguageName
),
Shared
]
[
ExportContentTypeLanguageService
(
ContentTypeName
s
.
CSharpLspContentTypeName
,
StringConstants
.
CSharpLspLanguageName
),
Shared
]
internal
class
CSharpLspContentTypeLanguageService
:
IContentTypeLanguageService
internal
class
CSharpLspContentTypeLanguageService
:
IContentTypeLanguageService
{
{
private
readonly
IContentTypeRegistryService
_contentTypeRegistry
;
private
readonly
IContentTypeRegistryService
_contentTypeRegistry
;
...
...
src/VisualStudio/LiveShare/Impl/Client/Debugging/CSharpLspDebuggerIntelliSenseContext.cs
浏览文件 @
d09f1641
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.CSharp
;
using
Microsoft.CodeAnalysis.CSharp
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.CodeAnalysis.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Shared.Extensions
;
using
Microsoft.VisualStudio.ComponentModelHost
;
using
Microsoft.VisualStudio.ComponentModelHost
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.DebuggerIntelliSense
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.DebuggerIntelliSense
;
...
@@ -40,7 +41,7 @@ internal class CSharpLspDebuggerIntelliSenseContext : AbstractDebuggerIntelliSen
...
@@ -40,7 +41,7 @@ internal class CSharpLspDebuggerIntelliSenseContext : AbstractDebuggerIntelliSen
currentStatementSpan
,
currentStatementSpan
,
componentModel
,
componentModel
,
serviceProvider
,
serviceProvider
,
componentModel
.
GetService
<
IContentTypeRegistryService
>().
GetContentType
(
StringConstant
s
.
CSharpLspContentTypeName
))
componentModel
.
GetService
<
IContentTypeRegistryService
>().
GetContentType
(
ContentTypeName
s
.
CSharpLspContentTypeName
))
{
{
}
}
...
...
src/VisualStudio/LiveShare/Impl/Client/Debugging/CSharpLspLanguageService.cs
浏览文件 @
d09f1641
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System
;
using
System
;
using
System.Runtime.InteropServices
;
using
System.Runtime.InteropServices
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.VisualStudio.ComponentModelHost
;
using
Microsoft.VisualStudio.ComponentModelHost
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.DebuggerIntelliSense
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.DebuggerIntelliSense
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
;
...
@@ -28,7 +29,7 @@ internal CSharpLspLanguageService(CSharpLspPackage package)
...
@@ -28,7 +29,7 @@ internal CSharpLspLanguageService(CSharpLspPackage package)
public
override
Guid
LanguageServiceId
{
get
;
}
=
LanguageServiceGuid
;
public
override
Guid
LanguageServiceId
{
get
;
}
=
LanguageServiceGuid
;
protected
override
string
ContentTypeName
=>
StringConstant
s
.
CSharpLspContentTypeName
;
protected
override
string
ContentTypeName
=>
ContentTypeName
s
.
CSharpLspContentTypeName
;
protected
override
string
LanguageName
=>
StringConstants
.
CSharpLspLanguageName
;
protected
override
string
LanguageName
=>
StringConstants
.
CSharpLspLanguageName
;
...
...
src/VisualStudio/LiveShare/Impl/Client/Debugging/VBLspContentTypeLanguageService.cs
浏览文件 @
d09f1641
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
namespace
Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Debugging
namespace
Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Debugging
{
{
[
ExportContentTypeLanguageService
(
StringConstant
s
.
VBLspContentTypeName
,
StringConstants
.
VBLspLanguageName
),
Shared
]
[
ExportContentTypeLanguageService
(
ContentTypeName
s
.
VBLspContentTypeName
,
StringConstants
.
VBLspLanguageName
),
Shared
]
internal
class
VBLspContentTypeLanguageService
:
IContentTypeLanguageService
internal
class
VBLspContentTypeLanguageService
:
IContentTypeLanguageService
{
{
private
readonly
IContentTypeRegistryService
_contentTypeRegistry
;
private
readonly
IContentTypeRegistryService
_contentTypeRegistry
;
...
@@ -19,7 +19,7 @@ public VBLspContentTypeLanguageService(IContentTypeRegistryService contentTypeRe
...
@@ -19,7 +19,7 @@ public VBLspContentTypeLanguageService(IContentTypeRegistryService contentTypeRe
public
IContentType
GetDefaultContentType
()
public
IContentType
GetDefaultContentType
()
{
{
return
_contentTypeRegistry
.
GetContentType
(
StringConstant
s
.
VBLspContentTypeName
);
return
_contentTypeRegistry
.
GetContentType
(
ContentTypeName
s
.
VBLspContentTypeName
);
}
}
}
}
...
...
src/VisualStudio/LiveShare/Impl/Client/Razor/CSharpLspContainedLanguageProvider.cs
浏览文件 @
d09f1641
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
using
System
;
using
System
;
using
System.ComponentModel.Composition
;
using
System.ComponentModel.Composition
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.VisualStudio.ComponentModelHost
;
using
Microsoft.VisualStudio.ComponentModelHost
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.Venus
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.Venus
;
using
Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Debugging
;
using
Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Debugging
;
...
@@ -33,7 +34,7 @@ internal class CSharpLspContainedLanguageProvider : IContainedLanguageProvider
...
@@ -33,7 +34,7 @@ internal class CSharpLspContainedLanguageProvider : IContainedLanguageProvider
public
IContentType
GetContentType
(
string
filePath
)
public
IContentType
GetContentType
(
string
filePath
)
{
{
return
_contentTypeRegistry
.
GetContentType
(
StringConstant
s
.
CSharpLspContentTypeName
);
return
_contentTypeRegistry
.
GetContentType
(
ContentTypeName
s
.
CSharpLspContentTypeName
);
}
}
public
IVsContainedLanguage
GetLanguage
(
string
filePath
,
IVsTextBufferCoordinator
bufferCoordinator
)
public
IVsContainedLanguage
GetLanguage
(
string
filePath
,
IVsTextBufferCoordinator
bufferCoordinator
)
...
...
src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs
浏览文件 @
d09f1641
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
using
Task
=
System
.
Threading
.
Tasks
.
Task
;
using
Task
=
System
.
Threading
.
Tasks
.
Task
;
using
LS
=
Microsoft
.
VisualStudio
.
LiveShare
.
LanguageServices
;
using
LS
=
Microsoft
.
VisualStudio
.
LiveShare
.
LanguageServices
;
using
Microsoft.VisualStudio.Shell
;
using
Microsoft.VisualStudio.Shell
;
using
Microsoft.CodeAnalysis.Editor
;
namespace
Microsoft.VisualStudio.LanguageServices.LiveShare.Client
namespace
Microsoft.VisualStudio.LanguageServices.LiveShare.Client
{
{
...
@@ -85,7 +86,7 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
...
@@ -85,7 +86,7 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
})));
})));
languageServerGuestService
.
RegisterClientMetadata
(
languageServerGuestService
.
RegisterClientMetadata
(
new
string
[]
{
StringConstants
.
CSharpLspContentTypeName
,
StringConstants
.
VBLspLanguag
eName
},
new
string
[]
{
ContentTypeNames
.
CSharpLspContentTypeName
,
ContentTypeNames
.
VBLspContentTyp
eName
},
new
LS
.
LanguageServerClientMetadata
(
new
LS
.
LanguageServerClientMetadata
(
true
,
true
,
JObject
.
FromObject
(
new
ServerCapabilities
JObject
.
FromObject
(
new
ServerCapabilities
...
...
src/VisualStudio/LiveShare/Impl/Client/StringConstants.cs
浏览文件 @
d09f1641
...
@@ -19,10 +19,8 @@ internal class StringConstants
...
@@ -19,10 +19,8 @@ internal class StringConstants
public
const
string
AnyProviderName
=
"any"
;
public
const
string
AnyProviderName
=
"any"
;
public
const
string
CSharpLspLanguageName
=
"C#_LSP"
;
public
const
string
CSharpLspLanguageName
=
"C#_LSP"
;
public
const
string
CSharpLspContentTypeName
=
"C#_LSP"
;
public
const
string
TypeScriptLanguageName
=
"TypeScript"
;
public
const
string
TypeScriptLanguageName
=
"TypeScript"
;
public
const
string
VBLspLanguageName
=
"VB_LSP"
;
public
const
string
VBLspLanguageName
=
"VB_LSP"
;
public
const
string
VBLspContentTypeName
=
"VB_LSP"
;
public
const
string
CSharpLspPackageGuidString
=
"BB7E83F4-EAF6-456C-B140-F8C027A7ED8A"
;
public
const
string
CSharpLspPackageGuidString
=
"BB7E83F4-EAF6-456C-B140-F8C027A7ED8A"
;
public
const
string
CSharpLspLanguageServiceGuidString
=
"B7B576C5-24AE-4FBB-965E-382125FD4889"
;
public
const
string
CSharpLspLanguageServiceGuidString
=
"B7B576C5-24AE-4FBB-965E-382125FD4889"
;
...
...
src/VisualStudio/LiveShare/Impl/Client/Tagger/ModeAwareSyntacticClassificationTaggerProvider.cs
浏览文件 @
d09f1641
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
using
System
;
using
System
;
using
System.ComponentModel.Composition
;
using
System.ComponentModel.Composition
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.Text.Tagging
;
using
Microsoft.VisualStudio.Text.Tagging
;
...
@@ -17,7 +18,7 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Tagger
...
@@ -17,7 +18,7 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Tagger
[
Export
(
typeof
(
ITaggerProvider
))]
[
Export
(
typeof
(
ITaggerProvider
))]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
TagType
(
typeof
(
IClassificationTag
))]
[
TagType
(
typeof
(
IClassificationTag
))]
[
ContentType
(
StringConstant
s
.
CSharpLspContentTypeName
)]
[
ContentType
(
ContentTypeName
s
.
CSharpLspContentTypeName
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
internal
sealed
class
CSharpModeAwareSyntacticClassificationTaggerProvider
:
ModeAwareSyntacticClassificationTaggerProvider
internal
sealed
class
CSharpModeAwareSyntacticClassificationTaggerProvider
:
ModeAwareSyntacticClassificationTaggerProvider
{
{
...
@@ -34,7 +35,7 @@ internal sealed class CSharpModeAwareSyntacticClassificationTaggerProvider : Mod
...
@@ -34,7 +35,7 @@ internal sealed class CSharpModeAwareSyntacticClassificationTaggerProvider : Mod
[
Export
(
typeof
(
ITaggerProvider
))]
[
Export
(
typeof
(
ITaggerProvider
))]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
TagType
(
typeof
(
IClassificationTag
))]
[
TagType
(
typeof
(
IClassificationTag
))]
[
ContentType
(
StringConstant
s
.
VBLspContentTypeName
)]
[
ContentType
(
ContentTypeName
s
.
VBLspContentTypeName
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
internal
sealed
class
VBModeAwareSyntacticClassificationTaggerProvider
:
ModeAwareSyntacticClassificationTaggerProvider
internal
sealed
class
VBModeAwareSyntacticClassificationTaggerProvider
:
ModeAwareSyntacticClassificationTaggerProvider
{
{
...
...
src/VisualStudio/LiveShare/Impl/Client/Tagger/ModeAwareSyntacticClassificationViewTaggerProvider.cs
浏览文件 @
d09f1641
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
using
System
;
using
System
;
using
System.ComponentModel.Composition
;
using
System.ComponentModel.Composition
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.Text.Tagging
;
using
Microsoft.VisualStudio.Text.Tagging
;
...
@@ -17,7 +18,7 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Tagger
...
@@ -17,7 +18,7 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client.Tagger
[
Export
(
typeof
(
IViewTaggerProvider
))]
[
Export
(
typeof
(
IViewTaggerProvider
))]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
TagType
(
typeof
(
IClassificationTag
))]
[
TagType
(
typeof
(
IClassificationTag
))]
[
ContentType
(
StringConstant
s
.
CSharpLspContentTypeName
)]
[
ContentType
(
ContentTypeName
s
.
CSharpLspContentTypeName
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
internal
sealed
class
CSharpModeAwareSyntacticClassificationViewTaggerProvider
:
ModeAwareSyntacticClassificationViewTaggerProvider
internal
sealed
class
CSharpModeAwareSyntacticClassificationViewTaggerProvider
:
ModeAwareSyntacticClassificationViewTaggerProvider
{
{
...
@@ -34,7 +35,7 @@ internal sealed class CSharpModeAwareSyntacticClassificationViewTaggerProvider :
...
@@ -34,7 +35,7 @@ internal sealed class CSharpModeAwareSyntacticClassificationViewTaggerProvider :
[
Export
(
typeof
(
IViewTaggerProvider
))]
[
Export
(
typeof
(
IViewTaggerProvider
))]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
PartCreationPolicy
(
CreationPolicy
.
Shared
)]
[
TagType
(
typeof
(
IClassificationTag
))]
[
TagType
(
typeof
(
IClassificationTag
))]
[
ContentType
(
StringConstant
s
.
VBLspContentTypeName
)]
[
ContentType
(
ContentTypeName
s
.
VBLspContentTypeName
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
[
TextViewRole
(
PredefinedTextViewRoles
.
Document
)]
internal
sealed
class
VBModeAwareSyntacticClassificationViewTaggerProvider
:
ModeAwareSyntacticClassificationViewTaggerProvider
internal
sealed
class
VBModeAwareSyntacticClassificationViewTaggerProvider
:
ModeAwareSyntacticClassificationViewTaggerProvider
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录