Recent posts

#91
jArchi / Re: Repo: Script menu system
Last post by Phil Beauvoir - July 27, 2024, 16:04:29 PM
Crikey!

"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
#92
jArchi / Re: Repo: Script menu system
Last post by Thomas Rohde - July 27, 2024, 15:56:34 PM
Yes, it is amazing! And it is true that 99.9 % is created by Claude, including all documentation. Of course, there is a great deal of back-and-forth dialogue fixing errors because of lack of context (ie. it 'dreams' errors because of lack of training data, and we need to provide correct information in the prompt). The trick is, at the conclusion of a longer session where we finally arrive at a working product, I ask Claude to summarize the learnings in a markdown document, and include this in the next session). You can see examples of this in the repo.

This afternoon, over a cup of coffee, I asked Claude:

"Let us try to test our ability to create Eclipse dialogs using JArchi. Try making an elaborate script that exercises many of SWT and JFace capabilities while still bearing some relevance for the Archi tool".

It came up with the Model Health Check script, which is now also included in the repo.

These are the following prompts that led to the final product:

"I don't think BIRT is compiled into Archi: org.eclipse.birt.chart.model.impl.PieChartImpl" (Damn - that could be useful!)

"I think the correct way to get the current model is $.model not  $('model').first();"

"functions like viewRefs that work on collections, should be called like $(element).viewRefs() not element.viewRefs()"

"We get this error. I think you are not using the convention for creating subclasses of dialogs we have developed: org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (setWidth) on ..."

"Are you sure you are doing this correctly. Take a close look at Menu.ajs and model after this: org.graalvm.polyglot.PolyglotException: ReferenceError: "dialog" is not defined ..."

"Ok. Please show me the code in full"

"Now it works! Now please review JArchi Development Guide and create a new version that incorporates what we have learned in this session. Also, I want a code convention to always include clearing the console when begining a new top level script (not in lib)"

By the way, I had Claude update the README to include how to install the dependencies (Dagre)

#93
jArchi / Re: Repo: Script menu system
Last post by Phil Beauvoir - July 27, 2024, 14:24:13 PM
I got the "Layout using Dagre" script to work by downloading "dagre.js" from here and placing it next to the "layoutDagre.js" file and changing line 8 in that file to :

const dagre = require('./dagre');
#94
jArchi / Re: Repo: Script menu system
Last post by Phil Beauvoir - July 27, 2024, 14:08:12 PM
Hi Thomas (and Claude),

If this code was (99.9%) written by AI, then wow! That's amazing.

Thanks for sharing this.

Just one thing I couldn't get the "Layout using Dagre" script to work as I think a library file is missing. I get "Cannot load module: 'dagre' at <js>.:anonymous(layoutDagre.js:8)"
Phil
#95
jArchi / Repo: Script menu system (AI g...
Last post by Thomas Rohde - July 27, 2024, 05:54:35 AM
It has been a while since I scripted in JArchi. I just bought a Claude Pro subscription, and their Sonnet model is really good at programming, so I thougth it was a good opportunity to refresh my JArchi skills, and also see if Claude can do Eclipse, Archi and JArchi. In fact, by stuffing the repo with good context, it is surprisingly good.

Over a couple of days, we - Claude and I - whipped up this menu system with some test scripts. Actually, Claude has written 99.9% of the content  ;D

https://github.com/ThomasRohde/archi-scripts
#96
jArchi / Re: Archi Elements and Relatio...
Last post by cybye - July 25, 2024, 17:19:04 PM
nice!
#97
General Archi Discussion / Re: Archi 5.4 beta
Last post by Phil Beauvoir - July 24, 2024, 12:56:11 PM
Archi 5.4 Beta 5 is now available.

Some more optimisations and fixes (I keep keep finding things that makes things better  ;)  )

Final build will be available in a week or so.

Cheers,

Phil
#98
General Archi Discussion / Re: Archi 5.4 beta
Last post by Phil Beauvoir - July 17, 2024, 11:01:19 AM
Archi 5.4 Beta 4 is now available.

Some more optimisations and fixes. Final build will be available in a week or so.

Cheers,

Phil
#99
General Archi Discussion / Re: Archi 5.4 beta
Last post by Phil Beauvoir - July 09, 2024, 11:15:50 AM
And...

Archi 5.4 Beta 3 is now available.

(A few more internal Eclipse bugs fixed)

Cheers,

Phil

#100
jArchi / Re: Switch direction of (a) co...
Last post by Phil Beauvoir - July 08, 2024, 08:56:30 AM
Assuming you have a connection selected in the UI:

var relation = selection.first().concept;
var target = relation.target;
relation.target = relation.source;
relation.source = target;

Phil