Archi Forum

Archi Plug-ins => jArchi => Topic started by: Thomas Rohde on March 30, 2023, 06:08:25 AM

Title: Proof of concept - find elements in tree
Post by: Thomas Rohde on March 30, 2023, 06:08:25 AM
In various situations, I found the need to select specific elements in the model browser. This snippet demonstrates a proof of concept of this functionality. The gist (https://gist.github.com/ThomasRohde/ce9ee7b2f94fec8e4b9687e25a2b92fa) prompts the user for a search term, and the script heuristically locates the model browser, and finds any element that matches (case-insensitive sub-string) the search term. Matches will be selected in the model browser.
Title: Re: Proof of concept - find elements in tree
Post by: rchevallier on March 30, 2023, 11:10:06 AM
Thanks but what is the difference with the native filter in the model browser ?
Title: Re: Proof of concept - find elements in tree
Post by: Phil Beauvoir on March 30, 2023, 11:13:56 AM
Thanks, Thomas. I added a comment (https://gist.github.com/ThomasRohde/ce9ee7b2f94fec8e4b9687e25a2b92fa?permalink_comment_id=4520807#gistcomment-4520807) at the gist that simplifies finding the Models Tree.
Title: Re: Proof of concept - find elements in tree
Post by: Thomas Rohde on March 30, 2023, 12:37:13 PM
Thanks! That made it a lot easier. I knew there was a simpler way ... maybe I should spend some time learning the Archi source code  ;)