[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Has anyone experienced something like this?

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?