Community
Participate
Working Groups
3.3 M5 Launch the following snippet. Double click into the text widget until the text disappears. ---------- package org.eclipse.swt.snippets; import org.eclipse.swt.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class SingleLineBug { static StyledText styledText; public static void main(String [] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new GridLayout()); styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER); styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); styledText.setText("Rudi "); styledText.addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent event) { styledText.append(styledText.getText()); System.out.println(styledText.getCharCount()); } }); shell.setSize(800, 800); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
I added "(wrapped)" to the title in case this case is different from the known problems that arise from having an extremely long unwrapped line in StyledText. FH note that using the comment 0 snippet I did not see the text disappear on win2000, at least until character count 655360 was reached.
It happens to me when charcount is 81920 - the OS call that shapes the glyphs (ScriptShape) fails when the text run is that long. It returns E_INVALIDARG result code. The msdn doc does not mention anything about this problem.
closing as wont fix. bug in windows, no workaround available.
*** Bug 287412 has been marked as a duplicate of this bug. ***
In a second thought, the code in shape can detect the run is too big and split it into smaller manageable runs.
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.
This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.