Bug 202316 - [Forms] Add gradient sharing support for FormHeading
Summary: [Forms] Add gradient sharing support for FormHeading
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 208117 (view as bug list)
Depends on: 200690
Blocks:
  Show dependency tree
 
Reported: 2007-09-05 14:57 EDT by Adam Archer CLA
Modified: 2007-11-01 15:14 EDT (History)
4 users (show)

See Also:
agarcher: review? (cgold)


Attachments
patch (19.25 KB, patch)
2007-09-09 23:24 EDT, Adam Archer CLA
no flags Details | Diff
patch (19.30 KB, patch)
2007-09-10 13:43 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Archer CLA 2007-09-05 14:57:47 EDT
Section header gradients will be shared globally as a result of bug 200690. Similar support should be added for FormHeading.
Comment 1 Chris Aniszczyk CLA 2007-09-05 18:08:55 EDT
I'm watching you Adam :)
Comment 2 Adam Archer CLA 2007-09-09 23:24:25 EDT
Created attachment 77960 [details]
patch

Added support to FormImages to create the gradients for FormHeading. These gradients are created differently and use different parameters, so another getter was added with a different signature.

Expanded the JUnit tests for FormImages to include the new functionality.

Also modified markFinished(Image) to dispose of the image if it was not found in the HashMaps. This is because under some circumstances the gradientImage in FormHeading does not come from FormImages (if it's user defined). In this case we do not need to worry about that difference as FormImages will dispose of it for us.
Comment 3 Chris Goldthorpe CLA 2007-09-10 12:30:12 EDT
I got a compilation error when I applied the patch:

Severity and Description	Path	Resource	Location	Creation Time	Id
The method hashCode() in the type Object is not applicable for the arguments (int[])	org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets	FormImages.java	line 135	1189441278243	2760

I'm compiling using the Java 1.4 compliance level.

Comment 4 Adam Archer CLA 2007-09-10 13:43:46 EDT
Created attachment 78001 [details]
patch

Oops... I didn't realize that was 1.5 code.

Fixed.
Comment 5 Chris Goldthorpe CLA 2007-09-10 14:07:43 EDT
Fix committed to HEAD.
Comment 6 Chris Goldthorpe CLA 2007-11-01 15:14:46 EDT
*** Bug 208117 has been marked as a duplicate of this bug. ***