UpdateFoldings does not update new Tags #141

Open
opened 2018-02-15 15:53:00 -06:00 by zaksmolen · 0 comments
zaksmolen commented 2018-02-15 15:53:00 -06:00 (Migrated from github.com)

In order to only have to do a full file parse once, I created a subclass of NewFolding which has some extra metadata and locations of things within the folding sections. When I run the foldings the first time it gets those fantastically, and the subclass of NewFolding is stored in the FoldingSection's Tag. I see in the UpdateFoldings function though that the Tag is only set when a folding is first created. So small changes, which do in fact affect my folding, aren't updating that Tag element and metadata.

I think that it makes sense to keep the Tag in sync. All that would probably be required would be to store the new NewFolding as the tag in the cases in UpdateFoldings when you are just modifying the existing folding and not creating a new one from scratch.

Is there a reason why this isn't or shouldn't be done?

In order to only have to do a full file parse once, I created a subclass of NewFolding which has some extra metadata and locations of things within the folding sections. When I run the foldings the first time it gets those fantastically, and the subclass of NewFolding is stored in the FoldingSection's Tag. I see in the UpdateFoldings function though that the Tag is only set when a folding is first created. So small changes, which do in fact affect my folding, aren't updating that Tag element and metadata. I think that it makes sense to keep the Tag in sync. All that would probably be required would be to store the new NewFolding as the tag in the cases in UpdateFoldings when you are just modifying the existing folding and not creating a new one from scratch. Is there a reason why this isn't or shouldn't be done?
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/AvalonEdit#141
No description provided.