Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
6c35eed8
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,发现更多精彩内容 >>
提交
6c35eed8
编写于
4月 04, 2018
作者:
J
JieCarolHu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
readonly, updated comments
上级
589ec3c9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
9 deletion
+9
-9
src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
...plementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
+7
-7
src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxTreeFactoryService.cs
...rtable/LanguageServices/CSharpSyntaxTreeFactoryService.cs
+1
-1
src/Workspaces/VisualBasic/Portable/LanguageServices/VisualBasicSyntaxTreeFactoryService.vb
...e/LanguageServices/VisualBasicSyntaxTreeFactoryService.vb
+1
-1
未找到文件。
src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
浏览文件 @
6c35eed8
...
...
@@ -129,13 +129,13 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
// 2) the old file was a different extension that we weren't tracking, which may have now changed
if
(
TryUntrackClosingDocument
(
docCookie
,
pszMkDocumentOld
)
||
TryGetLanguageInformation
(
pszMkDocumentOld
)
==
null
)
{
// Add the new one, if appropriate.
// Add the new one, if appropriate.
TrackOpenedDocument
(
docCookie
,
pszMkDocumentNew
);
}
}
// When starting a diff, the RDT doesn't call OnBeforeDocumentWindowShow, but it does call
// OnAfterAttributeChangeEx for the temporary buffer. The native IDE used this even to
// When starting a diff, the RDT doesn't call OnBeforeDocumentWindowShow, but it does call
// OnAfterAttributeChangeEx for the temporary buffer. The native IDE used this even to
// add misc files, so we'll do the same.
if
((
grfAttribs
&
(
uint
)
__VSRDTATTRIB
.
RDTA_DocDataReloaded
)
!=
0
)
{
...
...
@@ -200,7 +200,7 @@ private void TrackOpenedDocument(uint docCookie, string moniker)
return
;
}
// We don't want to realize the document here unless it's already initialized. Document initialization is watched in
// We don't want to realize the document here unless it's already initialized. Document initialization is watched in
// OnAfterAttributeChangeEx and will retrigger this if it wasn't already done.
if
(
_runningDocumentTable
.
IsDocumentInitialized
(
docCookie
)
&&
!
_docCookieToWorkspaceRegistration
.
ContainsKey
(
docCookie
))
{
...
...
@@ -354,8 +354,8 @@ private ProjectInfo CreateProjectInfoForDocument(string filePath)
var
languageServices
=
Services
.
GetLanguageServices
(
languageInformation
.
LanguageName
);
var
compilationOptionsOpt
=
languageServices
.
GetService
<
ICompilationFactoryService
>()?.
GetDefaultCompilationOptions
();
//
We only have one code file without project file here, so we cannot find out language version of the project
//
Use latest language version which is more permissive. https://devdiv.visualstudio.com/DevDiv/_workitems/edit/575761
//
Use latest language version which is more permissive, as we cannot find out language version of the project which the file belongs to
//
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/575761
var
parseOptionsOpt
=
languageServices
.
GetService
<
ISyntaxTreeFactoryService
>()?.
GetDefaultParseOptionsWithLatestLanguageVersion
();
if
(
parseOptionsOpt
!=
null
&&
...
...
@@ -372,7 +372,7 @@ private ProjectInfo CreateProjectInfoForDocument(string filePath)
var
baseDirectory
=
PathUtilities
.
GetDirectoryName
(
filePath
);
// TODO (https://github.com/dotnet/roslyn/issues/5325, https://github.com/dotnet/roslyn/issues/13886):
// TODO (https://github.com/dotnet/roslyn/issues/5325, https://github.com/dotnet/roslyn/issues/13886):
// - Need to have a way to specify these somewhere in VS options.
// - Use RuntimeMetadataReferenceResolver like in InteractiveEvaluator.CreateMetadataReferenceResolver
// - Add default namespace imports, default metadata references to match csi.rsp
...
...
src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxTreeFactoryService.cs
浏览文件 @
6c35eed8
...
...
@@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis.CSharp
[
ExportLanguageServiceFactory
(
typeof
(
ISyntaxTreeFactoryService
),
LanguageNames
.
CSharp
),
Shared
]
internal
partial
class
CSharpSyntaxTreeFactoryServiceFactory
:
ILanguageServiceFactory
{
private
static
CSharpParseOptions
_parseOptionWithLatestLanguageVersion
=
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Latest
);
private
static
readonly
CSharpParseOptions
_parseOptionWithLatestLanguageVersion
=
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Latest
);
public
ILanguageService
CreateLanguageService
(
HostLanguageServices
provider
)
{
...
...
src/Workspaces/VisualBasic/Portable/LanguageServices/VisualBasicSyntaxTreeFactoryService.vb
浏览文件 @
6c35eed8
...
...
@@ -14,7 +14,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Partial
Friend
Class
VisualBasicSyntaxTreeFactoryServiceFactory
Implements
ILanguageServiceFactory
Private
Shared
_parseOptionsWithLatestLanguageVersion
As
VisualBasicParseOptions
=
VisualBasicParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Latest
)
Private
Shared
ReadOnly
_parseOptionsWithLatestLanguageVersion
As
VisualBasicParseOptions
=
VisualBasicParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Latest
)
Public
Function
CreateLanguageService
(
provider
As
HostLanguageServices
)
As
ILanguageService
Implements
ILanguageServiceFactory
.
CreateLanguageService
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录