
Hello,
I've been looking through your samples + the documentation but i've not found how to clear my adornments correctly. Let me place you into the context. I create IntraText adornments that i place all in one shot within specially designated tokens.
Now I succeeded to palce my intratext adornment controls succesfully.
to obtain the adornmentManager i created through the language service
Registration:This is how i get the adornmentManager:
But when i call
It goes to the OnClosed() event of my "IntraTextDebugAdornmentManager" where i perform the following code
The result is that in the current editor's view, the adornements disappear, but the text formatting does not return to normal... what i mean is that all the formatted text spaces where my intratext controls where placed are still there... it s just that those spaces are now empty?!? I also noticed that if i scroll down the editor and back up, Low and Behold my adornment controls all come back on the screen where the spaces where empty!
When I call close How to i:
1- Get rid of all my adornments
2- Get my original text formatting back to how it was before i placed the intra text adornments. I tried callingafter the close() call, but nothing!
Nassim
I've been looking through your samples + the documentation but i've not found how to clear my adornments correctly. Let me place you into the context. I create IntraText adornments that i place all in one shot within specially designated tokens.
Now I succeeded to palce my intratext adornment controls succesfully.
to obtain the adornmentManager i created through the language service
Registration:
RegisterService(new AdornmentManagerProvider<IntraTextDebugAdornmentManager>(typeof(IntraTextDebugAdornmentManager)));
AdornmentManagerProvider<IntraTextDebugAdornmentManager> adornmentProvider = ActiveEditor.Document.Language.GetService<AdornmentManagerProvider<IntraTextDebugAdornmentManager>>();
IntraTextDebugAdornmentManager adornmentManager = (IntraTextDebugAdornmentManager)adornmentProvider.GetAdornmentManager(ActiveEditor.ActiveView);
adornmentManager.Close();
adornmentManager.Close();
protected override void OnClosed()
{
// Remove any remaining adornments
this.AdornmentLayer.RemoveAllAdornments();
}
When I call close How to i:
1- Get rid of all my adornments
2- Get my original text formatting back to how it was before i placed the intra text adornments. I tried calling
ActiveEditor.InvalidateViews();
Nassim