Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321265

Summary: [e4] initialization of GradientDrawer causes IllegalArgumentException
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: bokowski
Version: unspecified   
Target Milestone: 3.4.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 321278, 336432    
Attachments:
Description Flags
fix
none
mylyn/context/zip none

Description Steffen Pingel CLA 2010-07-29 15:13:21 EDT
The exception below is logged on startup with Mylyn installed.

Could not set color: 255, 256, 256

java.lang.IllegalArgumentException: Argument not valid
at org.eclipse.swt.SWT.error(SWT.java:4064)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.graphics.Color.init(Color.java:241)
at org.eclipse.swt.graphics.Color.<init>(Color.java:79)
at org.eclipse.mylyn.internal.tasks.ui.views.GradientDrawer.configureGradientColors(GradientDrawer.java:205)
at org.eclipse.mylyn.internal.tasks.ui.views.GradientDrawer.<init>(GradientDrawer.java:148)
at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.createPartControl(TaskListView.java:927)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:111)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:73)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:181)
Comment 1 Boris Bokowski CLA 2010-07-29 15:21:13 EDT
(In reply to comment #0)
> Could not set color: 255, 256, 256

Where do you get this color from? I think SWT is right, this does indeed look invalid ;-)
Comment 2 Steffen Pingel CLA 2010-07-29 16:11:47 EDT
Yes, we need to add a check of some sort there :). I guess it happens on e4 due to the different default background color for views.
Comment 3 Steffen Pingel CLA 2010-07-30 19:02:13 EDT
Created attachment 175631 [details]
fix
Comment 4 Steffen Pingel CLA 2010-07-30 19:02:15 EDT
Created attachment 175632 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2010-07-30 19:03:02 EDT
Fix committed to head and e_3_6_m_3_4_x branch.