As a follow up to my previous post on how to interact with the browser, here is a real application.
I've been trying to use ELK (the Eclipse Layout Kernel, see: https://www.eclipse.org/elk/) for some time, using both the Java libraries and the Javascript versions. However, none of it worked. I had it working outside Archi, using plain HTML files, so I reused that to create an ELK layouter that uses the Eclipse browser object to execute the ELK runtime. I works perfectly well.
To get it running, fetch 'elk.bundled.js' from a repo, e.g., https://unpkg.com/elkjs/lib/elk.bundled.js, and place it in your script library under '__DIR__/lib'.
Then fetch my script here: Gist snippet (https://gist.github.com/ThomasRohde/c3b895a263b334b9e908d798802e1432)
Hi Thomas, thanks once again for sharing!
Actually, layout algorithms are of interest if they can be implemented in jArchi and operate on the Archi Views,
Regards,
Phil
I had to change line 173 to specify Edge Browser to get it to work on my System:
let browser = new Browser(newShell, SWT.EDGE);