Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 545279 - Grid cells not showing on Mac if setRowHeaderVisible(true)
Summary: Grid cells not showing on Mac if setRowHeaderVisible(true)
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Laurent CARON CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-11 15:54 EDT by Phil Beauvoir CLA
Modified: 2021-07-05 11:39 EDT (History)
4 users (show)

See Also:


Attachments
This is what is should look like (143.45 KB, image/png)
2019-03-11 15:55 EDT, Phil Beauvoir CLA
no flags Details
This is what it looks like in later Grid versions (107.36 KB, image/png)
2019-03-11 15:56 EDT, Phil Beauvoir CLA
no flags Details
This is what it looks like with setRowHeaderVisible(false) (109.20 KB, image/png)
2019-03-11 15:57 EDT, Phil Beauvoir CLA
no flags Details
Screenshot with org.eclipse.nebula.widgets.grid_1.1.0.201909221739 (70.49 KB, image/png)
2019-09-22 14:28 EDT, Phil Beauvoir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2019-03-11 15:54:37 EDT
We use the Grid component to display a table.

Basic simplified code is:

GridTableViewer viewer = new GridTableViewer(client);
viewer.getGrid().setHeaderVisible(true);
viewer.getGrid().setRowHeaderVisible(true);
viewer.getGrid().setRowsResizeable(true);
viewer.getGrid().setCellSelectionEnabled(true);

viewer.setRowHeaderLabelProvider(.....
viewer.setContentProvider(...
viewer.setLabelProvider(...
but not including

This works fine on versions up to (but not including) org.eclipse.nebula.widgets.grid_1.1.0.201711021145.jar.

With the later versions if we set setRowHeaderVisible(true) no cells are displayed.

Pics to follow...
Comment 1 Phil Beauvoir CLA 2019-03-11 15:55:26 EDT
Created attachment 277825 [details]
This is what is should look like
Comment 2 Phil Beauvoir CLA 2019-03-11 15:56:31 EDT
Created attachment 277826 [details]
This is what it looks like in later Grid versions
Comment 3 Phil Beauvoir CLA 2019-03-11 15:57:37 EDT
Created attachment 277827 [details]
This is what it looks like with setRowHeaderVisible(false)

This is what it looks like with setRowHeaderVisible(false)
Comment 4 Phil Beauvoir CLA 2019-03-11 16:05:53 EDT
To reproduce use GridSnippet1

https://raw.githubusercontent.com/eclipse/nebula/master/examples/org.eclipse.nebula.snippets/src/org/eclipse/nebula/snippets/grid/GridSnippet1.java

And add:

grid.setRowHeaderVisible(true);

With that set to true on a Mac = no cells
Comment 5 Phil Beauvoir CLA 2019-03-11 18:48:54 EDT
Tested on:

Eclipse 4.7 and 4.10

Mac 10.12.6 and 10.14.3
Comment 6 Eclipse Genie CLA 2019-03-12 05:24:04 EDT
New Gerrit change created: https://git.eclipse.org/r/138538
Comment 7 Phil Beauvoir CLA 2019-06-18 07:50:03 EDT
Did the fix make it in to release?
Comment 8 Wim Jongman CLA 2019-06-20 05:33:44 EDT
Moving to next milestone. Mirko please move the Gerrit to Github.
Comment 9 Laurent CARON CLA 2019-09-22 13:38:32 EDT
Patch provided by Miko has been applied.
Unfortunaltely I do not have a Mac. 

Phil, can you try this bugfix and give us a feedback ?
Comment 10 Phil Beauvoir CLA 2019-09-22 13:40:45 EDT
(In reply to Laurent CARON from comment #9)
> Patch provided by Miko has been applied.
> Unfortunaltely I do not have a Mac. 
> 
> Phil, can you try this bugfix and give us a feedback ?

Sure can. How do I get it? Is there an update site or download zip?
Comment 11 Laurent CARON CLA 2019-09-22 13:53:12 EDT
The latest snapshot of Nebula is available at the following udate site:
http://download.eclipse.org/nebula/snapshot

Or you can get the source code on https://github.com/eclipse/nebula

Keep us informed please ;)
Comment 12 Phil Beauvoir CLA 2019-09-22 14:28:29 EDT
Created attachment 279973 [details]
Screenshot with org.eclipse.nebula.widgets.grid_1.1.0.201909221739

Sorry, it hasn't fixed the issue.

I tried org.eclipse.nebula.widgets.grid_1.1.0.201909221739.jar and it looks the same as in Comment #3

The result is the same as before. And with setRowHeaderVisible(false) it looks like this.

Mac 10.12.6
Eclipse 4.11
Comment 13 Phil Beauvoir CLA 2019-09-22 14:30:57 EDT
> and it looks the same as in Comment #3

I mean Comment #2
Comment 14 Laurent CARON CLA 2019-09-23 10:24:34 EDT
Sorry of that ;(

I'm gonna look for a Mac OS computer.
Comment 15 Laurent CARON CLA 2019-09-24 15:45:55 EDT
Set status to "reopened"
Comment 16 Laurent CARON CLA 2019-10-09 15:41:18 EDT
Phil, good news I've reproduced the problem on a mac... I "just" have to find how to fix it ;)
Comment 17 Phil Beauvoir CLA 2019-10-09 15:43:11 EDT
(In reply to Laurent CARON from comment #16)
> Phil, good news I've reproduced the problem on a mac... I "just" have to
> find how to fix it ;)

Good news, Laurent! I did take a look at the code to see if I could make a fix, but I thought best if an expert looked at it. :-)
Comment 18 Laurent CARON CLA 2019-10-25 07:40:25 EDT
Bug has been finally fixed in Nebula 2.3.0

On mac if one sets the width of a GridColumn before the layout of the grid, the column size was ... 1px !
Comment 19 Phil Beauvoir CLA 2019-10-25 08:18:07 EDT
Yay!

Tested with version 1.1.0.201910251134 on my app and it works.

Thanks for fixing. :-)
Comment 20 Laurent CARON CLA 2019-10-25 08:24:12 EDT
Good news, happy to help :)