Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 74136 - Surrogate - The Description StyledText control becomes longer when the input chars are more than one line without pressing the “Enter” key after reopen it.
Summary: Surrogate - The Description StyledText control becomes longer when the input ...
Status: CLOSED DUPLICATE of bug 74949
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bianca Jiang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 74254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-16 21:50 EDT by Charlie CLA
Modified: 2016-05-05 11:06 EDT (History)
0 users

See Also:


Attachments
Source file (44.95 KB, application/octet-stream)
2004-09-16 21:57 EDT, Charlie CLA
no flags Details
Screen capture (60.87 KB, application/octet-stream)
2004-09-16 21:58 EDT, Charlie CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie CLA 2004-09-16 21:50:19 EDT
Reporter: Wu Zhi Qiang
Language: Simplified Chinese
Build driver: eclipse 3.0
JDK Version: IBM JDK 1.4.1

Steps to recreate problem:
1. Go to File -> New -> Other
2. Select Test -> Test Elements -> Deployment
3. Follow the wizard to finish it.
4. After it, the Deployment viewer is opened. 
5. Input some words in the description field longer that one line without 
pressing the “Enter” key

<<Error>>
The Description StyledText control becomes longer when the input chars are more 
than one line without pressing the “Enter” key after reopen it.

<<Expected Result>>
It maybe a design decision instead of a defect.

<<Cause>>
The problem only occurs when we input more than one line chars without 
inputting line break key. After the data is save to the outside file. If we 
reopen the deployment file, the previous chars are regarded as one line. The 
StyledText will re-compute its size based on the widest line.

Details:
=====
package: org.eclipse.swt.custom
file: StyledText.java
method: public Point computeSize (int wHint, int hHint, boolean changed)

<<Solution>>
It’s maybe a design decision instead of a defect. However, it maybe better if 
we still wrap the chars in the StyledText control based on current container’s 
size when we reopen the file. If may make the user feel inconvenient when 
checking the contents in the StyledText control if we directly adjust the 
StyledText control’s width based on the widest line when reopening the file.
Comment 1 Charlie CLA 2004-09-16 21:57:33 EDT
Created attachment 14590 [details]
Source file
Comment 2 Charlie CLA 2004-09-16 21:58:36 EDT
Created attachment 14591 [details]
Screen capture
Comment 3 Joe Toomey CLA 2004-10-04 14:32:09 EDT
Bianca -- when this defect comes to the top of your queue, please take a look 
and let me know what you think.  I'm not sure I fully understand this issue, 
but if you can reproduce and show me, we can talk about whether / how to fix 
this.
Comment 4 Bianca Jiang CLA 2004-10-13 18:44:29 EDT
*** Bug 74254 has been marked as a duplicate of this bug. ***
Comment 5 Bianca Jiang CLA 2004-11-24 15:34:04 EST
The problem was the parent form was mamually calculating form control size and 
set it to the max size for its content. should rely on parent composite layout 
to do the work.
Comment 6 Bianca Jiang CLA 2005-05-09 17:30:11 EDT
had to roll back the manual calculation of control sizes to have scrolling in
editor forms.  (see bug 94187) This problem should be ultimately solved when
Hyades editors use Eclipse Forms API. Thus duplicating this one to bug 74949.
Comment 7 Bianca Jiang CLA 2005-05-09 17:31:25 EDT

*** This bug has been marked as a duplicate of 74949 ***
Comment 8 Paul Slauenwhite CLA 2006-11-16 09:02:21 EST
ACTION: Please verify/close this defect.
Comment 9 Paul Slauenwhite CLA 2007-02-12 12:57:40 EST
Closing by default since not closed by the originator in the 7+ months since being resolved.  

Please reopen if the issue is still present in the latest TPTP release or the resolution is not correct.