Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-01-19Fix compile warnings in RichTextEditor and testsIvan Furnadjiev1-6/+6
Use new ClientFileLoader service instead of deprecated JavaScriptLoader. Update tests execution environment to Java 8. Change-Id: I52a214670b24ad09be667ccea9080792ad81d6f6
2016-01-19Fix a crash when new ClientFileLoader service is usedIvan Furnadjiev2-1/+3
- the factory function in ClientFileLoaderHandler return wrong type - ClientFileLoader.js and ClientFileLoaderHandler.js are missing from client.files Change-Id: Ifecb809fde898c5754afa135636dd7f8e5119107
2016-01-18Proper implementation of Control#redraw( x, y, width, heigth )Ivan Furnadjiev7-24/+88
When Control#redraw( x, y, width, heigth ) is called in SWT, a rectangle with the given bounds is cleared and new Paint event is fired. As a result, only specified rectangle from the GC will be redrawn (without clearing the rest). Change-Id: I197eea39e29c0593e6ee7d55e07fb7e0c97f8c43
2016-01-18Add new ClientFileLoader service to WebClientRalf Sternberg1-1/+6
Change-Id: Ib8ad8c2632667da13b352532ef6960287042ff0f
2016-01-15Introduce ClientFileLoader service interfaceRalf Sternberg5-1/+167
JS files can already be loaded using the JavaScriptLoader service. However, third-party libraries often also require a CSS file. For custom widget that need both, a JS and a CSS file, a single client service for both types is easier to use than acquiring two separate services. the existing JavaScriptLoader service can hardly be extended, because of its class and method name (require). Introduce a new client service ClientFileLoader that can load both, JS and CSS files. This service offers two methods, requireJs and requireCss. Since this interface is not meant to be implemented (@noimplement), it can later be extended to support other file types without breaking API. Deprecate the existing JavaScriptLoader in favor of the new service. Change-Id: I64a151af8f6efda52f9b06ffcb3a5095d7a85248
2016-01-15Add badge support for CTabItemIvan Furnadjiev4-4/+29
As CTabFolder is the main control in Workbanch parts, the themening (padding, margin) of CTabItem is not changed and the badge is positioned on the top right corner inside tab. 485768: Add badge support for CTabItem https://bugs.eclipse.org/bugs/show_bug.cgi?id=485768 Change-Id: Ifec555852ed5d05e7aea6a4f7b3f2336171cfbff
2016-01-15Introduce new API to replace RWT utility classesRalf Sternberg16-174/+141
Keeping our extensions to SWT in utility classes results in complicated application code. Since RWT applications won't directly compile in SWT anyway, there isn't much value in keeping the extensions separate. Copy the utility methods to the respective classes, deprecate DialogUtil and BrowserUtil, remove FileDialogUtil, which has been introduced in this release cycle. Change-Id: I222fca0bac9fc3d2505b73bacafa3fdb1723febb
2016-01-14Initial import of RAP port of Nebula RichTextEditor widgetIvan Furnadjiev99-0/+2851
Add bundles: - bundles/org.eclipse.rap.nebula.widgets.richtext - examples/org.eclipse.rap.nebula.widgets.richtext.demo.examples - tests/org.eclipse.rap.nebula.widgets.richtext.test Add RichText tests to the test suite. Change Examples Demo to use RichTextEditor example page. Add RichText tab in Controls Demo. Add RichText bundles to framework and examples builds. Approved CQ: CKEditor Version: 4.4.7 (PB CQ10358) https://dev.eclipse.org/ipzilla/show_bug.cgi?id=10425 Change-Id: I154f73efea47063e1fbb3725be307f8a439f92e0
2016-01-12Fix text-decoration not respected by MultiCellWidget based widgetsIvan Furnadjiev1-2/+3
text-decoration CSS property is not inherited by default. In order to respect the text-decoration set on the MultiCellWidget widget element, text cell node must have explicitly set text-decoration to inherit. Change-Id: Ie96cb07b1666a0e52a951e08a9a86b198b22ab0d
2016-01-12Fix issue with sequential rectangular GC clippingIvan Furnadjiev1-1/+2
When GC#setClipping(Rect) is called sequentially, only first clipping rectangle is respected. We render rect/clip operations in protocol. Clip operation works on current path. We need to reset the path before the new clipping rectangle is defined (render beginPath). Change-Id: I068b7fb856bdd66f6c408f22f4d0b3e6179e626c
2016-01-12Use ReadWriteLock in SharedInstanceBufferRalf Sternberg1-9/+39
Since instances are created only once but requested often, a read write lock that allows for concurrent reads and only blocks on write access should improve throughput. Since SharedInstanceBuffer is used by SingletonUtil, this should speed up access to singletons. Change-Id: I62691ebb27434807b35f8ed61333c8ded2c96939
2016-01-12Fix client crash when GridItem cell properties are resetIvan Furnadjiev1-33/+19
When GridItem cell property (foregrounds, backgrounds, fonts) is reset, null value is rendered by the protocol (commits: 108c40d13aebd726a5382044aa6163d5fea0a8f2 8edd038e9afc719a48ec1ec82dff6deffecaddc6 9fe437fc806f00460b2c0fe80b9e0baa78c30cbd). GridItemHandler can't handle null values correctly, which leads to a client crash. 484755: 3.1 M4: client error: Operation set failed on GridItem: c is null https://bugs.eclipse.org/bugs/show_bug.cgi?id=484755 Change-Id: Ib5120a2bfe5e2468f77ba349f19356b7673ab43b
2016-01-05Fix compile warnings in org.eclipse.swt.widgets packageIvan Furnadjiev11-111/+143
Change-Id: I8b9b81d6141acb828294657cc75da4b41947e718
2015-12-22Use ConcurrentHashMap instead of synchronized map to improve throughputPaul Bilnoski1-3/+2
Signed-off-by: Paul Bilnoski <bilnoski@tamu.edu>
2015-12-19Fix Exceptions on installing/uninstalling bundles2-6/+6
Installing and starting a bundle which causes a RegistryChangeEvent from a RAP application displays an ugly exception in this application. The event needs the current Display but is processed in a backround thead. The fix is to keep a reference to the current Display from UI Thread and reuse it in the listener executed in background thread to avoid NPE or "IllegalStateException: No context available outside of the request service lifecycle" Change-Id: I3afee116e558fa32da85c8724a7f07dd9ba8b010 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399887 Signed-off-by: <a_mergey@yahoo.fr>
2015-12-17Use varargs in some Combo/CCombo/PaletteData methodsIvan Furnadjiev3-4/+4
The platform has changed the API of some methods from arrays to varargs: - org.eclipse.swt.graphics.PaletteData#PaletteData(RGB...) - org.eclipse.swt.widgets.Combo#setItems(String...) Change CCombo too: - org.eclipse.swt.custom.CCombo.setItems(String...) Change-Id: I47d9723ed2ebdd049c94c1c2a468a068c116f4c2
2015-12-14Align List, Combo and DropDown theming with Table/Tree/GridTim Buschtöns1-80/+14
Change all list-like widgets themes to use the same non-inverting hover and selection colors as Table, Tree and Grid. Since these widgets don't have the same semi-transparent "overlay" element, the actual values are different, but match Table & Co. visually. Change-Id: I4a524f8aeb920c35a8243a83868984e316e2816d Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-14Use semi-transparent row overlay in Grid/Tree/Table theming Tim Buschtoens1-105/+25
As a side-effect of recent refactorings the vertical grid lines in Tree/Table/Grid are no longer placed on top of the rows but inside them as part of the cell background element. As a result the overlay element hides the the vertical lines when the row is hovered or selected, which looks very strange, especially on hover. Using a semi-transparent row overlay not only fixes this issue but also allows cell backgrounds to shine through a selection and gives the grid a more spreadsheed-like appearance. Some entries in Tree.Test.css and Grid.Test.css were incorrectly referencing Table. This was also fixed. Change-Id: I083c91bce261c40f7ec346dd8ef9d3046a97d72d Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-14Use horizontal grid lines instead of alternating row colors in GridTim Buschtoens1-10/+9
Using the new column span feature of Nebula Grid looks wrong when used with vertical grid lines but without horizontal ones. When horizontal grid lines are enabled the alternating background make the appearance of the grid overly noisy/crowded, so disable those. Change-Id: Iac861c61b024054cd946a61fd11051594592469a Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-14Add Control#requestLayout() methodIvan Furnadjiev2-0/+48
SWT has added a new requestLayout() method to the Control class. This method does essentially the same thing as widget.getShell().layout(new Control[] {widget}, SWT.DEFER); This change is 1:1 with the original SWT change. Change-Id: I66c7d733550990a2a5b08781f25a4cb4ed0127d5
2015-12-11Add support for Grid own themeIvan Furnadjiev8-81/+685
Currently Grid theme is 1:1 copy from default/business/fancy Tree theme. Change-Id: I46dacd775ac70868a28ab02288902e99def917c5
2015-12-11Change internal themeable widget registrationIvan Furnadjiev6-62/+67
Internally register themeable widgets by their class name instead of their class. This allow us to register a themeable widget without having access to its class (Nebula Grid for example). Change-Id: I35adf2004209abd20401d2fe84b37224d8a4fe08
2015-12-09Don't send FileUpload selection event for empty files listIvan Furnadjiev1-3/+5
When Cancel button is pressed on browser file selection dialog, in Chrome onchange event is fired with empty selected files list. In Firefox no change is detected and no event is fired. As Selection event doesn't make sense for empty files list we should not fire it at all. 480863: [FileUpload] Cancel triggers selection event when FileUpload open multiple times (only in Chrome) https://bugs.eclipse.org/bugs/show_bug.cgi?id=480863 Change-Id: I93f1e90cf75be92abfc88f98906099cb1e3bdc20
2015-12-08Remove support for boolean theming propertiesRalf Sternberg4-92/+15
We don't have any boolean theming properties, and since there are no boolean values in CSS, it's unlikely that we'll need them. Remove dead code. Change-Id: I33b35d018dbf67f760758d707dbd7f436e26d513
2015-12-08Don't create and compare default arrays in TableItemLCAIvan Furnadjiev3-130/+148
If there is no change in a cell property (text, image, cellFont etc.) a default typed array is created and compared for every request. This leads to unnecessary creation and comparison of short-living array objects. With commit 2e41b5c26a8316c1e8c3b25afea640bfbc1b2b43 "null" default values are supported by the client. Create, compare and render arrays for cell properties only if non-default values are set. Render "null" otherwize. Change-Id: Ie5a515e0e78704cd23aff8fed77b69df12b2ecc4
2015-12-08Don't create and compare default arrays in TreeItemLCAIvan Furnadjiev3-64/+80
If there is no change in a cell property (text, image, cellFont etc.) a default typed array is created and compared for every request. This leads to unnecessary creation and comparison of short-living array objects. With commit 2e41b5c26a8316c1e8c3b25afea640bfbc1b2b43 "null" default values are supported by the client. Create, compare and render arrays for cell properties only if non-default values are set. Render "null" otherwize. Change-Id: Id18d2f2339d7af206f5d9452651bf7f6b90b36d2
2015-12-08Don't create and compare default arrays in GridItemLCAIvan Furnadjiev5-110/+181
If there is no change in a cell property (text, image, checked etc.) a default typed array is created and compared for every request. This leads to unnecessary creation and comparison of short-living array objects. With commit 2e41b5c26a8316c1e8c3b25afea640bfbc1b2b43 "null" default values are supported by the client. Create, compare and render arrays for cell properties only if non-default values are set. Render "null" otherwize. Change-Id: I21fb29f29817403e878a08ae82479a1923c6511f
2015-12-08Fix wrong weekday is shown for 29th February of leap yearsIvan Furnadjiev1-2/+2
A new temporary JS Date object is created in DateTimeDate.js#_setWeekday. It points to the current date initially (in our case non-leap year of 2015). If you try to set day and month before the year, 29th of February is invalid date for 2015 and it is ignored. This leads to a wrong date and corresponding weekday. When calculating the weekday (DateTimeDate.js#_setWeekday) we should set year, month, date in this order to avoid invalid date (29th February of non leap year). 483833: Weekday on 29th February of leapyears shown wrong https://bugs.eclipse.org/bugs/show_bug.cgi?id=483833 Change-Id: I9c515e873af61ec39212d1cbb4bfc976897ae942
2015-12-04Support multiple uploadings in FileDialog with SWT.SINGLE styleIvan Furnadjiev3-16/+40
If FileDialog is created with SWT.SINGLE style flag, every new uploaded file replaces the last one instead of prohibiting the upload. The new upload terminates the currently running upload. 480864: [FileDialog] style SWT.SINGLE - support multiple uploading but "select" last uploaded filename https://bugs.eclipse.org/bugs/show_bug.cgi?id=480864 Change-Id: Icaedaea8e44981bb9156f3bb35dd349c06829ecb
2015-12-04Remove default value initialization from GridItem.js constructorTim Buschtöns1-61/+64
There is no need to keep all the default values of GridItem.js in memory all the time. Most of the time only one or two of these are actually set, so instead of initializing them all when the item is created, simply return the default value in the getter in case the value is unset. Change-Id: I4b7f2ccc6dd93c5ceec78ba7c775787eed0f37a6 Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-03Fix column span rendering if span exceeds last columnTim Buschtöns1-1/+2
If the given column span of a cell does include more columns than exist, simply use the last existing column to determine the actual span. Previously nothing was rendered in this case. Change-Id: I08d76f7ee35adc513d5063531b62cc33d7f7718e Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-03Store GridRow.renderItem arguments on GridRow instanceTim Buschtöns1-205/+197
Instead of looping the arguments through to every single method, store them until the next renderItem call. This also useful because the layout object is useful to renderHeight (for the cellPadding value), which is called outside of renderItem. Change-Id: Ib7ac41dd1a26cd7693a8bd5e1b8ce2545b565781 Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-03Remove GridRowContainerWrapper._getColumnOrderTim Buschtöns1-19/+7
The result of this method is the same as the newly introduced gridConfig.cellOrder array. Using that is better than recalculating the values in an error-prone way based on offsets. Rename the local columnOrder variables to cellOrder to match the naming in other Grid files (cell -> index of column in grid item, column -> actual column object). Fix some tests that failed due to missing cellOrder value. One test value had to be corrected since it's based on a inconsistent (intermediate) state where the new implementation actually produces a different outcome (GridTest line 720). Change-Id: Ide0bea2742b74784ff36024613039f37109f0be2 Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-02Add Colspan support for Nebula GridTim Buschtöns11-131/+248
Pre-compute the row-internal layout before the actual item is rendered, as several values would have to be re-computed several times otherwise. Store the data in an instance of GridRowLayout. There may still be several corner cases where the rendering of the column span does not work correctly, like when spanning more columns than exist. Change-Id: I5c93dea9a9dd57716c6b3f324c65457c0f3ea256 Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-12-01Add support for graphics transformationsIvan Furnadjiev8-2/+542
HTML canvas supports graphics transformation directly. Mapping between SWT Transform class and HTML canvas transformation is 1:1. - add Transform class - add GC#set/getTransform methods - render and apply transform elements 421842: Eclipse RAP/RWT needs the Transform class https://bugs.eclipse.org/bugs/show_bug.cgi?id=421842 Change-Id: I015a93719fd6075fb9e1561eef00f8f7edba5bc1
2015-11-30Check currently hovered grid row before showing a grid cell tooltipTim Buschtöns2-2/+5
If between requesting cell tool tip text from the server and the receiving the response the users somehow manages to move the mouse out of the row but still keeping it inside GridRowContainer, the application was crashing at getToolTipTargetBounds since _hoverRow is null. Fix this by checking the hoverItem before showing the tooltip in GridCellToolTipSupport.showToolTip. Added some comments to make the code a little easier to understand next time we work on it. See Bug 482338 - GridRowContainer.getToolTipTargetBounds can be called when _hoverRow is null Change-Id: I688e4d0a85c619f0843a199a73f2da16f6ba540d Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-11-27Introduce widget "Dispose" event for scriptingIvan Furnadjiev4-3/+30
This event is fired when widget is about to be disposed, but before it is detached from the widget hierarchy and removed from DOM. Change-Id: I0c83428298e9bc0ac5a434ce946485c4e3ccaf82
2015-11-27Fix rwt.html.Style.get not working with detached elementsTim Buschtöns4-86/+38
A while ago we started using rwt.html.Style.get (via RWTQuery) in Grid, but there was a problem: In some browser (at least Chrome) the result would always be an empty string when the element was not (yet) attached to the DOM. That resulted in broken layouts in some cases. The method originally supported different modes, but was drastically reduced since we adopted qooxdoo. That is what now allows us to merge it with rwt.html.Style.getStyleProeprty. The new method works with detached elements as well. Fixes Bug 482823 - [Row Template] Row templates displayed in wrong way after f5 in google chrome Change-Id: Ice9004f30dcd413501081414d56756dc851cd264 Signed-off-by: Tim Buschtöns <tbuschto@eclipsesource.com>
2015-11-26Fix row template cells right alignment when vertical scrollbar appearsTim Buschtöns3-3/+9
This was a two-part problem that was introduced by making the ScrollBars work as overlays in RAP 3.0 1 - The rows in the grid extended beyond the client area of the grid. This is as side-effect of the revised row width calculation based on the column model. When the vertical scrollbar is visible, the rows are made a bit wider than the sum of all columns to be able to scroll far enough horizontally. If we didn't do that the vertical scrollbar would cover part of the last column. The row width has no effect on how the column model is rendered within the row. In case of templates the width of the rows is supposed to always match the width of the grid, and horizontal scrolling is never enabled. However, the code for the row width calculation still added the extra area for horizontal scrolling as if the server would enable it. Now it is only added when horizontal scrolling is actually enabled. 2 - The bounds given to the template renderer didn't respect the area covered by the vertical scrollbar. Substract that area from the given bounds and the renderer shifts the right-aligned cells a bit. See Bug 481320 - RowTemplates with right aligned cell and vscroll positioned off right edge Change-Id: Id6b302b2ef59ba4a42ecbcb01738dd38df4b9ed6
2015-11-25Fix RTL mirroring not being applied on new GridRowsTim Buschtöns1-0/+1
The recently introduced mirror property of GridRow was not set when direction creating new rows, only when changing the "direction" property of Grid. See Bug 482123 - [Combo] Combo list items alignment is broken when RTL is set Change-Id: I52038e1bdf3bd5301db0abbeed28999f913d7a43
2015-11-24Favor named functions over variable assignments in JSRalf Sternberg4-149/+149
Named functions (`function foo() {...}`) are safer than functions assigned to variables (`var foo = function() {...};`) because they are "hoisted" to the beginning of the scope [1] and are therefore always available. Moreover, this syntax is slightly shorter. Disable JSHint warnings for functions that are used before they are defined. These warnings aren't useful for the reasons mentioned above. [1] http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html [2] http://jshint.com/docs/options/#latedef Change-Id: Icc698100b35951c9e6f88948b8dacf8b544daf36
2015-11-24Suppress mouse wheel events with undefined deltaIvan Furnadjiev1-1/+1
Chrome may sometimes fire mouse wheel events with a undefined delta, which causes the Grid scrolling to compute NaN as the new vertical offset. 480204: Vertical scrolling broken in Chrome https://bugs.eclipse.org/bugs/show_bug.cgi?id=480204 Change-Id: Ib83d26dabc18c79edf6f6dcfe9a5ccb6fab87bd8
2015-11-19Fix Slider doesn't respect parent orientationIvan Furnadjiev1-0/+1
Parent orientation is applied to a control in Control#createWidget (checkOrientation). This method was overrided by the Slider and didn't have a supper call. Change-Id: Iaa3541993a42aa87f16a21e91870925cc76e8c4f
2015-11-19Fix DateTime layout in some cases when RTL orientation is setIvan Furnadjiev2-0/+2
DateTime(Date/Time) subwidget bounds are calculated and set by the server (including spinner). Internal layout (_date/_timePane width) depends on spinner width and should be recalculated when the value changes. Change-Id: I5d56bab6db34818cb4f7c4f1f19fb1eff0b465fd
2015-11-18Align ExpandItem header text to the right when RTL orientation is setIvan Furnadjiev1-0/+1
Switch ExpandItem.js#_header horizontalChildrenAlign property when direction is changed. Change-Id: I37663db468e624b3782abab4e771d91f8167a6b0
2015-11-18Remove dead code for Firefox <4Ralf Sternberg1-99/+88
These Firefox versions aren't supported anymore and very unlikely to be still around anywhere. Change-Id: I8a272adac7d3a314934071f26b080cbad12a719b
2015-11-18Add missing StructuredViewer#getStructuredSelection() methodIvan Furnadjiev1-1/+22
This method has been added to JFace StructuredViewer in 4.5M2. 481866: Add getStructuredSelection() method for StructuredViewer https://bugs.eclipse.org/bugs/show_bug.cgi?id=481866 Change-Id: I5dfebf3b2b494c7cd7647fd0b52cab4df9b84ba4
2015-11-18Remove "Referer" http header from all requestsIvan Furnadjiev1-3/+0
Some vulnerability detection softwares detects the "Referer" HTTP header in all AJAX requests as potential security risk. This header is leftover from original Qooxdoo code and is not used by RAP framework. 482126: "Referer" http header set from request.js script is detected as XSS vulnerability https://bugs.eclipse.org/bugs/show_bug.cgi?id=482126 Change-Id: I9437c60fed933c2bf034fa196e901c574a6ea755
2015-11-17Remove unneeded IGCAdapter interfaceIvan Furnadjiev5-32/+11
Both IGCAdapter interface and its single implementation GCAdapter are internal. There is no need for such interface. Change-Id: Iaef5ea28ef731093ada9dc4a8279c2b5a95dcefb
2015-11-16Render reparenting before widget disposalIvan Furnadjiev5-14/+71
Dispose operations must be rendered after changing the parent to avoid client crashes when the old parent is disposed (see bug 472298). On the other hand, disposed operations must be rendered before the creation of new widgets, to respect the correct position of the widgtes (when they are added at a specific index). Introduce ReparentedControls class that holds all reparented controls, similar to DisposedWidgets. Render the parent property of reparented controls in DisplayLCA (before widgets disposal) instead in ControlLCAUtil. 481987: Separators are displayed at wrong position in context menu https://bugs.eclipse.org/bugs/show_bug.cgi?id=481987 Change-Id: I78631e5094f4be8d9fe71266ddf08ba4d6dcab06

Back to the top