Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
5 daysBug 550517: [GTK3] Swing components keep the focus when coming back to SWT ↵Eric Williams1-0/+82
widgets Call proper constructor in XEmbeddedFrame which sets supportsXEmbed to true. Coincidently the is the same solution to bug 548661. I have merged Nikita's patch for bug 548661 (thanks Nikita!) and will upload only the snippet in this patch. Tested on GTK3.24 and Fedora 31 on X11 with the snippet attached. No AllNonBrowser JUnit tests fail. Change-Id: I8c2e30b90481c2b5bb108f447ad89b167a06f7d9 Signed-off-by: Eric Williams <ericwill@redhat.com>
5 daysBug 548661 - [GTK] DND from SWT to embbedded AWT frame is brokenNikita Nemkin1-0/+125
Fix XEmbeddedFrame constructor call to pass supportsXEmbed=true parameter. Regression was introduced in 2214fda883. Change-Id: Ia47a34b8c76686222cd1149b708037819179436b Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
13 daysBug 545804: [GTK] Add support for SVG filesEric Williams2-0/+45
Implement support on GTK side. Tested using the snippet attached on GTK 3.24 and Fedora 30. No AllNonBrowser JUnit tests fail. Change-Id: I1e35b08fc931634e36f4881fd209b8a0ddf28138 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-10-28Bug 552215 - Better test snippets for 541427Alexandr Miloslavskiy2-0/+148
Change-Id: I4a71479fece2220ad9114473e6ac6913e630e9bd Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2019-10-28Bug 552215 - [GTK3] Tree: Excessive flickeringEd Merks1-59/+59
Fix the line endings to be LF not CRLF. Change-Id: I17b329b4b50aaf65281f7f0065701f57fce373eb Signed-off-by: Ed Merks <ed.merks@gmail.com>
2019-10-22Revert "Bug 541427: [GTK3][X11] Tree with no items and the size of the ↵Eric Williams1-47/+0
header is blank" This reverts commit be9f3ff707e25f4aa304df53c2b712b9678a7772. Unforunately this was a bad fix that caused too many regressions. Change-Id: Icba797bd9c692170c41ffd5d33344e28060c3f85 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-10-18Bug 552215 - Test snippetAlexandr Miloslavskiy1-0/+59
Change-Id: I2fe0a9274dde5f708f0834950d4a5247e43606c3 Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2019-10-18Bug 552209 - Test snippetAlexandr Miloslavskiy1-0/+55
Change-Id: I751e04765b1a34e4a12230018075f01c2155cdcf Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2019-10-18Bug 530878 - Dynamically compute isFixedLineHeightMickael Istria1-1/+44
Do not consider fixedHeightLength as a state but instead deduce it from other "payload" state (current styles, linespacing and so on). Also-By: Angelo Zerr <angelozerr@gmail.com> Change-Id: Ifd7994d7f1f9f568e7d6d9ff089ffcccb4aa5f93
2019-10-17Bug 552096: [GTK] Tree.showItem does not work reliablyEric Williams1-0/+63
Remove geometric calculations as they cannot be relied upon to be accurate. Just call gtk_tree_view_scroll_to_cell() directly as Table does. Tested on GTK3.24 and 3.10 using the snippet attached and a child Eclipse. No AllNonBrowser JUnit tests fail. Change-Id: I423943f349be63a637891e673ab4df34013c194c Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-10-17Bug 551982: [GTK] Nothing is rendered when creating new GC on canvasEric Williams1-0/+47
Use gdk_window_begin_draw_frame() to extract a Cairo context which we can keep for ourselves by calling cairo_reference(). This ensures the context isn't destroyed by gdk_window_end_draw_frame() and can be disposed of in Control.internal_dispose_GC(). Tested on GTK3.24 and 3.20 using the snippet attached and a child Eclipse instance. No AllNonBrowser JUnit tests fail. Change-Id: Ide25a5d742ef69d6fa92906c6f2a861c86d38654 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-10-16Bug 520488 - [cocoa] If a child Shell disposes its parent, parent throwsNiraj Modi1-0/+9
NPE Added test case. This revealed a missing disposure check in Decorations. Change-Id: I83d126a636f524b0c1de8ba90752cd6632ef4904 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com> Also-by: Karsten Thoms <karsten.thoms@itemis.de>
2019-10-07Bug 543747 - Add more testsAlexandr Miloslavskiy1-9/+68
Change-Id: I87287fa270c4e21447f9de0a4cf371a79c0d0f9c Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2019-10-04Bug 551318 - [Win32] ToolItem.setDisabledImage() JUnit test failureNiraj Modi1-22/+23
- enabling this test for GTK only. Change-Id: I399c929f5e942e176be0ee17e19d2f415ef1621e Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
2019-10-02Bug 551624 - [GTK3] Recursive loop of SWT.Show eventsEric Williams1-0/+48
Revert commit 83a43f4d1fc67b864696f081d908956580c27303 as it causes a StackOverflow, as well as SWT.Show event loop. AFAICT the original bug being fixed by the commit in question is no longer reproducible on modern desktop environments. Tested on Fedora 30, GTK3.24, GNOME3 and X11. No AllNonBrowser JUnit tests fail. Change-Id: I283e087e1872220ee348e5b1aa9288f7bec98f45 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-10-02Bug 551588: [GTK] Performance of TextLayout.getBounds() is veryAndrey Loskutov3-0/+252
bad for long text Avoid the fetching of many PangoLayoutIter* objects by re-using them where possible. Refactored and optimized some of the TextLayout getLineBounds() and getBounds() methods to avoid unnecessary native calls and slowdowns. Return to pre-bug 491712 behaviour by using the height returned by pango_layout_get_size(). Tested with the snippets attached on Fedora 30, GTK3.24, and X11. No ill effects observed in the IDE, and no AllNonBrowser JUnit tests fail. Change-Id: I6feb11e6cf7515508f4ef1a155256c2987a83613 Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Also-by: Peter Severin <peter@wireframesketcher.com> Also-by: Eric Williams <ericwill@redhat.com>
2019-09-26Bug 543895: [GTK] Extra space to the right of ToolItems without textEric Williams2-0/+69
Only set a ToolItem as "important" if it actually has text. Otherwise this ToolItem will show its label even if no text is set, causing extra padding. Tested on GTK3.24 with the snippet attached. NoAllNonBrowser JUnit tests fail. Change-Id: I588ca39abf7b1ce8606bd3e36cd15a8fb62a33b7 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-09-26Bug 551336 - [StyledText] resetting styles does not reset renderingPaul Pazderski1-5/+6
Change-Id: I10bd62580efa7b16cba5518aa2e414d53d360396 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
2019-09-26Bug 551335 - [StyledText] setStyleRanges reset less cache than necessaryPaul Pazderski1-2/+118
Change-Id: I91f249646228a9046c2ec9ece9e6607583208b17 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
2019-09-25Bug 546552: [GTK3] Checkboxes with custom color are hard to readEric Williams1-0/+57
Some check, radio, and toggle buttons have solid background colors on certain GTK themes (namely the new Adwaita theme, and the Yaru theme). Furthermore, setting a solid background color in these cases causes the checkmark/indicator to be nearly invisible. This patch as three parts. Part one: use the default GTK CSS (widget name) instead of the universal selector that is usually used for such buttons. This ensures that the indicator/checkmark area retains it's proper look when the default background is set. Part two: adjust the CSS strings in setForegroundGdkRGBA() to ensure all inner parts and styles of Buttons are styled. Part three: define a new internal system color to match the check/radio button foreground color. This ensures the correct color is used for the actual check mark/radio indicator, when the default background is set. Tested on GTK3.24.11 and 3.24.10 (old Adwaita theme), as well as using the Yaru theme. NoAllNonBrowser JUnit tests fail. Change-Id: I54be8b578b54537f4beb3bc91957420b3c5a563b Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-09-25Bug 551438 - Fix files that have ended up with CRLF in the gitEd Merks5-365/+365
repository Change-Id: I0b73a52d66fc55656971ed0e78bd436d3e0bdecf Signed-off-by: Ed Merks <ed.merks@gmail.com>
2019-09-19Bug 302918: ToolItem setDisabledImage isn't usedEric Williams4-0/+111
Implement ToolItem.setDisabledImage() on GTK. Behaviour should be in line with Mac/Windows. Attached is a JUnit test and test snippet. Tested on GTK3.24 on Fedora 30. No AllNonBrowser JUnit tests fail. Change-Id: I8c2d94bed014a7aca4783eb469bf96b62d75cd78 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-09-17Bug 550501: [GTK] Ability to place not digit characters to DateTimeEric Williams1-0/+51
Disallow non-digit characters from being inserted into an SWT.TIME DateTime widget. The only exception here is if the characters are modifying the AM/PM field. Tested on GTK3.24 on X11 with the snippet attached. No AllNonBrowser JUnit tests fail. Change-Id: I9f921bcf3bc6f6da70bfdf7682e7eec7174d84f4 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-09-17Bug 550733: [GTK] Getter methods of DateTime returns wrong (old) date and ↵Eric Williams1-0/+51
time values when fields changed by keyboard Update the emulated Calendar when changing the Date/Time using the keyboard. Tested on GTK3.24 on X11. No AllNonBrowser JUnit tests fail. Change-Id: I5b319b52b3255ff91fa1bff8fea1938a38f39565 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-09-16Bug 546333 - [Win32] test_disposeItemNotTriggerSelection JUnit testConrad Groth1-8/+0
failing. Windows notifies the parent Widget (the Tree) about the deleted item. This event is dispatched to the last control with the last event type, which causes an SelectionEvent for a TreeItem. This case was already covered for trees with the SWT.MULTI flag, but obviously also happens for trees with SWT.SINGLE flag. Change-Id: I66dfbf40041824cb15c40f2d6d26f08069e60751 Signed-off-by: Conrad Groth <info@conrad-groth.de>
2019-09-16Bug 550777 - Version bumps for 4.14 streamNiraj Modi2-2/+2
- for SWT tests project Change-Id: I64962208fd536a45d8345cb0bb5d57280d38eafc Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
2019-09-11Bug 341117: ToolItem traversal does not fire deactivate event.Eric Williams1-0/+60
Send focus[In/Out] events in the parent ToolBar, in order to ensure traversal events get fired when traversing from a Control to an Item (like ToolItem). Otherwise Controls won't receive Deactivate events until the next Control has focus. Tested on GTK3.24 and X11, using the snippet attached. No AllNonBrowser JUnit tests fail. Change-Id: I899195aeef939f0b68fedb34a2f5a37d6e928409 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-09-06Bug 550767 - POM and product version change for 4.14 releaseNiraj Modi5-5/+5
Change-Id: I5f4b86dce47eb22017d41072167fcd28e00e983a Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
2019-08-22Bug 550322 - Intermittent test failure in swtSravan Kumar Lakkimsetti1-2/+2
Change-Id: I38bc9fba84e99e76c25c21c4f50d1f01ee5c1617 Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
2019-08-19Bug 541427: [GTK3][X11] Tree with no items and the size of the header is blankEric Williams1-0/+47
A change in the GTK3.20 drawing model means that Trees without any items will have blank headers (not drawn). The fix is to ensure that a window-system native window is created for the Tree. Only X11 is affected by this bug, Trees on Wayland behave normally. Tested on GTK3.24 on X11 and Wayland, using the snippet attached and a child Eclipse. No AllNonBrowser JUnit tests fail. Change-Id: I5f8528b43a5ed41d652c663637673385d5eed945 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-08-16Bug 546248: [GTK3] Composite receives to much repaint eventsEric Williams1-0/+78
As of GTK3.16, GTK will send extra draw events to SwtFixed instances containing overlay scrollbars. This happens when the mouse leaves an SwtFixed instance that has overlay scrollbars attached to it. The fix is to check the dirty region in need of a redraw, and only sent an SWT.Paint event if the actual SwtFixed instance is in need of a redraw. Tested on GTK3.24 on X11 and Wayland. No AllNonBrowser JUnit tests fail. Change-Id: I958b4c16020a14f6f24e6e3d1ca67aba2ebec329 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-08-14Bug 550017 - Disabling StyledText changes cursor position and selectionAndrey Loskutov1-0/+26
Change-Id: I55c35ee8dd1b3e7044690414f0d8301127594e4a Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Also-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2019-08-09Bug 549713 (Part2) - [Win32][API]Query the current system setting forNiraj Modi1-1/+7
dark mode Change-Id: I1e77327958ecc1fe6ed20eac53143522441f4a46 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
2019-08-08Bug 549733: [GTK] [API] Query the current system setting for dark modeEric Williams1-0/+36
Adjust the original patch such that it works with both GTK_THEME and the system GTK theme. Change-Id: I9e0db81274123ea054539c343a58a1d9fe221740 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-08-08Bug 546490: [GTK] Incorrect Table/Tree sizeEric Williams1-0/+141
Address Table sizing issues. The majority of the issues stem from the fact that GTK reports a 1x1 size for Widgets which are not visible. This afflicts columns in Trees/Tables, and throws of computeSize() values. This patch addresses this by initially setting the column buttons visible whenever doing a computeSize() operation. Further more, GtkScrolledWindows without scrollbars sometimes do not change their size, likely due to caching. In order to work around, we check if the Table has an initial computed height equalling the header height, and bump that height by 1px to trigger a resize. Tested on GTK3.24 on X11 and Wayland. No AllNonBrowser JUnit tests fail. Change-Id: I35330f43a2f75b5a0f08fec47dea8a40c1b2b902 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-08-06Bug 4745: [StyledText] StyledText does not provide a disabled lookEric Williams1-0/+58
(1GG00JX) Set background/foreground colors to COLOR_TEXT_DISABLED_BACKGROUND and COLOR_WIDGET_DISABLED_FOREGROUND respectively, to provide a disabled look when StyledText.setEnabled(false) is called. The behaves the same way as the Text widget on GTK does. Change-Id: Id0325993c6206cc660568bff9d094df514194e88 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-07-31Bug 546490: [GTK] Incorrect Table/Tree sizeEric Williams1-0/+141
Address Tree sizing issues. The majority of the issues stem from the fact that GTK reports a 1x1 size for Widgets which are not visible. This afflicts columns in Trees/Tables, and throws of computeSize() values. This patch addresses this by initially setting the column buttons visible whenever doing a pack() or computeSize() operation. Further more, GtkScrolledWindows without scrollbars sometimes do not change their size, likely due to caching. In order to work around, we check if the Tree has an initial computed height equalling the header height, and bump that height by 1px to trigger a resize. Tested on GTK3.24 on X11 and Wayland. No AllNonBrowser JUnit tests fail. Change-Id: I7e6bc4940e9b026a30b81e1993ab09c7d5332753 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-07-29Bug 547811: [GTK] DateTime drop-down popup shell does not hiding on focus lostEric Williams1-0/+57
Remove the FocusIn filters from DateTime.handleEvent() as it causes issues with Shell destruction/unfocusing. Tested on X11 on GTK3.22 and 3.24, Fedora 30. No AllNonBrowser JUnit tests fail. Change-Id: I7f25c05b5aa26db315feb02725e0c92c6d1af051 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-07-22Bug 507020: [WAYLAND] [HiDPI] Some icons scaled incorrectEric Williams1-0/+63
Using gdk_get_default_root_window() isn't reliable enough to give us an accurate scale factor. Instead, we can check the scale factor of the Cairo surface provided in gtk_draw(). This information will let us know whether GTK has already scaled the Widget/Cairo surface, meaning SWT doesn't have to manually scale it again. This change only applies to GNOME. Tested on X11 and Wayland on GTK3.24. In both instances, no more double scaling is observed. Change-Id: I9271576e66af857962384264eb5645235aa88feb Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-07-19Bug 549110 - Disable new tests not working on MacPaul Pazderski1-0/+4
Change-Id: Iec0b75b91fc741830bcb18ea65dc28a882f642e8 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
2019-07-18Bug 549376 - [Ubuntu 14.04] Native crash in OS._gtk_widget_show when ↵Alexandr Miloslavskiy1-0/+56
creating RADIO MenuItem with UBUNTU_MENUPROXY Change-Id: I477bdc394337f3d7942d846f1a1bc564b6ff33dc Co-authored-by: Markus Keller <markus_keller@ch.ibm.com> Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2019-07-17Revert and adapt "Revert "Bug 547532 - [StyledText] GlyphMetrics on tabMickael Istria1-0/+15
alter bounds"" This reverts commit 0bc87fc204a7f19137c97a7fdc15e8aee9b0c706. The operations that may modify line content (style.metrics on tab) are moved before the line content is set and the styles to pass are prepared and then applied to the layout later (after text is set) Change-Id: Id4f3cbe55878248618a963d2b91ed84cc4a1abf0 Signed-off-by: Mickael Istria <mistria@redhat.com>
2019-07-16Bug 549101: [GTK] Label background set from parent background, but the ↵Eric Williams1-0/+51
colors are not equal Use getRed(), getGreen(), getBlue(), and getAlpha() methods in Color.equals() and Color.hashcode(). Verified with the bug snippet attached, and in a child Eclipse. No AllNonBrowser JUnit tests fail. Change-Id: Ice1db1db5a2d0a0bac3c148a6d003d2dee6783bb Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-07-15Bug 549110 - Add more tests for StyledText style handlingPaul Pazderski1-1/+147
This adds some more tests using LineStyleListener and some additional tests for styles applying metrics on tabs. (see bug 547532) Change-Id: I404cabf1e5039e564e77183de816e703fb5c5e31 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
2019-07-11Revert "Bug 547532 - [StyledText] GlyphMetrics on tab alter bounds"Lakshmi Shanmugam1-15/+0
Reverting the original commit as it causes Bug 547532. This reverts commit 42e1162be185ee9d256a21b48da94cd1df2de7eb. Change-Id: Ia50a2815bf81e127b773cc59ed48672ee7054336
2019-07-08Bug 548982 - [GTK] Optimize bulk inserting items to TreeAlexandr Miloslavskiy1-0/+159
Change-Id: I1b6c19d043cc42ac244926129eef2ba71ef174ad Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2019-07-05Use StringBuilder in Bug497705_setBoundsAfterSetVisible.javaLars Vogel1-2/+2
Change-Id: If4e4d1c0399584e286cbde88a142ea5338ac8d46 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2019-07-04Bug 545032: [GTK] Implement native ImageLoaderEric Williams1-1/+0
Most ImageData's created on GTK have an RGB byte order, however some exceptions do exist. Specifically, ImageData's created from JFace's CompositeImageDescriptor can have a BGR byte order. Because of this, it's necessary to check the PaletteData in ImageLoader.save(). If the PaletteData indicates a negative blue shift, we are dealing with BGR byte ordering and must adjust the offsets accordingly. Revert some smaller changes from the original ImageLoader patch, as they are not needed (causes the white background on breadcrumb icons). Verified with the relevant bug snippets, JUnits, and with the JDT icons in a child Eclipse. Change-Id: I8d6e1cea4c1559689e42dedf334c550435cd7533 Signed-off-by: Eric Williams <ericwill@redhat.com>
2019-06-30Bug 547634 - [win32] Add CFSTR_SHELLIDLIST transfer type to FileTransferPaul Pazderski3-2/+323
to support drop on taskbar CFSTR_SHELLIDLIST transfer type is only added as drag source not as drop target. Like the existing CF_HDROP transfer type implementation the new transfer type allow dragging non existing file paths. Change-Id: I02c4f64081ec2b55073e1878f99b8e52eeabdd01 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
2019-06-27Bug 547532 - [StyledText] GlyphMetrics on tab alterMickael Istria1-0/+15
bounds Change-Id: I90c0acf10bfbef66fd6583c528b149f243cf6dc9 Signed-off-by: Mickael Istria <mistria@redhat.com>

Back to the top