Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d534f4a8
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,发现更多精彩内容 >>
提交
d534f4a8
编写于
5月 02, 2019
作者:
D
David Barbet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address feedback + fix liveshare dll load
上级
4037e5f4
变更
10
展开全部
显示空白变更内容
内联
并排
Showing
10 changed file
with
53 addition
and
101 deletion
+53
-101
src/Features/LanguageServer/Protocol/LanguageServerProtocol.cs
...eatures/LanguageServer/Protocol/LanguageServerProtocol.cs
+36
-84
src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs
src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs
+2
-1
src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs
src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs
+2
-2
src/VisualStudio/LiveShare/Impl/Microsoft.VisualStudio.LanguageServices.LiveShare.csproj
.../Microsoft.VisualStudio.LanguageServices.LiveShare.csproj
+1
-0
src/VisualStudio/LiveShare/Impl/RunCodeActionsHandler.cs
src/VisualStudio/LiveShare/Impl/RunCodeActionsHandler.cs
+0
-1
src/VisualStudio/LiveShare/Impl/Shims/AbstractLiveShareHandlerShim.cs
...udio/LiveShare/Impl/Shims/AbstractLiveShareHandlerShim.cs
+5
-5
src/VisualStudio/LiveShare/Impl/Shims/DocumentSymbolsHandlerShim.cs
...Studio/LiveShare/Impl/Shims/DocumentSymbolsHandlerShim.cs
+0
-8
src/VisualStudio/Setup/AssemblyRedirects.cs
src/VisualStudio/Setup/AssemblyRedirects.cs
+3
-0
src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
+2
-0
src/VisualStudio/Setup/source.extension.vsixmanifest
src/VisualStudio/Setup/source.extension.vsixmanifest
+2
-0
未找到文件。
src/Features/LanguageServer/Protocol/LanguageServerProtocol.cs
浏览文件 @
d534f4a8
此差异已折叠。
点击以展开。
src/VisualStudio/LiveShare/Impl/ClassificationsHandler.cs
浏览文件 @
d534f4a8
...
...
@@ -23,7 +23,8 @@ internal class ClassificationsHandler : ILspRequestHandler<ClassificationParams,
{
public
async
Task
<
ClassificationSpan
[
]>
HandleAsync
(
ClassificationParams
request
,
RequestContext
<
Solution
>
requestContext
,
CancellationToken
cancellationToken
)
{
var
document
=
requestContext
.
Context
.
GetDocumentFromURI
(
request
.
TextDocument
.
Uri
);
var
actualDocumentURI
=
requestContext
.
ProtocolConverter
.
FromProtocolUri
(
request
.
TextDocument
.
Uri
);
var
document
=
requestContext
.
Context
.
GetDocumentFromURI
(
actualDocumentURI
);
var
classificationService
=
document
?.
Project
.
LanguageServices
.
GetService
<
IClassificationService
>();
if
(
document
==
null
||
classificationService
==
null
)
...
...
src/VisualStudio/LiveShare/Impl/DiagnosticHandler.cs
浏览文件 @
d534f4a8
...
...
@@ -7,6 +7,7 @@
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.ErrorReporting
;
using
Microsoft.CodeAnalysis.LanguageServer
;
using
Microsoft.VisualStudio.LanguageServices.LiveShare.CustomProtocol
;
using
Microsoft.VisualStudio.LiveShare.LanguageServices
;
...
...
@@ -54,9 +55,8 @@ private async void DiagnosticService_DiagnosticsUpdated(object sender, Diagnosti
await
(
NotifyAsync
?.
InvokeAsync
(
this
,
eventArgs
)).
ConfigureAwait
(
false
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
when
(
FatalError
.
ReportWithoutCrash
(
ex
))
{
// TODO - Replace trace
}
}
...
...
src/VisualStudio/LiveShare/Impl/Microsoft.VisualStudio.LanguageServices.LiveShare.csproj
浏览文件 @
d534f4a8
...
...
@@ -6,6 +6,7 @@
<RootNamespace>
Microsoft.VisualStudio.LanguageServices.LiveShare
</RootNamespace>
<AssemblyName>
Microsoft.VisualStudio.LanguageServices.LiveShare
</AssemblyName>
<TargetFramework>
net472
</TargetFramework>
<CreateVsixContainer>
false
</CreateVsixContainer>
<IsPackable>
true
</IsPackable>
<PackageDescription>
A private package for the liveshare team to grant access to LSP implementations.
...
...
src/VisualStudio/LiveShare/Impl/RunCodeActionsHandler.cs
浏览文件 @
d534f4a8
...
...
@@ -43,7 +43,6 @@ public async Task<object> HandleAsync(LSP.ExecuteCommandParams request, RequestC
if
(
request
.
Command
==
RunCodeActionCommandName
)
{
var
runRequest
=
((
JToken
)
request
.
Arguments
.
Single
()).
ToObject
<
RunCodeActionParams
>();
var
codeActions
=
await
GetCodeActionsAsync
(
solution
,
runRequest
.
TextDocument
.
Uri
,
runRequest
.
Range
,
...
...
src/VisualStudio/LiveShare/Impl/Shims/AbstractLiveShareHandlerShim.cs
浏览文件 @
d534f4a8
...
...
@@ -16,21 +16,21 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare
/// </summary>
internal
abstract
class
AbstractLiveShareHandlerShim
<
RequestType
,
ResponseType
>
:
ILspRequestHandler
<
RequestType
,
ResponseType
,
Solution
>
{
private
readonly
IRequestHandler
<
RequestType
,
ResponseType
>
_r
equestHandler
;
private
readonly
Lazy
<
IRequestHandler
,
IRequestHandlerMetadata
>
_lazyR
equestHandler
;
public
AbstractLiveShareHandlerShim
(
IEnumerable
<
Lazy
<
IRequestHandler
,
IRequestHandlerMetadata
>>
requestHandlers
,
string
methodName
)
{
_
r
equestHandler
=
GetRequestHandler
(
requestHandlers
,
methodName
);
_
lazyR
equestHandler
=
GetRequestHandler
(
requestHandlers
,
methodName
);
}
public
virtual
Task
<
ResponseType
>
HandleAsync
(
RequestType
param
,
RequestContext
<
Solution
>
requestContext
,
CancellationToken
cancellationToken
)
{
return
_requestHandler
.
HandleRequestAsync
(
requestContext
.
Context
,
param
,
requestContext
.
ClientCapabilities
,
cancellationToken
);
return
((
IRequestHandler
<
RequestType
,
ResponseType
>)
_lazyRequestHandler
.
Value
)
.
HandleRequestAsync
(
requestContext
.
Context
,
param
,
requestContext
.
ClientCapabilities
,
cancellationToken
);
}
protected
IRequestHandler
<
RequestType
,
ResponseType
>
GetRequestHandler
(
IEnumerable
<
Lazy
<
IRequestHandler
,
IRequestHandlerMetadata
>>
requestHandlers
,
string
methodName
)
protected
Lazy
<
IRequestHandler
,
IRequestHandlerMetadata
>
GetRequestHandler
(
IEnumerable
<
Lazy
<
IRequestHandler
,
IRequestHandlerMetadata
>>
requestHandlers
,
string
methodName
)
{
return
(
IRequestHandler
<
RequestType
,
ResponseType
>)
requestHandlers
.
First
(
handler
=>
handler
.
Metadata
.
MethodName
==
methodName
).
Value
;
return
requestHandlers
.
First
(
handler
=>
handler
.
Metadata
.
MethodName
==
methodName
)
;
}
}
}
src/VisualStudio/LiveShare/Impl/Shims/DocumentSymbolsHandlerShim.cs
浏览文件 @
d534f4a8
...
...
@@ -3,9 +3,6 @@
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.Composition
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.LanguageServer.Handler
;
using
Microsoft.VisualStudio.LanguageServer.Protocol
;
using
Microsoft.VisualStudio.LiveShare.LanguageServices
;
...
...
@@ -20,10 +17,5 @@ public DocumentSymbolsHandlerShim([ImportMany] IEnumerable<Lazy<IRequestHandler,
:
base
(
requestHandlers
,
Methods
.
TextDocumentDocumentSymbolName
)
{
}
public
override
Task
<
object
[
]>
HandleAsync
(
DocumentSymbolParams
param
,
RequestContext
<
Solution
>
requestContext
,
CancellationToken
cancellationToken
)
{
return
base
.
HandleAsync
(
param
,
requestContext
,
cancellationToken
);
}
}
}
src/VisualStudio/Setup/AssemblyRedirects.cs
浏览文件 @
d534f4a8
...
...
@@ -57,6 +57,9 @@
[
assembly
:
ProvideCodeBase
(
CodeBase
=
@"$PackageFolder$\System.Composition.TypedParts.dll"
)]
[
assembly
:
ProvideCodeBase
(
CodeBase
=
@"$PackageFolder$\Humanizer.dll"
)]
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.VisualStudio.LanguageServer.Protocol.dll"
)]
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.VisualStudio.LanguageServer.Protocol.Extensions.dll"
)]
[
assembly
:
ProvideCodeBase
(
CodeBase
=
@"$PackageFolder$\ICSharpCode.Decompiler.dll"
)]
[
assembly
:
ProvideBindingRedirection
(
...
...
src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
浏览文件 @
d534f4a8
...
...
@@ -242,6 +242,8 @@
<NuGetPackageToIncludeInVsix
Include=
"System.Composition.Convention"
/>
<NuGetPackageToIncludeInVsix
Include=
"System.Composition.Hosting"
/>
<NuGetPackageToIncludeInVsix
Include=
"ICSharpCode.Decompiler"
/>
<NuGetPackageToIncludeInVsix
Include=
"Microsoft.VisualStudio.LanguageServer.Protocol"
/>
<NuGetPackageToIncludeInVsix
Include=
"Microsoft.VisualStudio.LanguageServer.Protocol.Extensions"
/>
</ItemGroup>
<ItemGroup>
<VSIXSourceItem
Include=
"$(NuGetPackageRoot)\SQLitePCLRaw.bundle_green\1.1.2\lib\net45\SQLitePCLRaw.batteries_green.dll"
/>
...
...
src/VisualStudio/Setup/source.extension.vsixmanifest
浏览文件 @
d534f4a8
...
...
@@ -60,6 +60,8 @@
<Asset
Type=
"Microsoft.VisualStudio.Analyzer"
d:Source=
"Project"
d:ProjectName=
"XamlVisualStudio"
Path=
"|XamlVisualStudio|"
/>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.CodeAnalysis.ExternalAccess.Debugger.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.CodeAnalysis.ExternalAccess.UnitTesting.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.VisualStudio.LanguageServices.LiveShare.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.CodeAnalysis.LanguageServer.Protocol.dll"
/>
</Assets>
<Prerequisites>
<Prerequisite
Id=
"Microsoft.VisualStudio.Component.CoreEditor"
Version=
"[15.0,17.0)"
DisplayName=
"Visual Studio core editor"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录