Closed Alon-fnx closed 2 years ago
Samples
I don't know what the level of support for RTL text is in Eclipse based apps. I Googled the issue and found that one can add the following two lines to the Archi.ini
file:
-dir
rtl
As this is an open source project please feel free to investigate the issue further (Google search is a good start)
Thanks for the fast response.
The strange thing is that in previous versions, this problem did not exist... I'll try and notify.
The strange thing is that in previous versions, this problem did not exist...
Is RTL working in, for example, a single line text control like "Name"?
Things that changed between Archi 4.8.1 and 4.9.x:
Eclipse 4.18 -> Eclipse 4.21 We forked the Eclipse GEF and Draw2d frameworks
You could try Archi 4.9.2 beta (uses Eclipse 4.22) https://www.archimatetool.com/beta/
The problem is happening even in a single line of text - as shown in the example. I'm talking about versions 4.4 / 4.7 and before
I'll try the beta
I'm not asking about the text in a diagram figure. I mean single line text controls as in the Properties tab or the controls in the Preferences dialog.
You could also test against Archi 4.8.1 - https://www.archimatetool.com/archive/
Please use the portable zip file versions for testing.
In any other object (Properties, diagram name etc'.) it's ok. It happens only in diagram objects
So we need to narrow it down to what version of Archi this problem is in, and perhaps whether it's a configuration issue for your setup.
Help me to understand this better...
As you type in the diagram text box the direction is correct? It's only when you finish editing that the displayed direction is wrong?
But please try to narrow it down to when this bug started.
And does this happen in Note text box?
When narrowing the box for one word at a line, It is OK. It shows the words as they ere typed. In note shape It is the same - when expanded it's reversed, and when narrowing the box it is shown OK..
What do you mean "narrowing the box"? Do you mean when the edit box is shown?
Please try all controls - Notes, Group, Stickies, Canvas blocks, stickies etc.
"Narrowing the box - i.e. changing the box width
"Narrowing the box - i.e. changing the box width
Now I'm even more confused. Are you saying that the direction of text changes when you resize a diagram box? Is it correct? Not correct? When you edit a box? Or what? Please provide the exact steps to reproduce this.
Also, please try Archi 4.8.1. Without knowing when this issue started I'm having a hard time to help.
And please answer this question:
As you type in the diagram text box the direction is correct? It's only when you finish editing that the displayed direction is wrong?
Correct. Edit pane is OK,
And please can you answer the questions for Archi versions:
Archi 4.7.1 - works OK? Not OK? Archi 4.8.1 - works OK? Not OK? Archi 4.9.2 beta - works OK? Not OK?
If I recall, the last version I had installed was 4.7.1 . In this version it worked OK.
Please test 4.8.1 and 4.9.2 beta
I have a theory that it might be related to this change:
https://github.com/archimatetool/archi/commit/81ad532bd072d099f6c9c28790af5847ea5d6318
I removed the BlockFlow
container.
If this is the cause then it means that this was working in Archi 4.6 but not 4.7 and later.
@Alon-fnx Can you confirm that it is working in Archi 4.6 but not 4.7.1?
I'd love to, but I'm working in an enterprise that every installation can take days... :( I'll try my best
I'd love to, but I'm working in an enterprise that every installation can take days... :( I'll try my best
In that case I can't provide a fix in a beta version, because you wouldn't be able to test the beta version.
I've made a test build for Windows on the basis of my theory about a breaking change above:
~https://www.archimatetool.com/downloads/beta/Archi-Win64-4.9.2-test1.zip~ (edit: deleted now)
If it is possible for someone to test this and if it works I can apply the fix.
But without user feedback and testing I am not able to fix or diagnose this issue - all I simply need to know is which version of Archi this worked and which version it broke.
I've made a test build for Windows on the basis of my theory about a breaking change above:
https://www.archimatetool.com/downloads/beta/Archi-Win64-4.9.2-test1.zip
If it is possible for someone to test this and if it works I can apply the fix.
But without user feedback and testing I am not able to fix or diagnose this issue - all I simply need to know is which version of Archi this worked and which version it broke.
Phillip, I'm admired by the agility and the swiftness of your response. I already started to move the wheels.
Thank you - I really do.
Perhaps test on a non-work machine? Or someone else could test?
My other machine is a Linux... I hope tomorrow I'll have it installed.
If I recall, the last version I had installed was 4.7.1 . In this version it worked OK.
If that is the case then my proposed fix won't make any difference.
This really needs more eyes on the case.
We've not had any other reports about this. For me, as I said, I need to know when it stopped working. Also, need to know if this is an isolated case.
If I recall, the last version I had installed was 4.7.1 . In this version it worked OK.
If that is the case then my proposed fix won't make any difference.
This really needs more eyes on the case.
We've not had any other reports about this. For me, as I said, I need to know when it stopped working. Also, need to know if this is an isolated case.
Tested the zip on my home pc (win10). Same problem...
Tested the zip on my home pc (win10). Same problem...
OK, then I need to know the version where it did work. Can you test some versions please:
4.8.1 no ok 4.7.1 OK
4.8.1 no ok 4.7.1 OK
Thanks, that helps.
So we can eliminate these changes:
I reviewed the changes between Archi 4.7.1 and 4.8.1 and I can't see anything that might affect paragraph layout and Bidi support in the diagram figures.
What did change was Archi 4.8.1 uses Eclipse 4.18 instead of 4.15. If it is an Eclipse issue then it might be hard to pinpoint.
Is the issue present on the Mac and Linux versions?
Also, it's strange that this has not been reported before.
I haven't tried on Mac or Linux. Maybe I'll revert to 4.7.1 in the meantime. Yes, It's strange that it wasn't reported. I'm sure there are many RTL users.
Searching through the Eclipse Bugzilla I found this bug, "BIDI Support is broken in 4.17":
https://bugs.eclipse.org/bugs/show_bug.cgi?id=566914
Looks like it might have something to do with it.
Let's assume that the issue is caused by some bug in Eclipse. In order to figure out what's wrong requires somebody with a RTL setup to debug and try some things in the Archi code. I can't do that because I can't set text to Hebrew or Arabic and set things to use RTL.
If someone is able to set up a test environment they could look at the following classes:
com.archimatetool.editor.diagram.figures.AbstractTextControlContainerFigure
com.archimatetool.editor.diagram.figures.diagram.NoteFigure
For example, in the NoteFigure
class the text control is set up as follows:
protected void setUI() {
setLayoutManager(new GridLayout());
FlowPage page = new FlowPage();
fTextFlow = new TextFlow();
fTextFlow.setLayoutManager(new ParagraphTextLayout(fTextFlow, ParagraphTextLayout.WORD_WRAP_SOFT));
page.add(fTextFlow);
setOpaque(true);
GridData gd = new GridData(SWT.LEFT, SWT.TOP, true, true);
add(page, gd);
fTextPositionDelegate = new TextPositionDelegate(this, page, getDiagramModelObject());
setIconicDelegate(new IconicDelegate(getDiagramModelObject()));
}
The FlowPage
class handles Bidi
information. One can manually set the orientation to RTL like this:
page.setOrientation(SWT.RIGHT_TO_LEFT);
Just some ideas...
Hello Phillip,
I manged to change the ini file with -dir rtl and it works O.K.! It change the entire ui to RTL but I can adapt to that.
Thank you very much for your time!
Alon
I still thinks there's a bug in Eclipse:
I still thinks there's a bug in Eclipse:
Please let me know if the bug is resolved.
@Alon-fnx
Perhaps you can help to test a special build of Archi that is built using Eclipse 4.15?
As you say that RTL is working in Archi 4.7.1 which is built on Eclipse 4.15.
It is a buggy build, errors will be written to the log, and it will leak memory...but it will show whether the RTL bug is in Eclipse or not:
~https://www.archimatetool.com/downloads/beta/Archi-Win64-4.9.2-testbuild.zip~ (edit: deleted now)
Perhaps you could launch it and do a quick test?
Don't use it for production work!
@Phillipus I'll try
@Alon-fnx
Perhaps you can help to test a special build of Archi that is built using Eclipse 4.15?
As you say that RTL is working in Archi 4.7.1 which is built on Eclipse 4.15.
It is a buggy build, errors will be written to the log, and it will leak memory...but it will show whether the RTL bug is in Eclipse or not:
https://www.archimatetool.com/downloads/beta/Archi-Win64-4.9.2-testbuild.zip
Perhaps you could launch it and do a quick test?
Don't use it for production work!
Hi Phil,
The Hebrew is correct.
Does it mean it's an Eclipse bug?
@Alon-fnx Thanks for testing that build.
Does it mean it's an Eclipse bug?
Yes, I think so.
The test build uses all of the code as used in Archi 4.9.2 (apart from having to change the calls to Eclipse's Color
object for backward compatibility). The only difference is that it is built using Eclipse 4.15 (as used in Archi 4.7.1).
This tells me that there's nothing in Archi's code that can be changed and that we should look to this possible bug:
...and for the Eclipse developers to even look at this Eclipse bug they will need a reproducible test case in Eclipse itself.
Thank you. Please let me know whenever you hear it's done.
Thank you. Please let me know whenever you hear it's done.
Unless more Hebrew / Arabic Eclipse users can confirm and have steps to reproduce the bug/regression in Eclipse itself, the devs won't even look at it.
@Alon-fnx A new Eclipse bug has been reported:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=579626
Do you think this could be the cause?
That Eclipse bug fix that might have caused this is for Windows only. @Alon-fnx Can you check whether RTL works in Archi on Linux and Mac?
I think it's likely that the Eclipse bug at 579626 could be the cause. The affected Eclipse class was TextLayout
and Draw2d uses TextLayout
in its BidiProcessor
class for RTL text.
@Alon-fnx I've made a test build of Archi 4.9.3 for Windows with a modified TextLayout
class. Can you test it and see if it fixes the RTL issue?
~https://www.archimatetool.com/downloads/beta/Archi-Modified-4.9.3.zip~ (edit: deleted now)
Bug report
Version of Archi
4.9.1
Archi Plug-ins
Collaboration
Operating System
Win10
Expected Behaviour
Text in shape should support RTL text
Actual Behaviour
Words written in Hebrew in shapes are written in LTR order For example, If I type שלום עולם It shows: עולם שלום
Steps to Reproduce the Behaviour