-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: diagnostics not clearing for apex execute #2673
Conversation
@@ -135,7 +135,7 @@ export class ApexLibraryExecuteExecutor extends LibraryCommandletExecutor<ApexEx | |||
protected executionName = nls.localize('apex_execute_text'); | |||
protected logName = 'force_apex_execute_library'; | |||
|
|||
private diagnostics = vscode.languages.createDiagnosticCollection( | |||
public static diagnostics = vscode.languages.createDiagnosticCollection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating new instances of the diagnostics collection was the problem.
|
||
handleApexLibraryDiagnostics(result, this.diagnostics, filePath); | ||
} | ||
handleApexLibraryDiagnostics(result, ApexLibraryExecuteExecutor.diagnostics, filePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handles clearing the collection if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## release/v50.3.0 #2673 +/- ##
================================================
Coverage 76.00% 76.00%
================================================
Files 270 270
Lines 10172 10170 -2
Branches 1155 1154 -1
================================================
- Hits 7731 7730 -1
+ Misses 2122 2120 -2
- Partials 319 320 +1
Continue to review full report at Codecov.
|
What does this PR do?
Fixes an issue where diagnostics would not clear after successfully executing anonymous apex.
What issues does this PR fix or reference?
#2608, @W-8272124@