Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[nebula-dev] New topic in forum Nebula, called [RichTextPainter] IllegalArgumentException in ResetSpanStylePaintInstruction, by Volker Bier

Title: Eclipse Community Forums
Subject: [RichTextPainter] IllegalArgumentException in ResetSpanStylePaintInstruction Author: Volker Bier Date: Fri, 16 September 2016 06:52
Whenever I have nested span elements like in the following HTML:
Quote:
<span style="color:rgb(255, 0, 0)"><span style="color:rgb(210, 105, 30)">ERROR, STOP_FTC:SAS_Startup failed for ODN_SAS:Ground_Common: COMMUNICATION_ERROR: Error on the communication channel</span></span>


The painter throws an IllegalArgumentException:
Quote:
Caused by: java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:4472)
at org.eclipse.swt.SWT.error(SWT.java:4406)
at org.eclipse.swt.SWT.error(SWT.java:4377)
at org.eclipse.swt.graphics.GC.setForeground(GC.java:3513)
at org.eclipse.nebula.widgets.richtext.painter.instructions.ResetSpanStylePaintInstruction.paint(ResetSpanStylePaintInstruction.java:40)


The problem is that the ResetSpanStylePaintInstruction sets the state color to null instead to the color of the parent span. So when there are two adjacent </span> elements, the first one sets the state color to null and the second one then sets the gc foreground to null.

Shall I file a bug for this, or am I doing something wrong?
[ Reply ][ Quote ][ View Topic/Message ][ Unsubscribe from this forum ]

Back to the top