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

Bug 74254

Summary: Surrogate - The Description StyledText control becomes longer when the input chars are more than one line without pressing the “Enter” key after reopening the view.
Product: z_Archived Reporter: Charlie <wuzhiq>
Component: HyadesAssignee: Bianca Jiang <bjiang>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: closed460
Attachments:
Description Flags
Source file
none
Screen capture
none
Screenshots in the suggestion none

Description Charlie CLA 2004-09-20 03:04:08 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 reopening the view.

<<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)
Comment 1 Charlie CLA 2004-09-20 03:05:24 EDT
Created attachment 14635 [details]
Source file
Comment 2 Charlie CLA 2004-09-20 03:06:15 EDT
Created attachment 14636 [details]
Screen capture
Comment 3 Charlie CLA 2004-09-20 03:09:53 EDT
<<Suggestion>>
For this issue, it 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. It 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. For example: 
1. The user input chars more than one line without pressing the “Enter” key, 
the chars are wrapped and the user can see all the words he typed. The display 
of the view does not change after we press the “Save” icon to save it’s 
content. pls. refer to the screenshot 1 for detail info.
2. If we close the view and reopen it, the user will find that the display of 
the view has changed. In order to see the words he typed, the user has to 
scroll to right. This is inconvenient and the user may feel the UI is 
inconsistent. pls. refer to the screenshot 2 for detail info.
3. It may be better to keep the display of the view the same after closing and 
reopening the view. Just like the following screenshot. And the user will not 
feel any inconsistent during the process of editing, saving, closing and 
reopening. pls. refer the screenshot 3 for detail info.
 

This suggestion is just for your reference. Thanks. 


Comment 4 Charlie CLA 2004-09-20 03:14:36 EDT
Created attachment 14637 [details]
Screenshots in the suggestion
Comment 5 Bianca Jiang CLA 2004-10-13 18:44:28 EDT

*** This bug has been marked as a duplicate of 74136 ***
Comment 6 Paul Slauenwhite CLA 2009-06-30 12:39:56 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.