Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 135741

Summary: Bidi3.2: [HCG] BiDi chars does not appear on a GMF diagram
Product: [Modeling] GMF-Tooling Reporter: Moshe WAJNBERG <wajnberg>
Component: CoreAssignee: Mohammed Mostafa <mmostafa>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: Lina.Kemmel, mfadl, mmostafa
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
arabic text
none
arabic text none

Description Moshe WAJNBERG CLA 2006-04-09 06:02:56 EDT
- Run the GMF example : Logic Diagram
- Drag a new Note or Text onto the diagram
- Give to this note/text a BiDi label/text
- The label/text does not appear in the diagram

When giving an English name, everything works fine
Comment 1 Moshe WAJNBERG CLA 2006-04-09 06:03:53 EDT
This problem is only for Linux

On Windows everything works fine
Comment 2 Mohammed Mostafa CLA 2006-04-17 15:30:20 EDT
This is a problem is in the Cairo Graphics library. This issue will show up only when the advanced flag is turned-ON on the GC (which is the case in GMF).

Work around had been introduce in M6 on GMF side; if you are using M6 you can go to the preference page and turn OFF Anti-Aliasing in the diagram page this should make the BIDI visible. The fact that there is a work around should be considered while considering the defect severity.

This defect should be marked as a duplicate of 136472, and product/component should change to Platform/SWT.

Code to reproduce the problem without using GMF

package testGC; 

import org.eclipse.swt.SWT; 
import org.eclipse.swt.graphics.Font; 
import org.eclipse.swt.graphics.GC; 
import org.eclipse.swt.widgets.Display; 
import org.eclipse.swt.widgets.Event; 
import org.eclipse.swt.widgets.Listener; 
import org.eclipse.swt.widgets.Shell; 


public class TestGC { 
public static void main(String[] args){ 
final Display display = new Display(); 
Shell shell = new Shell(display); 
shell.addListener(SWT.Paint, new Listener(){ 
public void handleEvent(Event event){ 
GC gc = event.gc; 
String text = "\u0627\u0644\u0627\u0634\u0643\u0627\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628"; 
Font font =  new Font(display,"Tahoma",16,SWT.NORMAL); 
gc.setFont(font); 
gc.drawText("Drawing Text with Adavcned Mode ON: ",10, 10); 
gc.setAdvanced(true); 
gc.drawText(text,10, 110); 
gc.drawText("Drawing Text with Adavcned Mode OFF: ",10, 210); 
gc.setAdvanced(false); 
gc.drawText(text,10, 310); 
font.dispose(); 
} 

}); 
shell.setSize(400,410); 
shell.open(); 
while (!shell.isDisposed()){ 
if (!display.readAndDispatch()) 
display.sleep(); 
} 
} 

}
Comment 3 Steven R. Shaw CLA 2006-04-19 14:07:25 EDT
This has been confirmed as a duplicate...

*** This bug has been marked as a duplicate of 136472 ***
Comment 4 Moshe WAJNBERG CLA 2006-04-20 06:24:03 EDT
I went to the preference page and turned OFF Anti-Aliasing in the Logic diagram page, but I have exactly the same behaviour than before (I restarted
Eclipse and even created a new Logic Diagram): BiDi text does not appear.

Did I understand you correctly or is there any additional step to perform
Comment 5 Mohammed Mostafa CLA 2006-04-20 13:47:30 EDT
(In reply to comment #4)
> I went to the preference page and turned OFF Anti-Aliasing in the Logic diagram
> page, but I have exactly the same behaviour than before (I restarted
> Eclipse and even created a new Logic Diagram): BiDi text does not appear.
> Did I understand you correctly or is there any additional step to perform

r u using gmf M6 ? the work around works only on M6 not M5
Comment 6 Moshe WAJNBERG CLA 2006-04-23 08:50:04 EDT
Yes, I am using GMF M6. Let me clarify the problem :

When you try to create a Text element (from the Palette) you are right : If you unckeck the antialiasing option you do see the BiDi text and if you check
this option you can't see it.

The problem is for the creation of Note (also from the Palette). Whatever the 
option you use (antialiasing or not) you can't see the Bidi Text. Of course with Latin text, everything works fine
Comment 7 Steven R. Shaw CLA 2006-04-25 17:57:12 EDT
Looks like that SWT issue?
Comment 8 Mohammed Mostafa CLA 2006-04-26 10:39:44 EDT
(In reply to comment #7)
> Looks like that SWT issue?

it is a little bit different; the fact that turnning off anti-aliasing did not fix it for Notes means we (GMF) should do invistigations on our side to make sure that Note does not trigger the advanced mode on the GC when Anti Aliasing is off. I'll invistigate that 
Comment 9 Mohammed Mostafa CLA 2006-04-28 15:12:57 EDT
(In reply to comment #6)
> Yes, I am using GMF M6. Let me clarify the problem :
> When you try to create a Text element (from the Palette) you are right : If you
> unckeck the antialiasing option you do see the BiDi text and if you check
> this option you can't see it.
> The problem is for the creation of Note (also from the Palette). Whatever the 
> option you use (antialiasing or not) you can't see the Bidi Text. Of course
> with Latin text, everything works fine 

I have tried to create Notes with Arabic text, it worked just fine when Anti-Aliasing was disabled (same as Text)
My Enviroment is RHL4 MultiLingual ; and GMF M6 dowloaded from the gmf web site. looks like it is the same problem as 136472 

attached an Image for the noth Note and Text with Arabic text 

Comment 10 Mohammed Mostafa CLA 2006-04-28 15:13:52 EDT
Created attachment 39819 [details]
arabic text
Comment 11 Mohammed Mostafa CLA 2006-04-28 15:14:33 EDT
Created attachment 39820 [details]
arabic text
Comment 12 Mohammed Mostafa CLA 2006-04-28 15:17:38 EDT

*** This bug has been marked as a duplicate of 136472 ***
Comment 13 Moshe WAJNBERG CLA 2006-04-30 04:45:32 EDT
I tried with GMF M6 + base eclipse RC1a and now it works for me
even for Notes item.

I think we can close this defect.
Comment 14 Moshe WAJNBERG CLA 2006-05-01 04:06:04 EDT
I am closing the defect
Comment 15 Eclipse Webmaster CLA 2010-07-19 12:17:40 EDT
[GMF Restructure] Bug 319140 : product GMF and component
UI was the original product and component for this bug