Community
Participate
Working Groups
It would really help me to be able to specify the alignment for the text component inside a CCombo. When using numbers it is much easier to read text that is right-aligned. The Text component supports alignments, but unfortunately the list does not. But even if the list remains left-aligned, fixing the text is a huge improvement for me.
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. If you have further information on the current state of the bug, please add it. 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. If the bug is still relevant, please remove the "stalebug" whiteboard tag.
This is an API request, and nothing changed. I would still like to align text to right when dealing with numbers in a CCombo.
New Gerrit change created: https://git.eclipse.org/r/152650
Created attachment 280640 [details] CCombo with alignments (In reply to Eclipse Genie from comment #3) > New Gerrit change created: https://git.eclipse.org/r/152650 This applies alignment on the text field. As you already noticed the list does not yet support alignment.
Thank you for the fix. Just a small observation: if you want to make this official and part of the specification, shouldn't you also update the "Styles" paragraph? After your change, it reads: * <dt><b>Styles:</b> * <dd>BORDER, READ_ONLY, FLAT</dd> * <dt><b>Events:</b>
(In reply to Andrei Diaconu from comment #5) > Just a small observation: if you want to make this official and part of the > specification, shouldn't you also update the "Styles" paragraph? Yes, missed that part. Thank you!
(In reply to Paul Pazderski from comment #4) > Created attachment 280640 [details] > CCombo with alignments > > (In reply to Eclipse Genie from comment #3) > > New Gerrit change created: https://git.eclipse.org/r/152650 > > This applies alignment on the text field. As you already noticed the list > does not yet support alignment. Hi Paul, Thanks for the patch, tried it. IMO we should evaluate below items as well: 1. Possibility for supporting list alignment ? 2. Similar to CLabel.java we should also support below two APIs in CCombo.java: int getAlignment() void setAlignment(int align)
(In reply to Niraj Modi from comment #7) > Hi Paul, > Thanks for the patch, tried it. IMO we should evaluate below items as well: > 1. Possibility for supporting list alignment ? > 2. Similar to CLabel.java we should also support below two APIs in > CCombo.java: > int getAlignment() > void setAlignment(int align) 1. the SWT List widget does not support alignment. For Windows I did a bit research and the two options I found where some dirty hacks with LTR vs RTL (which wouldn't support centered) or owner drawing. So IMO list align would be a separate ticket and Andrei is already happy with text align. 2. Agree. Will update the change.
(In reply to Paul Pazderski from comment #8) > (In reply to Niraj Modi from comment #7) > > Hi Paul, > > Thanks for the patch, tried it. IMO we should evaluate below items as well: > > 1. Possibility for supporting list alignment ? > > 2. Similar to CLabel.java we should also support below two APIs in > > CCombo.java: > > int getAlignment() > > void setAlignment(int align) > > 1. the SWT List widget does not support alignment. For Windows I did a bit > research and the two options I found where some dirty hacks with LTR vs RTL > (which wouldn't support centered) or owner drawing. > So IMO list align would be a separate ticket and Andrei is already happy > with text align. Fine with separate bugzilla entry, so it can be tracked/evaluated in future. > 2. Agree. Will update the change. Thanks!
(In reply to Niraj Modi from comment #9) > > 2. Agree. Will update the change. > Thanks! I added setAlignment but now I'm less convinced we should add it. The text widget does not support alignment change and my workaround to recreate the text widget is a bit ugly.
(In reply to Paul Pazderski from comment #10) > (In reply to Niraj Modi from comment #9) > > > 2. Agree. Will update the change. > > Thanks! > > I added setAlignment but now I'm less convinced we should add it. The text > widget does not support alignment change and my workaround to recreate the > text widget is a bit ugly. Behavior wise it's working fine, targeting for 4.14 M3 as it's has API changes.
Gerrit change https://git.eclipse.org/r/152650 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7b627530c28727b3a02ceba26562f3002339ca13
Marking as resolved, suggest to add an N&N entry for 4.14 M3.
New Gerrit change created: https://git.eclipse.org/r/152944
Gerrit change https://git.eclipse.org/r/152944 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=bdde301ec518b2e109c6e3553e6b8b50ecc33f0d
Reopening, found one issue while testing. Steps to reproduce: 1. Launch CustomControlExample.java 2. CCombo Tab >> Enable Popup Menu 3. Right click on the CCombo text area, you should see "Sample popup menu item", click on it. 4. Now try to change CCombo's alignment setting, we get below exception: Exception in thread "main" java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:4701) at org.eclipse.swt.SWT.error(SWT.java:4635) at org.eclipse.swt.SWT.error(SWT.java:4606) at org.eclipse.swt.widgets.Widget.error(Widget.java:452) at org.eclipse.swt.widgets.Control.setMenu(Control.java:3605) at org.eclipse.swt.custom.CCombo.createText(CCombo.java:216) at org.eclipse.swt.custom.CCombo.setAlignment(CCombo.java:1542) at org.eclipse.swt.examples.controlexample.CComboTab.setExampleWidgetAlignment(CComboTab.java:149) at org.eclipse.swt.examples.controlexample.AlignableTab.lambda$0(AlignableTab.java:69) at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587) at org.eclipse.swt.examples.controlexample.CustomControlExample.main(CustomControlExample.java:58)
(In reply to Niraj Modi from comment #16) > Reopening, found one issue while testing. > Steps to reproduce: > 1. Launch CustomControlExample.java > 2. CCombo Tab >> Enable Popup Menu > 3. Right click on the CCombo text area, you should see "Sample popup menu > item", click on it. > 4. Now try to change CCombo's alignment setting, we get below exception: > Exception in thread "main" java.lang.IllegalArgumentException: Argument not > valid > at org.eclipse.swt.SWT.error(SWT.java:4701) > at org.eclipse.swt.SWT.error(SWT.java:4635) > at org.eclipse.swt.SWT.error(SWT.java:4606) > at org.eclipse.swt.widgets.Widget.error(Widget.java:452) > at org.eclipse.swt.widgets.Control.setMenu(Control.java:3605) > at org.eclipse.swt.custom.CCombo.createText(CCombo.java:216) > at org.eclipse.swt.custom.CCombo.setAlignment(CCombo.java:1542) > at > org.eclipse.swt.examples.controlexample.CComboTab. > setExampleWidgetAlignment(CComboTab.java:149) > at > org.eclipse.swt.examples.controlexample.AlignableTab.lambda$0(AlignableTab. > java:69) > at > org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener. > java:84) > at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) > at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587) > at > org.eclipse.swt.examples.controlexample.CustomControlExample. > main(CustomControlExample.java:58) Solution is to add isDisposed() check before setting the Menu instance on the text instance. Will share a gerrit shortly.
New Gerrit change created: https://git.eclipse.org/r/153059
(In reply to Niraj Modi from comment #17) > (In reply to Niraj Modi from comment #16) > Solution is to add isDisposed() check before setting the Menu instance on > the text instance. Will share a gerrit shortly. On GTK's Control.java there is disposed check for other SWT resources in text.setFont(), text.setForeground() and text.getBackground() methods, so will need disposed check for all these resources as well. (In reply to Eclipse Genie from comment #18) > New Gerrit change created: https://git.eclipse.org/r/153059 In above patch have added disposed check for above scenarios.
Thank you Niraj. I tested align change while the combo list is open but not this case.
Gerrit change https://git.eclipse.org/r/153059 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=60423cd8832a3044b9715c664f8fc1a567aedaac
(In reply to Eclipse Genie from comment #21) > Gerrit change https://git.eclipse.org/r/153059 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=60423cd8832a3044b9715c664f8fc1a567aedaac Resolving, will verify it in next I-Build.
Verified in Build id: I20191120-1800 on Win7.
New Gerrit change created: https://git.eclipse.org/r/153312
The refactoring into the createText() method introduced a problem with focus handling. checkStyle() in CCombo constructor adds SWT.NO_FOCUS. This must not be passed along to Text().
Indeed, my mistake. Thank you Sebastian. Need approval for RC1.
Gerrit change https://git.eclipse.org/r/153312 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=afcabfabee4e29a0ea94f88a3c634a6ecf6313ef
(In reply to Eclipse Genie from comment #27) > Gerrit change https://git.eclipse.org/r/153312 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=afcabfabee4e29a0ea94f88a3c634a6ecf6313ef test_setFocus() is failing on MAC, please check if this can be fixed for RC1.
(In reply to Niraj Modi from comment #28) > (In reply to Eclipse Genie from comment #27) > > Gerrit change https://git.eclipse.org/r/153312 was merged to [master]. > > Commit: > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > > ?id=afcabfabee4e29a0ea94f88a3c634a6ecf6313ef > > test_setFocus() is failing on MAC, please check if this can be fixed for RC1. Link to the JUnit test results: https://download.eclipse.org/eclipse/downloads/drops4/I20191125-1800/testresults/html/org.eclipse.swt.tests_ep414I-unit-mac64-java8_macosx.cocoa.x86_64_8.0.html
IMHO Mac test failures has to be bringed to ZERO ASAP. It has been multiple releases where we haven't seen a clean mac build so everyone just stopped paying attention to results on Mac. If it means disabling currently failing tests on Mac better that way so at least we don't see the number increase.
(In reply to Alexander Kurtakov from comment #30) > IMHO Mac test failures has to be bringed to ZERO ASAP. It has been multiple > releases where we haven't seen a clean mac build so everyone just stopped > paying attention to results on Mac. > If it means disabling currently failing tests on Mac better that way so at > least we don't see the number increase. Thanks Alex, will disable this particular JUnit sub test-case for MAC.
New Gerrit change created: https://git.eclipse.org/r/153378
Gerrit change https://git.eclipse.org/r/153378 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=ff08024ac90c3b167589711afec56c2d6cc903ab
(In reply to Eclipse Genie from comment #33) > Gerrit change https://git.eclipse.org/r/153378 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=ff08024ac90c3b167589711afec56c2d6cc903ab (In reply to Niraj Modi from comment #28) > (In reply to Eclipse Genie from comment #27) > > Gerrit change https://git.eclipse.org/r/153312 was merged to [master]. > > Commit: > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > > ?id=afcabfabee4e29a0ea94f88a3c634a6ecf6313ef > > test_setFocus() is failing on MAC, please check if this can be fixed for RC1. Hi Sebastian, For now we have disabled the JUnit from RC1 point of view, still appreciate if you take a look into why it fails on MAC. Thanks!
(In reply to Niraj Modi from comment #34) > (In reply to Eclipse Genie from comment #33) > > Gerrit change https://git.eclipse.org/r/153378 was merged to [master]. > > Commit: > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > > ?id=ff08024ac90c3b167589711afec56c2d6cc903ab > > (In reply to Niraj Modi from comment #28) > > (In reply to Eclipse Genie from comment #27) > > > Gerrit change https://git.eclipse.org/r/153312 was merged to [master]. > > > Commit: > > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > > > ?id=afcabfabee4e29a0ea94f88a3c634a6ecf6313ef > > > > test_setFocus() is failing on MAC, please check if this can be fixed for RC1. > > Hi Sebastian, > For now we have disabled the JUnit from RC1 point of view, still appreciate > if you take a look into why it fails on MAC. Thanks! I have raised bug 553544 to track above part. Marking this bug resolved.
New Gerrit change created: https://git.eclipse.org/r/153678
Gerrit change https://git.eclipse.org/r/153678 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c3d607a8861d5b60d238540148ae092feabb7290
New Gerrit change created: https://git.eclipse.org/r/153680
Gerrit change https://git.eclipse.org/r/153680 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=5e84de26653d5864e927555cd3fbfbe948f101e6