Project: SWT
Bug 277438 Korean Input text flickers in StyledText widget in case the sentence exceeds a row.
Reported: 2009-05-22 06:07:49 | Status: resolved fixed

Build ID: 3.4 Steps To Reproduce: The issue is SWT related. With SWT 3.4, the problem can be reproduced. However, with SWT version 3.2 and 3.3, problem is not there. Sample Code: __________________________________________________________ package com.ibm.text.korean; import org.eclipse.jface.window.Window; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; public class TextForKorean extends Shell { /** * Launch the application * @param args */ public static void main(String args[]) { try { Display display = Display.getDefault(); FormLayout formLayout = new FormLayout(); Shell shell = new Shell(display, SWT.SHELL_TRIM); formLayout.marginHeight = 10; formLayout.marginWidth = 10; shell.setLayout(formLayout); shell.setText("SWT Application"); shell.setSize(500, 375); Composite com = new Composite(shell,SWT.NONE | SWT.LEFT_TO_RIGHT ); com.setLayout(new FormLayout()); com.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST BACKGROUND)); StyledText text = new StyledText(com, SWT.V_SCROLL | SWT.MULTI | SWT.WRAP | Window.getDefaultOrientation()); text.setFont(new Font(null, "Arial", 20, SWT.BOLD)); text.getVerticalBar().setVisible(false); text.setEnabled(true); text.setTextLimit(2000); FormData formData = new FormData(); formData.top = new FormAttachment(0, 2); formData.bottom = new FormAttachment(100, -2); formData.right = new FormAttachment(100, -2); formData.left = new FormAttachment(0, 2); com.setLayoutData(formData); text.setLayoutData(formData); shell.open(); // shell.layout(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } catch (Exception e) { e.printStackTrace(); } } } _________________________________________________________ Enter some random Korean text in the Shell that opens, you will see a flicker if you keep typing many sentences together(i.e, write to many lines.) To enable the Korean language, go to Control Panel-> Regional and language prefrences. In the advanced tab, select the Korean Language. Run the sample code above on Eclipse 3.2.2(SWT3.2)/or 3.3.1, type the long korean sentences --- cannot reproduce this issue Run this on Eclipse 3.4 (SWT3.4), type the long korean sentences, reproduce this issue More information: The issue looks to be coming from Styledtext widget. When using a simple Text widget, flicker is not seen. The bug has been reported as Critical severity as it is affecting a functionality in our product and hence affecting the users.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java