| Summary: | [GTK][api] TVT_IES45_JDT: Command name with "Command (&M)"-style mnemonic should not be reused as tooltip | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Niraj Modi <niraj.modi> |
| Component: | SWT | Assignee: | Sravan Kumar Lakkimsetti <sravankumarl> |
| Status: | RESOLVED FIXED | QA Contact: | Niraj Modi <niraj.modi> |
| Severity: | normal | ||
| Priority: | P3 | CC: | arunkumar.thondapu, bsd, cjxu, daniel_megert, kitlo, kqli, libingw, lshanmug, markus.kell.r, niraj.modi, sarika.sinha, simeon.danailov.andreev, sravankumarl, xbpan |
| Version: | 4.5 | Flags: | niraj.modi:
review+
|
| Target Milestone: | 4.10 M1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/122771 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=72c7a218c9727d9f05050c9d47828a82a6978516 https://bugs.eclipse.org/bugs/show_bug.cgi?id=549065 |
||
| Whiteboard: | |||
| Bug Depends on: | 475858 | ||
| Bug Blocks: | |||
|
Description
Niraj Modi
Hi Sravan, Please see if you can accommodate this bug for M5 ? Will look into this early M6 (In reply to Sravan Kumar Lakkimsetti from comment #2) > Will look into this early M6 Should we move to M7? Moving to M7. I will look into this in RC1 New Gerrit change created: https://git.eclipse.org/r/122771 (In reply to Eclipse Genie from comment #6) > New Gerrit change created: https://git.eclipse.org/r/122771 With above patch, issue still reproducible... try installing Japanese language pack from below update site: http://download.eclipse.org/technology/babel/update-site/R0.15.0/oxygen and launch eclipse with -nl ja option and see JUnits view. (In reply to Niraj Modi from comment #7) > (In reply to Eclipse Genie from comment #6) > > New Gerrit change created: https://git.eclipse.org/r/122771 > > With above patch, issue still reproducible... try installing Japanese > language pack from below update site: > http://download.eclipse.org/technology/babel/update-site/R0.15.0/oxygen > and launch eclipse with -nl ja option and see JUnits view. +1 Functionality wise the latest code fixes the above mentioned problem seen with patch 2, have verified the patch on Ubunut16. I don't think it is a must for RC2. Putting in 4.9 M1 will be a much safer option. (In reply to Sarika Sinha from comment #9) > I don't think it is a must for RC2. Putting in 4.9 M1 will be a much safer > option. I agree. (In reply to Dani Megert from comment #10) > (In reply to Sarika Sinha from comment #9) > > I don't think it is a must for RC2. Putting in 4.9 M1 will be a much safer > > option. > > I agree. I am differing to 4.9 based on above comments We are not able to complete the review in 4.9. We will push this change in 4.10M1 Gerrit change https://git.eclipse.org/r/122771 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=72c7a218c9727d9f05050c9d47828a82a6978516 (In reply to Eclipse Genie from comment #13) > Gerrit change https://git.eclipse.org/r/122771 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=72c7a218c9727d9f05050c9d47828a82a6978516 Merged to master The fix here causes a regression. Tables/Trees with with a '(' in the table/tree column header have *sometimes* underscored '('.
I'm not 100% sure how to reproduce it with Eclipse (SWT/JFace) only. We observe the following stack trace:
"main" #1 prio=6 os_prio=0 tid=0x00007ffff0050000 nid=0x5661 runnable [0x00007ffff59bd000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.swt.widgets.Widget.fixMnemonic(Widget.java:1065)
at org.eclipse.swt.widgets.Widget.fixMnemonic(Widget.java:1033)
at org.eclipse.swt.widgets.Widget.fixMnemonic(Widget.java:1029)
at org.eclipse.swt.widgets.TreeColumn.setText(TreeColumn.java:655)
...
The string input of the method "org.eclipse.swt.widgets.Widget.fixMnemonic(String, boolean, boolean)" is: "(Hardware)"
This results in an underscore being pre-prended, so the label is (wrongly so): "_(Hardware)"
During debugging, I observe that the '(' case falls through to the '_' case, which I don't think is intended?
The code is:
case '(':
if (removeAppended && i + 4 == string.length () && text [i + 1] == '&' && text [i + 3] == ')') {
if (replace) result [j++] = ' ';
i += 4;
break; // break switch case only if we are removing the mnemonic otherwise fall through
}
case '_':
if (replace) result [j++] = '_';
//FALL THROUGH
Unfortunately we see this only after switching perspectives (switching to a perspective that has a view open, the view has tree with a '(' symbol in its tree column header). So its not easy to create an SWT-only snippet.
(In reply to Simeon Andreev from comment #15) Please file a bug with steps to reproduce. (In reply to Dani Megert from comment #16) > (In reply to Simeon Andreev from comment #15) > Please file a bug with steps to reproduce. I've opened 549065, which in the meantime is also fixed. |