提交 8ee8248b 编写于 作者: H Heejae Chang

Merge pull request #3170 from heejaechang/errorlist2

fixed a race where build only errors are not cleared correctly
...@@ -144,13 +144,17 @@ private void ConnectToBuildUpdateSource(ExternalErrorDiagnosticUpdateSource erro ...@@ -144,13 +144,17 @@ private void ConnectToBuildUpdateSource(ExternalErrorDiagnosticUpdateSource erro
SetStableState(errorSource.IsInProgress); SetStableState(errorSource.IsInProgress);
errorSource.DiagnosticsUpdated += OnDiagnosticsUpdated;
errorSource.BuildStarted += OnBuildStarted; errorSource.BuildStarted += OnBuildStarted;
} }
private void OnBuildStarted(object sender, bool started) private void OnBuildStarted(object sender, bool started)
{ {
SetStableState(started); SetStableState(started);
if (!started)
{
OnDataAddedOrChanged(this, _buildErrorSource.GetBuildErrors().Length);
}
} }
private void SetStableState(bool started) private void SetStableState(bool started)
...@@ -163,11 +167,6 @@ private void SetStableState(bool started) ...@@ -163,11 +167,6 @@ private void SetStableState(bool started)
public override string SourceTypeIdentifier => StandardTableDataSources.ErrorTableDataSource; public override string SourceTypeIdentifier => StandardTableDataSources.ErrorTableDataSource;
public override string Identifier => IdentifierString; public override string Identifier => IdentifierString;
private void OnDiagnosticsUpdated(object sender, DiagnosticsUpdatedArgs e)
{
OnDataAddedOrChanged(this, _buildErrorSource.GetBuildErrors().Length);
}
protected void OnDataAddedOrChanged(object key, int itemCount) protected void OnDataAddedOrChanged(object key, int itemCount)
{ {
// reuse factory. it is okay to re-use factory since we make sure we remove the factory before // reuse factory. it is okay to re-use factory since we make sure we remove the factory before
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册