| Summary: | Reentrant call in ColumnViewer when setting selection on a TableViewer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Tim Moore <tmm-bugs.eclipse> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | adietish, eclipse.felipe, ejj-eclipsebugs, hsoliwal | ||||
| Version: | 4.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Tim Moore
Created attachment 179246 [details]
Test Case
A little more information: it appears that when the text is empty for a new TableItem then TableItem.setText(...) is a no-op and returns early, without fully initializing and setting the "cached" field. It appears the other setters, or at least TableItem.setImage(...), cannot proceed without this method having completed normally. Actually the test case does fail on Windows(7). I don't know why I thought otherwise at the time. Bug in JFace ? (In reply to comment #4) > Bug in JFace ? Nope!! There seems to be a difference in how SWT handles setText for first column as opposed to others. In method TableItem#setText (int, String) the following two snippets make the difference if (index == 0) { if (string.equals (text)) return; super.setText (string); } And if ((parent.style & SWT.VIRTUAL) != 0) cached = true; //not called when index = 0 & same text (In reply to comment #5) > In method TableItem#setText (int, String) the following two snippets make the > difference > if (index == 0) { > if (string.equals (text)) return; > super.setText (string); > } > And > if ((parent.style & SWT.VIRTUAL) != 0) cached = true; > //not called when index = 0 & same text Keep reading the code: if (strings != null) { if (string.equals (strings [index])) return; strings [index] = string; } It means "cached = true;" will not happen when calling setText() with the same text. Consistent for all columns I'd expect. If the problem is in SWT, please provide a SWT only snippet that shows it. Thank you. (In reply to comment #6) The attached Test case clearly & sufficiently demonstrates the problem on my machine - can you observe the same on your machine ? And, the difference lies around the highlighted SWT code. > > Keep reading the code: > Sure, I can look at it further when I have spare time - same for snippet :) 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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie. |