| Summary: | Paint event not sent for table when no columns are visible | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Darin Wright <darin.eclipse> |
| Component: | SWT | Assignee: | Bogdan Gheorghe <gheorghe> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | billy.biggs, cocoakevin, ericwill, Silenio_Quarti, snorthov, veronika_irvine |
| Version: | 3.2 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-GTK | ||
| Whiteboard: | |||
Note: you should get org.eclipse.debug.ui from HEAD when debugging this, to avoid the NPE from bug 139853. We're trying to create columns to the trees width / number of columns. When the variables view is opened, the trees width is 0, so we add a paintListener to the tree and set the column widths when we get a paint event. On GTK we never get this event, on mac and windows we do. If I change our code to set an initial column width of 1 pixel on each of our columns, our paintListener gets called and we're happy again. Sounds like on GTK we are only sending paint events for the cell area and since the columns are of width zero, there is no cell to be drawn. Have you looked at this snippet: http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java It sizes the columns based on table width (same code can be used for tree). Why are you hooking a paint event? Why not a resize event? Do you do this only once and then remove the listener? There's no good reason that we're listening to paint instead of resize events. We just found one that worked and used it. Yes, the listener removes itself the first time it gets an event. Thanks for the pointer to Snippet77. Changing the title and severity of this bug report to indicate the actual problem. (In reply to Darin Wright from comment #0) > 3.2 RC2 > > Steps: > * launch a new empty workspace > * create a Java project with a main type like this: > > public class HelloWorld { > > public static void main(String[] args) { > int x = 5; > System.out.println(x); // BREAKPOINT > } > > } > > * set a breakpoint on the 2nd line as shown > * debug to the breakpoint > * in debug persepctive, close the variables view > * re-open the variables view > EMPTY > I can't reproduce this behavior. Please re-open this bug if the issue persists. No response in awhile: closing this ticket as I cannot reproduce the issue. |
3.2 RC2 Steps: * launch a new empty workspace * create a Java project with a main type like this: public class HelloWorld { public static void main(String[] args) { int x = 5; System.out.println(x); // BREAKPOINT } } * set a breakpoint on the 2nd line as shown * debug to the breakpoint * in debug persepctive, close the variables view * re-open the variables view > EMPTY >> when we re-open the view, we do not get any 'set data' callbacks >> if we then select a thread, we get a callback >> if you then select the top frame, you get callbacks (and it works) >> but closing/re-opening the view, you don't get callbacks Another note: if you turn off columns in the variable view (drop down menu, Layout > Show Columns toggle), then it also works. We don't have the simple SWT example test case showing this failing yet, but we can't figure out why the callbacks are not coming. Critical for debugging on GTK