Bugfix/atr 966 dev fix coloring part 2#670
Open
SENya1990 wants to merge 57 commits into
Open
Conversation
…r value tasks, added catching of all exceptions, not just operation cancelled exceptions
… to avoid skipping re-tagging on faulted tagging tasks
…om tagger providers because it happens too early when workspace is not initialized yet. The check should be moved to taggers instead. Added check of UI thread to all tagger providers.
…rs + a helper property for Roslyn workspace. In the outlining tagger implemented this flag through the colorizing tagger
…rizer tagger and do it not on the tagger initialization but at the start of the tagging process. Added additional fast check for the possibility to create PXGraph in the project, the check works only if the Roslyn compilation is available. Added subscription to Workspace events to recalculate cached HasReferenceToAcumaticaPlatform flag when needed
…e base tagger + changed outlining tagger code to call sync version
…umber of HasReferenceToAcumaticaPlatform calculatons
…the tagger provider. Tagger should cache it instead.
…ogether and simplified their code
…S while it initialize the main roslyn workspace
…sSuccessful flag (Claude remark)
… from the Copilot review remarks
…last tagging successful indicator + added indicator of whether the parsed document supports tagging
…nto the coloring. Removed redundant code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Overview
Big rework of the syntax coloring.
Removed legacy regex coloring and related code required to switch between different taggers
Implemented Claude and Copilot suggestions
IsLastTaggingSuccessfullflag to the logic to not skip required re-taggingTryAwaitextension method that may be thrown during the taggingMain Fix - rework of the Roslyn workspace caching and calculation of
HasReferenceToAcumaticaPlatformflag.Under manual debug another issue with coloring was detected. It was different from the issues suggested by AI. The issue was caused by the incorrectly cached Roslyn workspace and
HasReferenceToAcumaticaPlatformflag. They were cached not in the tagger but in the tagger provider and calculated just once on the creation of a tagger. The incorrect assumption was that the Roslyn Workspace instance associated with the document does not change through its lifetime. It is not true.The debugging session discovered that on big solutions like Pure when VS opens a document there are several attempts to create a tagger for the document. During the solution loading the document has several stages:
-There is no workspace associated with the document's
ITextBuffer. The found workspace is null.-There is a special "preview" derived "misc files" workspace without projects and metadata. It is added to the document first. Previously, Acuminator incorrectly cached this workspace and assumed that there is no reference to the Acumatica Framework in the solution. That caused one of the coloring bugs (ATR-525) when there was no Acuminator coloring of the first opened document for big solutions
The big rework changes how coloring tagger handles the changes of document's workspace:
HasReferenceToAcumaticaPlatformflag from the tagger provider to the tagger. The base tagger provider type was removed since there was nothing more to cache.HasReferenceToAcumaticaPlatformflag and raise re-tagging on some of these changes.RoslynWorkspaceProvidercomponent was created. It obtains a workspace registration object associated with the document's text buffer and subscribes on itsWorkspaceChangedevent. The component caches the workspace and fires its ownWorkspaceChangedevent that passes old and new workspaces. This component also filters our the useless preview workspace, The tagger subscribes on component'sWorkspaceChangedevent and raise its own tags changed event to update tags based on the info in the new workspace.HasReferenceToAcumaticaPlatformwas optimized