Bug 332823 - No application icon on main windows
Summary: No application icon on main windows
Status: CLOSED DUPLICATE of bug 280825
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords: ui
: 361130 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-17 03:39 EST by keersbulik CLA
Modified: 2012-10-25 05:55 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description keersbulik CLA 2010-12-17 03:39:06 EST
Build Identifier:   e4 SDK	0.9.0.I20100618-1645

I don't succed to set acustom icon for a TrimmedWindow using the application definition. Application.e4xmi.
The default icon is always diplayed.

Reproducible: Always

Steps to Reproduce:
1.On the main Application.e4xmi we create a TrimmedWindow as main window of ours application.

<children xsi:type="basic:TrimmedWindow" xmi:id="id" elementId="mainwindow" iconURI="a_valid_URI" label="label" width="1024" height="768" >

The iconUri is an URI located in a bundle : iconURI="platform:/plugin/<bundle>/icons/icon.bmp"

2. When lauching the application the default icon displayed instead of the specified icon.


I tried to use a png instead of a bmp it didn't work anymore. 
I tried to display this icon as Part icon, an it's ok.
Comment 1 Remy Suen CLA 2011-01-07 09:20:10 EST
Do you see Shell's setImage(Image) method being called?
Comment 2 keersbulik CLA 2011-01-07 11:34:38 EST
Yes the method setImages is called, but the image array is empty.
The setImage is called to with a not null image but it seems it is not my image, i can't be sure because it's hard to see the content of an image using eclipse debbuger, but the height is equal to -1.

I have taken a look to the getIconURI from WindowImpl. It return "platform:/plugin/<bundle>/icons/icon.bmp" as define in the Application.e4xmi
(In reply to comment #1)
> Do you see Shell's setImage(Image) method being called?
Comment 3 Remy Suen CLA 2011-01-07 15:47:03 EST
I think the call to setImages(Image[]) is the problem. If you comment out that line does it work?
Comment 4 keersbulik CLA 2011-01-10 04:37:44 EST
Yes indeed, if i comment the line "wbwShell.setImages(Window.getDefaultImages())"
it works.

I will try find a workaround that allows me to set the images using Window.setDefaultImages before "wbwShell.setImages(Window.getDefaultImages())" call.

Thanks !

(In reply to comment #3)
> I think the call to setImages(Image[]) is the problem. If you comment out that
> line does it work?
Comment 5 Remy Suen CLA 2011-10-18 14:43:56 EDT
*** Bug 361130 has been marked as a duplicate of this bug. ***
Comment 6 Lars Vogel CLA 2012-10-25 05:55:47 EDT
Should be fixed in the current Eclipse integration build. 

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_2_maintenance&id=68563a1ed96cd665494202405ba23ec80dca42eb

*** This bug has been marked as a duplicate of bug 280825 ***