Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5ff20194
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,发现更多精彩内容 >>
未验证
提交
5ff20194
编写于
2月 04, 2019
作者:
D
dotnet-automerge-bot
提交者:
GitHub
2月 04, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #33115 from dotnet/merges/dev16.0-preview3-to-master
Merge dev16.0-preview3 to master
上级
a1805016
a4fd0498
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
41 addition
and
47 deletion
+41
-47
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSInputSet.cs
...p/Impl/ProjectSystemShim/CSharpProjectShim.ICSInputSet.cs
+2
-0
src/VisualStudio/Core/Def/Implementation/Experimentation/EnhancedColorExperiment.cs
...Implementation/Experimentation/EnhancedColorExperiment.cs
+10
-29
src/VisualStudio/Core/Def/Implementation/ProjectSystem/Legacy/AbstractLegacyProject.cs
...lementation/ProjectSystem/Legacy/AbstractLegacyProject.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.Connections.cs
...entation/Remote/ServiceHubRemoteHostClient.Connections.cs
+4
-6
src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs
...e/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs
+22
-11
src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProject.vb
.../VisualBasic/Impl/ProjectSystemShim/VisualBasicProject.vb
+2
-0
未找到文件。
src/VisualStudio/CSharp/Impl/ProjectSystemShim/CSharpProjectShim.ICSInputSet.cs
浏览文件 @
5ff20194
...
...
@@ -51,6 +51,8 @@ public void SetOutputFileName(string filename)
{
VisualStudioProject
.
AssemblyName
=
Path
.
GetFileNameWithoutExtension
(
filename
);
}
RefreshBinOutputPath
();
}
public
void
SetOutputFileType
(
OutputFileType
fileType
)
...
...
src/VisualStudio/Core/Def/Implementation/Experimentation/EnhancedColorExperiment.cs
浏览文件 @
5ff20194
...
...
@@ -10,7 +10,6 @@
using
Microsoft.CodeAnalysis.Classification
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.CodeAnalysis.Editor.Shared.Utilities
;
using
Microsoft.CodeAnalysis.Experiments
;
using
Microsoft.VisualStudio.PlatformUI
;
using
Microsoft.VisualStudio.Settings
;
using
Microsoft.VisualStudio.Shell
;
...
...
@@ -26,28 +25,22 @@ namespace Microsoft.VisualStudio.LanguageServices.Experimentation
[
TextViewRole
(
PredefinedTextViewRoles
.
Analyzable
)]
internal
class
EnhancedColorExperiment
:
ForegroundThreadAffinitizedObject
,
IWpfTextViewConnectionListener
,
IDisposable
{
private
const
string
UseEnhancedColorsFlight
=
"UseEnhancedColors"
;
private
const
string
StopEnhancedColorsFlight
=
"StopEnhancedColors"
;
private
const
string
UseEnhancedColorsSetting
=
"WindowManagement.Options.UseEnhancedColorsForManagedLanguages"
;
private
readonly
IExperimentationService
_experimentationService
;
private
readonly
IServiceProvider
_serviceProvider
;
private
EnhancedColorApplier
_colorApplier
;
private
ISettingsManager
_settingsManager
;
private
bool
_isDisposed
=
false
;
private
bool
_inUseEnhancedColorsFlight
;
private
bool
_inStopEnhancedColorsFlight
;
private
bool
_hasTextViewOpened
;
[
ImportingConstructor
]
[
Obsolete
]
private
EnhancedColorExperiment
(
IThreadingContext
threadingContext
,
[
Import
(
typeof
(
SVsServiceProvider
))]
IServiceProvider
serviceProvider
,
VisualStudioExperimentationService
experimentationService
)
private
EnhancedColorExperiment
(
IThreadingContext
threadingContext
,
[
Import
(
typeof
(
SVsServiceProvider
))]
IServiceProvider
serviceProvider
)
:
base
(
threadingContext
)
{
_serviceProvider
=
serviceProvider
;
_experimentationService
=
experimentationService
;
}
public
void
Dispose
()
...
...
@@ -66,21 +59,11 @@ public void SubjectBuffersConnected(IWpfTextView textView, ConnectionReason reas
_hasTextViewOpened
=
true
;
_colorApplier
=
new
EnhancedColorApplier
(
_serviceProvider
);
// Check which experimental flights we are in
_inUseEnhancedColorsFlight
=
_experimentationService
.
IsExperimentEnabled
(
UseEnhancedColorsFlight
);
_inStopEnhancedColorsFlight
=
_experimentationService
.
IsExperimentEnabled
(
StopEnhancedColorsFlight
);
_settingsManager
=
(
ISettingsManager
)
_serviceProvider
.
GetService
(
typeof
(
SVsSettingsPersistenceManager
));
// Do not hook settings changed if we have stopped the experiment.
// We will simply remove the enhanced colors if they are applied.
if
(!
_inStopEnhancedColorsFlight
)
{
// We need to update the theme whenever the Preview Setting changes or the VS Theme changes.
_settingsManager
.
GetSubset
(
UseEnhancedColorsSetting
).
SettingChangedAsync
+=
UseEnhancedColorsSettingChangedAsync
;
VSColorTheme
.
ThemeChanged
+=
VSColorTheme_ThemeChanged
;
}
VsTaskLibraryHelper
.
CreateAndStartTask
(
VsTaskLibraryHelper
.
ServiceInstance
,
VsTaskRunContext
.
UIThreadIdlePriority
,
UpdateThemeColors
);
}
...
...
@@ -117,15 +100,13 @@ private void UpdateThemeColors()
var
useEnhancedColorsSetting
=
_settingsManager
.
GetValueOrDefault
(
UseEnhancedColorsSetting
,
defaultValue
:
0
);
// useEnhancedColorsSetting
// 0 -> use value from flight.
// 1 -> always use enhanced colors (unless the kill flight is active).
// -1 -> never use enhanced colors.
var
inEnhancedFlightOrOptIn
=
_inUseEnhancedColorsFlight
||
useEnhancedColorsSetting
==
1
;
var
inStopFlightOrOptOut
=
_inStopEnhancedColorsFlight
||
useEnhancedColorsSetting
==
-
1
;
// 0 -> use enhanced colors.
// 1 -> use enhanced colors.
// -1 -> don't use enhanced colors.
// Try to set colors appropriately. We will only set colors if the user
// has not customized colors and we consider ourselves the color owner.
if
(
!
inStopFlightOrOptOut
&&
inEnhancedFlightOrOptIn
)
if
(
useEnhancedColorsSetting
!=
-
1
)
{
_colorApplier
.
TrySetEnhancedColors
(
currentThemeId
);
}
...
...
@@ -246,7 +227,7 @@ public void TrySetEnhancedColors(Guid themeId)
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
OperatorOverloaded
,
DarkThemeMethodYellow
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
ControlKeyword
,
DarkThemeControlKeywordPurple
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
StructName
,
DarkThemeStructMint
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
StaticSymbol
,
DefaultForegroundColor
,
DefaultBackgroundColor
,
isBold
:
true
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
StaticSymbol
,
DefaultForegroundColor
,
DefaultBackgroundColor
);
}
else
{
...
...
@@ -257,7 +238,7 @@ public void TrySetEnhancedColors(Guid themeId)
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
ExtensionMethodName
,
LightThemeMethodYellow
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
OperatorOverloaded
,
LightThemeMethodYellow
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
ControlKeyword
,
LightThemeControlKeywordPurple
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
StaticSymbol
,
DefaultForegroundColor
,
DefaultBackgroundColor
,
isBold
:
true
);
UpdateColorItem
(
colorItemMap
,
ClassificationTypeNames
.
StaticSymbol
,
DefaultForegroundColor
,
DefaultBackgroundColor
);
}
}
...
...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/Legacy/AbstractLegacyProject.cs
浏览文件 @
5ff20194
...
...
@@ -180,7 +180,7 @@ protected void RemoveFile(string filename)
VisualStudioProject
.
RemoveSourceFile
(
filename
);
}
pr
ivate
void
RefreshBinOutputPath
()
pr
otected
void
RefreshBinOutputPath
()
{
var
storage
=
Hierarchy
as
IVsBuildPropertyStorage
;
if
(
storage
==
null
)
...
...
src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.Connections.cs
浏览文件 @
5ff20194
...
...
@@ -122,13 +122,11 @@ private static class Connections
await
Task
.
Delay
(
retry_delayInMS
,
cancellationToken
).
ConfigureAwait
(
false
);
}
// crash right away to get better dump. otherwise, we will get dump from async exception
// which most likely lost all valuable data
FatalError
.
ReportUnlessCanceled
(
lastException
);
GC
.
KeepAlive
(
lastException
);
RemoteHostCrashInfoBar
.
ShowInfoBar
(
workspace
);
// unreachable
throw
ExceptionUtilities
.
Unreachable
;
// raise soft crash exception rather than doing hard crash.
// we had enough feedback from users not to crash VS on servicehub failure
throw
new
SoftCrashException
(
"RequestServiceAsync Failed"
,
lastException
,
cancellationToken
);
}
#
region
code
related
to
make
diagnosis
easier
later
...
...
src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs
浏览文件 @
5ff20194
...
...
@@ -47,6 +47,8 @@ private enum GlobalNotificationState
public
static
async
Task
<
RemoteHostClient
>
CreateAsync
(
Workspace
workspace
,
CancellationToken
cancellationToken
)
{
try
{
using
(
Logger
.
LogBlock
(
FunctionId
.
ServiceHubRemoteHostClient_CreateAsync
,
cancellationToken
))
{
...
...
@@ -65,6 +67,15 @@ private enum GlobalNotificationState
return
instance
;
}
}
catch
(
SoftCrashException
)
{
// at this point, we should have shown info bar (RemoteHostCrashInfoBar.ShowInfoBar) to users
// returning null here will disable OOP for this VS session.
// * Note * this is not trying to recover the exception. but giving users to time
// to clean up before restart VS
return
null
;
}
}
public
static
async
Task
<
ServiceHubRemoteHostClient
>
CreateWorkerAsync
(
Workspace
workspace
,
HubClient
primary
,
TimeSpan
timeout
,
CancellationToken
cancellationToken
)
{
...
...
src/VisualStudio/VisualBasic/Impl/ProjectSystemShim/VisualBasicProject.vb
浏览文件 @
5ff20194
...
...
@@ -317,6 +317,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim
VisualStudioProject
.
AssemblyName
=
Path
.
GetFileNameWithoutExtension
(
pCompilerOptions
.
wszExeName
)
End
If
RefreshBinOutputPath
()
_runtimeLibraries
=
VisualStudioProjectOptionsProcessor
.
GetRuntimeLibraries
(
_compilerHost
)
If
Not
_runtimeLibraries
.
SequenceEqual
(
oldRuntimeLibraries
,
StringComparer
.
Ordinal
)
Then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录