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

Bug 348164

Summary: text boxes in server overview for times are too small on Cocoa / Mac
Product: [Eclipse Project] Platform Reporter: Rob Stryker <stryker>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: arvera, eclipse.felipe, mlippert, Silenio_Quarti
Version: 3.7Flags: Silenio_Quarti: review+
Target Milestone: 3.7.1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
spinner snippet none

Description Rob Stryker CLA 2011-06-03 01:38:08 EDT
When using Cocoa / Carbon,  The textboxes that display the "publish interval" and the "start and stop timeouts" are too small. They only display a single digit even though the value being saved represents seconds and are usually at least 2 digits if not 3.

Suggest making the boxes 4 digits wide.

On Linux, the size appears proper and not broken. 

Code is found in OverviewEditorPart. 

Full report with screenshots:   https://issues.jboss.org/browse/JBIDE-9014
Comment 1 Rob Stryker CLA 2011-06-03 01:44:24 EDT
I would target this to 3.3.1 but the target does not exist in servertools.
Comment 2 Rob Stryker CLA 2011-06-03 01:58:03 EDT
This has been confirmed by our QA team as a legitimate issue.
Comment 3 Rob Stryker CLA 2011-06-10 04:38:45 EDT
Would like to see 3.3.1 targets created so that I can ensure this is added to the maintenance release
Comment 4 Angel Vera CLA 2011-06-14 10:05:50 EDT
Targeting to WTP 3.3.1 as per request from adopter, but it will be invalid once I transfer it.

I do not understand why the difference in behaviour between platforms. I think this is a SWT issue rather than a server tools issue. I am passing it down to the Platform/SWT for them to look into.


Rob, If you are still looking for a workaround patch from the server tools side we may can come up with one but the original issue should be fixed. In order for us to come up with a patch I would like to understand what is so special from our code, I would think there is MANY other fields that have the same problem. If you want to pursue the workaround patch, please open a new bug and refer this bug.
Comment 5 Felipe Heidrich CLA 2011-06-14 11:05:30 EDT
Is this a bug in Cocoa ? Please correct the Platform field.
Comment 6 Leo Dos Santos CLA 2011-07-11 18:18:17 EDT
A similar bug has been filed against SpringSource Tool Suite. I can verify that this is an issue on Cocoa.

STS-1916: Text fields for configuring start and stop timeouts in the tc Server editor are too small
https://issuetracker.springsource.com/browse/STS-1916
Comment 7 Felipe Heidrich CLA 2011-07-12 09:05:35 EDT
can you please add a swt-only snippet that shows the problem you are having ?
Comment 8 Leo Dos Santos CLA 2011-07-12 13:26:49 EDT
Created attachment 199515 [details]
spinner snippet

I've copied a portion of the code from OverviewEditorPart and made it SWT-only to demonstrate the issue. It appears that the width hints are what's constraining the size of the spinners, but it seems to have a different effect on Cocoa from Gtk or Win32
Comment 9 Felipe Heidrich CLA 2011-07-13 12:18:55 EDT
Thank Leo

The problem is that the size of the updown button (and text trim) should be added to the size in computeTrim (not in computeSize).

I will release the fix as soon as our git migration is done (hopefully this week)

Note that I'm changing the verion and target milestone to version that make sense with the product the problem was reported against (Platform/SWT).
Comment 10 Felipe Heidrich CLA 2011-07-26 16:00:53 EDT
fixed http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7f71f1bd745113ea61770627c6b000b0bd7efea0

Leo, the bug is fixed but note that 30px is not wide enough to show all the text when the snipper has to show a 3 digits number.
Comment 11 Martin Lippert CLA 2011-08-03 03:04:50 EDT
Is there a chance to get this fix into 3.7.1? That would be absolutely great!!!
Comment 12 Felipe Heidrich CLA 2011-08-03 09:59:13 EDT
(In reply to comment #11)
> Is there a chance to get this fix into 3.7.1? That would be absolutely great!!!

Silenio ?

I changed the code in cocoa to match win32.
Comment 13 Silenio Quarti CLA 2011-08-03 14:04:17 EDT
+1 for 3.7.1
Comment 14 Felipe Heidrich CLA 2011-08-04 16:14:51 EDT
done.
Comment 15 Martin Lippert CLA 2011-08-11 09:14:31 EDT
Great! Thanks!!!
Comment 16 Leo Dos Santos CLA 2011-08-23 17:24:19 EDT
Hi, is this fix in 3.7.1 as well? I don't see it in the M20110817-0800 build.
Comment 17 Felipe Heidrich CLA 2011-08-24 15:08:06 EDT
(In reply to comment #16)
> Hi, is this fix in 3.7.1 as well? I don't see it in the M20110817-0800 build.

Sorry, we had an accident a few weeks ago where someone used git pushed force by accident and overwritten some changed. We thought we had got all the changes back when the accident happened by we missed this one.

Anyhow, I have re-pushed this change and Bogdan is already requesting a re-build.

Thank you for finding this in time for us to fix it.
Comment 18 Felipe Heidrich CLA 2011-08-25 10:34:04 EDT
Leo, please try M20110825-0605
Comment 19 Leo Dos Santos CLA 2011-08-25 14:54:05 EDT
Great, verified now. Thanks!