Folding without a closer

Anonymous
2012-11-12
2012-11-19
  • Anonymous - 2012-11-12

    I love 6.2 and the added keywords and folding options. I have what I need now as far as syntax highlighting. The only thing I can't get quite right is the folding. I have chunks of data that start with a keyword and a possible closer or really just the next keyword.  The chunk of data I want to fold are for each respective city. Open keyword is CITY and the Close keyword is !****** or if that is missing then it's just right before the next keyword CITY. I've tried various approaches but they fold from the city down instead of just that one city.

    For example:
    CITY  "XYZ"    "CITY1"
    <data>
    <data>
    <data>
    <data>
    !*******************************************************
    CITY  "AAA"    "CITY2"
    <data>
    <data>
    <data>
    <data>

    CITY  "VVV"    "CITY3"
    <data>
    <data>
    <data>
    <data>
    !*******************************************************
    CITY  "WZX"    "CITY4"
    <data>
    <data>
    <data>
    <data>

    Any help appreciated. I will continue testing.

    AGP

     
  • Loreia2

    Loreia2 - 2012-11-13

    Hi AGP,

    no, you can't  do that in UDL.
    There must be some string that closes Folding block.

    BR
    Loreia

     
  • Anonymous - 2012-11-14

    It does have a closing string. As I noted most of the time its !****. I still cant get it to work.

     
  • Loreia2

    Loreia2 - 2012-11-15

    As I noted most of the time its !****

    Yes, most of the time. But as soon as you miss one of those, folding will be broken. Your folding sequence is:
    CITY .... !****
    CITY .... CITY

    Second sequence doesn't work, because "CITY" is not going to close current folding sequence but open new one.

    BR
    Loreia

     
  • AGP

    AGP - 2012-11-15

    ok I just setup a test file with one opener and one closer for each and every city. it still doesn't work. maybe I am misunderstanding how this is supposed to function. I was assuming setting up a fold would make each city collapsible. I don't have a "!" in my Comment & Number and no where else is the "!" listed. Further if I change my closer to @**** and setup the fold to open with CITY and close with @**** then it works, but change to !**** and it doesn't work. I just don't see why it works with one but not the other.

    AGP

     
    Last edit: AGP 2012-11-15
  • Loreia2

    Loreia2 - 2012-11-19

    Hi,

    can you send me that file on udlv20 at googlemail dot com

    BR
    Loreia

     
  • AGP

    AGP - 2012-11-19

    ok I sent you a sample which I think illustrates my particular format. Thanks for looking at it.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks