Menu

Unfold all nodes hidden after filtering button: Does it still exist?

j-lon
2016-05-27
2019-11-03
  • j-lon

    j-lon - 2016-05-27

    The documentation refers to the following button:
    Unfold all nodes hidden after filtering

    Has this button been removed in more recent versions of Freeplane? If not, how to I get it on my toolbar?

    JL

     
  • BLOOD WOLF 3

    BLOOD WOLF 3 - 2016-05-28

    what? there was a button for it???
    I help myself with a script which i fire up after filtering:

    def list = c.find{(it.visible == true) && (it.isFolded() == true)}
    list.each{
    it.folded = false
    }
    
     

    Last edit: BLOOD WOLF 3 2016-05-28
  • Dimitry Polivaev

    There was an option to automatically unfold all nodes which became invisible after filtering.

    This option could be toggled using the action you mentioned and it was removed with git commit ffe8a7edab2addf6963f5a688fcfdf85580ffd35 on 2011-08-27 13:35:04 with commit comment "Remove unfoldFilteredAncestor from Filters, unfold them when ancestor node is being unfolded instead"

    If I understand it right script from BLOOD WOLF 3 does the opposite because it checks for it.visible == true and not for it.visible == false

    If you miss anything in current logic please describe your needs and use cases.

     

    Last edit: Dimitry Polivaev 2016-05-29
  • BLOOD WOLF 3

    BLOOD WOLF 3 - 2016-05-29

    oh ok.
    I misunderstood something then. My script is for unfolding all filtered nodes, which are displayed and may be folded after filtering is applied.
    Somehow, if the option to show ancestors and descendants is switched both ON and the map is filtered, some nodes that have the search term included are shown folded, so their descendants are folded and thus not visible. Then, one have manually unfold them to see their descendants.

    I see no use in unfolding all no-fits-to-search-term-nodes (hidden nodes) when in filter-mode. They are filtered by means to be not visible. Why would it make sense to unfold them?

    For me and my use cases:
    -filter with multiple terms. E.g.: filter for "author" AND "year" and get the results for "author" and all publications of this author within the specified year
    -filter for "author" OR "year" and get publications of "author" or all other publications in the specified year
    - complex logic: filter for (("author" AND "year") AND "topic") OR "topic" and get everything fitting to "topic" of "author" of the specified year and everything that has the specefied "topic"

    that would be nice from the searchbox and without filter scripting or double filtering / narrowing filter results. I'm aware of regExp but its syntax is not for my brain, a way to complicated.

    Alternativelly, if one would have scripting access to whole filter logic (including approx.fitting) and could switch ON/OFF visibility of nodes directly - i think a script would be do'able. Then one could build his own quick filter. I'm aware that this can be done with not exposed functions in JAVA/Groovy - but for that one needs to learn how to program. Already scripting is a kind of search-wiki-copy-adjust-test situation. - everything besides that is over the top, not only for me.
    Nevertheless, it would be nice to have access not just to the node's style but its basics like node.visible = false;

    regards,
    tony

     
  • Moni

    Moni - 2019-11-03

    Hello,
    did you ever solve this? I would want to have a filter, that does not hide, but folds all nodes with the criteria that the text is "erl" AND the icon is " button_ok".

    But all I manage is the text:

    def matches = c.find{ it.text.contains('erl') }
    c.statusInfo = matches.size() + " nodes contain 'erl'"
    
    matches.each{it.folded = true}
    

    I could not find a way to identify the image, too.
    I only use it with one image in the nodes with text "erl".
    So it should be only icon.First

    Something like this:

    def matches = c.find{ it.text.contains('erl') AND it.icons.getFirst('button_ok')}
    c.statusInfo = matches.size() + " nodes contain 'erl'"
    
    matches.each{it.folded = true}
    

    But it does not work. Anybody there for help very much appreciated.
    Thank you very much.