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

Bug 72225

Summary: [StyledText] StyledText.setTextLimit does not apply to append
Product: [Eclipse Project] Platform Reporter: Gary Gregory <ggregory>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact: Felipe Heidrich <eclipse.felipe>
Severity: normal    
Priority: P3 CC: Michal.Tkacz, pavery, snorthov
Version: 3.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Gary Gregory CLA 2004-08-18 21:24:25 EDT
Version 3.1M1.
StyledText.setTextLimit does not apply to append.
I need to limit how much is appended. This is nasty since making append take
setTextLimit into account will probably not be backwards compatible. What to do?
Add a new property?
Comment 1 Felipe Heidrich CLA 2004-08-20 14:44:11 EDT
Honestly, I'm not sure if APIs such as StyledText#setText() and 
StyledText#append() should be subject to text limit.

The behavior is quite inconsistent across platforms:
StyledText
limits: typing
doesn't limit: paste, setText, append, replaceTextRange
to reset = use -1 (undoc)

Text (SINGLE AND MULTI) - Windows
limits: typing, paste, append
doesn't limit: setText
to reset = use Text.LIMIT (doc)

Combo - Windows
limits: typing, paste, 
doesn't limit: setText, add
to reset = use Combo.LIMIT (undoc)

Text SINGLE - GTK
limits: typing, paste, append, setText
doesn't limit: nothing

Text MULTI - GTK (NOT IMPLEMENT, NO GTK API)
limits: nothing
doesn't limit: setText, append, typing, paste

Combo - GTK
limits: typing, paste, setText, add
doesn't limit: nothing

Text (SINGLE AND MULTI) - Motif
limits: typing, paste
doesn't limit: setText, append

Combo - Motif
limits: typing, paste
doesn't limit: setText, add

Text (SINGLE AND MULTI) - Carbon
limits: typing, paste (bug: paste more than the limit, delete key stop working)
doesn't limit: setText, append

Combo - Carbon (NOT IMPLEMENT)
limits: nothing
doesn't limit: setText, add, typing, paste
 
Comment 2 Felipe Heidrich CLA 2004-08-20 14:45:26 EDT
SN to determine the right behaviour and FH to implement it.
Comment 3 Phil Avery CLA 2006-04-06 14:14:23 EDT
We have the same problem with StyledText and paste.
Comment 4 Michal Tkacz CLA 2007-03-07 16:42:40 EST
The problem still exists in 3.3M3 (and possibly 3.3M5 as well) if you try to paste more text than allowed (tested on Windows).
Comment 5 Steve Northover CLA 2007-03-13 00:34:44 EDT
Please check the other platforms again.  The limit should be respected.
Comment 6 Felipe Heidrich CLA 2007-03-13 17:49:11 EDT
(In reply to comment #5)
> The limit should be respected.

It should be respect in all cases (setText, append, typing, paste) ?

Comment 7 Steve Northover CLA 2007-03-13 18:03:22 EDT
Yes.
Comment 8 Felipe Heidrich CLA 2009-08-18 10:58:32 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.
Comment 9 Leo Ufimtsev CLA 2017-08-03 12:27:11 EDT
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
Comment 10 Eclipse Genie CLA 2020-04-10 17:31:00 EDT
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.