Add Invert Connection Direction feature for ArchiMate diagrams#1214
Add Invert Connection Direction feature for ArchiMate diagrams#1214Yassimba wants to merge 1 commit intoarchimatetool:masterfrom
Conversation
|
@Phillipus I checked against the new GEF classic interface and this should not break anything, I right now based my PR on main but if you want me to base it on one of the GEF branches you are currently working on let me know. A fellow architect that works with Archi asked me if I could implement an invert relationship feature so when you went the wrong way you can quickly invert it. I tested this quite thorough, this should work right now and respect the relationship rules, one thing I wonder when bulk selecting (or single selecting) and a relationship is not allowed to be inverted I right now silently do nothing, if you feel a better UX is showing the user something about it not being allowed let me know but I liked this for now. Thanks and if there is something you need (code) improvements some related additional feature or wanting me to fix this on a newer branch please let me know! |
|
@YassinCh Thanks for the PR, I'll take a look at it soon. If it's OK we can look at adding to the next version of Archi. < snip > removed my comment about what needs to be done for next version of Eclipse/GEF. Not relevant here. 😉 |
|
I'll try and get this PR merged for Archi Archi 5.8.1 because we have another PR that needs to be merged. |
|
Hi, can you make a small change? Could you remove the default key binding of Ctrl-I in Optional stylistic changes (but only if you have time): Pattern matching in
|
|
Heey! I cleaned up the code as you suggested and removed the keybind! Tnx for the suggestions : ) |
|
@YassinCh Thanks for that! I know they're nitpicky things but I just thought it might be better. If you like you could combine into one line in if(!(object instanceof EditPart editPart && editPart.getModel() instanceof IDiagramModelArchimateConnection connection)) {
continue;
} |
|
Done :) |
|
Thanks. Final thing now...in order to get a clean merge the commits should be squashed into one clean commit. Is this OK for you to do? |
|
Also, the following key binding entry will have to be removed completely from |
c4b76ee to
998b041
Compare
998b041 to
6cc8256
Compare
|
Fixed! |
|
Thanks! If you're happy with it I can merge. |
|
Thanks I am ! will be cool |
|
I've merged this now in the "dev" branch. @YassinCh Many thanks for this PR, it was well done and I'm sure Archi users will find it very useful. It will be in the next version of Archi. Phil |
|
@YassinCh Hi, there seems to be a problem with changing the bendpoints on a connection. Here's a video of one example: Screen.Recording.2026-03-18.at.19.24.55.movCould you take a look? |
|
@YassinCh Hi, I've unmerged this from the Also, |
|
Heey thanks for checking that is a good one I do realise I mostly tested it for straight connections, I will look at it tommorow When do you plan to release 5.8.1? Just trying to get a feel so I can try to fix this in time |
No hurry. When it's ready. Thanks! |
|
@YassinCh This seems to be a better solution: A copy of bendpoints is made and there's no need to swap source and target ends in the relationship as this is done when calling |
|
Nice I like it ! |
Could you test it to death please? ;-) BTW - did you use AI at all in the original? |
|
Updated to 7d9a7ad - no need to declare a |
|
Simplified even more in fa25eb2 I'm not sure the label text positions should be swapped. Surely those should remain the same? |
|
Added help documentation in ab909d3 |
|
Nice!! And I am not sure I wanted to keep the amount of visual difference the same. The reason is WHY someone would want to invert the relation. Say someone added a label and then realised he accidently swapped the relation. Do you want it when he inverts it to keep hte label where it is or swap as well? I personally felt it should stay in the same spot |
It depends. Does the user want the label at the actual source or target of the connection or do they want it physically at that position? |
|
So what I feel is an example And then he realizes oh no I want to invert this relationship does he then want this label to be at the now new source? Or does he wanna keep it as is but just invert an access relationship which he accidently inverted> |
|
(SADLY my label isnt indenting cause of the comments but my point is likely the label is at the right box/actual object it tries to identify but is just the relationship swapped more likely? What do you think? You might be right but just checking :) |
|
For me if I set the label to be at source I want it left at source. One can always change it. I think on this issue there will be two schools of thought. If we go one way sure enough someone will want the other way. |
|
You have infinitely more experience in this then I do. So let's do it your way for sure :) I was just happy to challenge it a bit |
Well, not really. Personally I don't mind either way. Let's sleep on it. |
|
Added internal preference to swap label positions 1895b64 |
|
I've added unit tests in branch As this is done now I'll close this PR. |
|
Tnx :) |
|
Was cool to see your approach to have worked on this together |
Summary
Adds "Invert Connection Direction" action for ArchiMate diagrams (with a ctrl+i, cmd+i shortcuts)
Changes