|
|
|
Re: Has anyone experienced something like this? [message #206899 is a reply to message #206891] |
Wed, 24 September 2008 15:25 |
Victor Roldan Betancort Messages: 524 Registered: July 2009 |
Senior Member |
|
|
Alex, Ed,
I also thought so, but seems that's not the reason. Specially when I
happens no matter where the resource come from: CDO or XMI. Furthermore,
all the values of the XML appear correctly in the properties view. It's
just a problem on how the diagram is showing them. And even more weird:
if I double click on any box in the diagram to edit the name, an editing
box appears with the correct value!!
I've tried a clean installation of eclipse, with latest integration
builds of most of the typical plugins (EMF, transaction, validation,
ocl, GMF, GEF...). I deleted deleted and regenerated the diagram editor
code. Even regenerated the .gmfgen. Even regenerated the model itself,
extending EObject and extending CDOObject, both with the same result.
I'll keep investigating...
Ed Merks escribió:
> Alex,
>
> It definitely looks like an encoding problem. But EMF reads the XML
> using SAX and that will always respects the encoding specified in the
> XML header. So the most likely explanation seems to be that some tool
> has edited the XML and saved the file with an encoding different from
> the encoding specified in the XML header... I.e., to me it looks like a
> mismatch between the actual encoding of the file and the specified
> encoding in the header of the file...
>
>
> Alex Shatalin wrote:
>> Hello Víctor,
>>
>>> http://img530.imageshack.us/img530/5522/gmfscreenshotxu0.png
>>>
>>> It happened to me when moved to EMF 2.5.0 and GMF 2.2.0 (both latest
>>> integration builds). As the screenshot shows, the labels started to
>>> show up wrong, like having different encoding... I tried regenerating
>>> both the emf model and the gmf diagram editor, but didn't help.
>>>
>>> Any clue?
>>>
>>
>> Looks like diagram/model files stored by prev. version of EMF was not
>> correctly loaded..
>> I'm adding EMF newsgroup as a CC to this posting - m.b. Ed Merks can
>> add some comments to this thread..
>> -----------------
>> Alex Shatalin
>>
>>
|
|
|
|
|
|
Re: Has anyone experienced something like this? [message #207006 is a reply to message #206993] |
Thu, 25 September 2008 10:42 |
Victor Roldan Betancort Messages: 524 Registered: July 2009 |
Senior Member |
|
|
Alex,
thanks for your feedback. I've spent a lot of time on this, but finally
found the problem. I hacked variables value in the code, and suddenly
everything started to show up fine!
The problem is in org.eclipse.draw2d.text.TextFlow.paintText(Graphics g,
String draw, int x, int y, int bidiLevel)
protected void paintText(Graphics g, String draw, int x, int y, int
bidiLevel) {
if (bidiLevel == -1) {
g.drawString(draw, x, y);
} else {
TextLayout tl = FlowUtilities.getTextLayout();
if (isMirrored())
tl.setOrientation(SWT.RIGHT_TO_LEFT);
tl.setFont(g.getFont());
tl.setText(draw);
g.drawTextLayout(tl, x, y);
}
}
And the responsible is the "bidiLevel".
While debugging, I realized that the value of the text was never
scrambled, but rather just drawn incorrectly. This argument was always
set to "-1". I hacked it to be set always to something different to
"-1", and it worked!
I suspected from it yesterday while trying different eclipse
installations, GMF crashed with problems related with com.ibm.icu, the
owner of the "BidiProcessor".
Anyway. Do you have a clue why I'm receiving "-1" in the BidiLevel?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02960 seconds