SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Foldings doesn't update on write

Last post 08-23-2007 3:18 PM by daniele_dll. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-22-2007 3:20 PM

    Foldings doesn't update on write

    Hi to all,

    this is my first post here!

    I'm writing a small phalanger (php on dotNET 2.0) lightweight rad to let to build plugins for a tool that i'll start to sell soon. I've readed about #D TextEditorControl around the web so instead to write my own i decided to use this!

    I've a really big problem: foldings doesn't update!

    I've writte a small test parser based on php syntax to identfy classes, functions and C#-like regions implemented on top of IFoldingStrategy Interface.

    If i write some test code into Text property of the control, all works correctly, but if i write text from scracth (at runtime) or modify (at runtime) the existing one it doesn't do anything!

     

    What i need to do to update dinamically foldings? I need to attach to DocumentChanged/DocumentAboutToBeChanged events and update foldings manually?
     

    Filed under:
  • 08-23-2007 12:55 PM In reply to

    Re: Foldings doesn't update on write

    You need to call FoldingManager.UpdateFoldings whenever the foldings should be updated.
    Daniel Grunwald
  • 08-23-2007 3:18 PM In reply to

    Re: Foldings doesn't update on write

    Thanks, but how do you suggest to implement this logic? It should be done on:

    - Line Insertion/Removal

    - On { and } insertion/deletion

    - On class/function words insertion deletion 

    - On #region and #endregion adding

     

    This is correct? 

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.