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

Bug 141106

Summary: TVT3.2:TCT376: RU: Truncation in DTD editor - Properties
Product: [WebTools] WTP Source Editing Reporter: CDE Administration <cdeadmin>
Component: wst.dtdAssignee: Amy Wu <for.work.things>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: camle, for.work.things, jeffliu, kitlo, valentinbaciu
Version: 1.5   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Linux-GTK   
URL: 376
Whiteboard:
Bug Depends on:    
Bug Blocks: 138008, 141446    
Attachments:
Description Flags
376-28.002340.gif
none
376-28.002340a.gif
none
28.002320.gif
none
TCT376_28.002330.jpg
none
TCT376_28.002320.jpg
none
org.eclipse.wst.dtd.ui.patch
none
TCT376_ja.jpg
none
org.eclipse.wst.dtd.ui.patch none

Description CDE Administration CLA 2006-05-10 14:01:08 EDT
OS : RHEL 3.1
Must fix or not a must fix: NO
Build date: 0508
Blocking: NO
Language: ru
Bitmap Location: V:\defects\ru
Tester Name: Nikolay Milekhin
Problem Description:

Select File> New> Example...
Expand XML> Editing and validating files
Click Next
Click Finish

Open XMLExamples/Invoice/Invoice.dtd with DTD Source page editor, by expanding Web1> XMLExamples> Invoice in the Project Explorer window
Right click on Invoice.dtd
Select Open With> DTD Editor

In the Outline view, expand all nodes and selecting each one, verify context menu and property sheets in the Properties view.
Expand Invoice.dtd
Select
Select Properties view

+++++++++++++++

The Model Group label is truncated in a strange way with ... in the middle of the text. Please see capture. Provided that there is a plenty of space in this window, it looks strange.

Thanks!
Nikolay

This article was reassigned from Category:''TVT/Testing''.

This problem appears in the Properties panel for many items. There are 2 more captures attached as an example.
Comment 1 CDE Administration CLA 2006-05-10 14:01:12 EDT
Created attachment 40983 [details]
376-28.002340.gif
Comment 2 CDE Administration CLA 2006-05-10 14:01:13 EDT
Created attachment 40984 [details]
376-28.002340a.gif
Comment 3 CDE Administration CLA 2006-05-10 14:01:13 EDT
Created attachment 40985 [details]
28.002320.gif
Comment 4 CDE Administration CLA 2006-05-10 14:01:16 EDT
<cde:tctdetail>
Testcase: 28.002320
Project: WSW32
Component: CDE - Web Tools/wst.dtd
Priority: 3
Subject: RU: Truncation in DTD editor - Properties
Article ID: 376
Originator: rusmil01@ru.ibm.com
</cde:tctdetail>
Comment 5 CDE Administration CLA 2006-05-10 15:34:44 EDT
Hello

Japan has the same problem. This problem is a must-fix for Japanese.

Please investigate.

Thank you
Eriko Takahashi

Hi

Same problem for France, must fix too.

Nathanaƫl
Comment 6 CDE Administration CLA 2006-05-10 15:34:46 EDT
Created attachment 41014 [details]
TCT376_28.002330.jpg
Comment 7 CDE Administration CLA 2006-05-10 15:34:47 EDT
Created attachment 41015 [details]
TCT376_28.002320.jpg
Comment 8 Amy Wu CLA 2006-05-10 18:15:00 EDT
Nitin, is that label something we have control over?  Especially how it is truncated.  

I noticed that if you hover over the label control, the full name will be displayed in a hover.  If you are able to get the full name somehow, is this still a mustfix for Japanese and French?
Comment 9 CDE Administration CLA 2006-05-11 10:02:10 EDT
Same problem for Norway.

Ellen Elisabeth
Comment 10 CDE Administration CLA 2006-05-11 11:32:11 EDT
Hi,

I had hard time thinking about that. I really think that problem impacts the usability of the product. It's still a must fix for France even though the tooltip shows the whole field name.


Same as France, it's a must-fix for Japanese.

We need to have it fixed for the usability. The text needs to be displayed fully without hovering over it. Please help to fix this problem.

Eriko
Comment 11 Amy Wu CLA 2006-05-17 16:21:57 EDT
Currently, labels are basically given a fixed width of 100 pixels.  Fix is to calculate label text first and if text is greater than 100 pixels, allow it (and shift all other controls to the right of it) If text is < 100 pixels, still keep label width at 100 pixels to align controls better.  (if label text is greater than 100 pixels, only that row of controls will be shifted.  all other rows of controls will maintain original alignment)
Comment 12 Amy Wu CLA 2006-05-17 16:42:48 EDT
Created attachment 41799 [details]
org.eclipse.wst.dtd.ui.patch

Fix is for all tabbed property sections, create label first and check label text length and adjust size accordingly so there is no truncation.  Then attach the other controls to the label (so shift other controls with respect to label)
Comment 13 David Williams CLA 2006-05-17 16:51:22 EDT
This is a lot code, but its all systematic application of same principles, so I believe safe, and approve it for RC3. 

Comment 14 CDE Administration CLA 2006-05-17 17:14:40 EDT
Warning: Unable to attach org.eclipse.wst.dtd.ui.patch due to unsupported extension (patch) on the filename.
Comment 15 Amy Wu CLA 2006-05-17 17:28:17 EDT
Fix released for this week's build.
Comment 16 CDE Administration CLA 2006-06-07 16:35:13 EDT
Nathana?l







Nathana?l








In 0606 build it is fixed for ru_RU, but not fixed for ja_JP.


This truncation problem is not fixed for Japanese with 0606 build. Please investigate.
Comment 17 Amy Wu CLA 2006-06-07 18:37:01 EDT
Do you have some screencaps to show it still not working?  Is the truncation any better (less is truncated)?
Comment 18 CDE Administration CLA 2006-06-08 10:02:30 EDT
Yes, it's better than before. But it still has truncation. For example, for "Model Group", three double byte characteres are not shown.

Please help to fix this problem.
Comment 19 CDE Administration CLA 2006-06-08 10:02:31 EDT
Created attachment 43859 [details]
TCT376_ja.jpg
Comment 20 David Williams CLA 2006-06-08 15:46:50 EDT
Just setting to untargeted. Sounds like partially fixed in 1.5 RC3, but more 
work may be needed next release. 
Comment 21 David Williams CLA 2006-06-11 11:23:27 EDT
re-targeting to 1.5.1, given time, if it can be fixed in a safe way. 
Comment 22 Amy Wu CLA 2006-08-30 18:35:31 EDT
Retargetting to 2.0 because ran out of time. I kind of remember the fix involved calculating font size.
Comment 23 Amy Wu CLA 2007-03-14 11:32:34 EDT
Comment on attachment 41799 [details]
org.eclipse.wst.dtd.ui.patch

obsoleting patch since this one was already applied and this bug is still open because it needs additional fixing
Comment 24 Amy Wu CLA 2007-03-16 19:37:43 EDT
Created attachment 61176 [details]
org.eclipse.wst.dtd.ui.patch

I found a better solution than calculating font metrics and whatnot.  Just basically call something like this:
>>	Point p = cLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
>>	int labelWidth = Math.max(p.x, 98);
	FormData data = new FormData(labelWidth, SWT.DEFAULT);
	data.left = new FormAttachment(0, 0);
	data.top = new FormAttachment(0, 0);
	cLabel.setLayoutData(data);

computeSize will be more accurate in computing estimated size (instead of guessing average font size)
Comment 25 Amy Wu CLA 2007-03-16 19:43:06 EDT
fixed & released for wtp 2.0 m6.