Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Change view icon programmatically
Change view icon programmatically [message #527298] Wed, 14 April 2010 13:25 Go to next message
Eclipse UserFriend
I'd like to change my view's icon at runtime during startup. I can overrride
getTitleImage in the ViewPart, but that will only work if the view becomes
active. If it is hidden behind another view it will still use what is
defined in the plugin.xml. Does anyone have any idea how to set this? I
would think it has to be some higher level than the ViewPart since that
isn't until the view becomes active.

Thanks!

- Ken
Re: Change view icon programmatically [message #527347 is a reply to message #527298] Wed, 14 April 2010 18:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ken,

This might be is just a thought experiment and ugly but try to get the
iviewdescriptor and create the view.

PlatformUI.getWorkbench().getViewRegistry().find("id.view").createView();

This should call your method.

--

Best Regards,
Wim Jongman
-- Who's General Failure & why is he reading my disk?
(Eclipse Old Skool Quote Service)

> I'd like to change my view's icon at runtime during startup. I can
overrride
> getTitleImage in the ViewPart, but that will only work if the view becomes
> active. If it is hidden behind another view it will still use what is
> defined in the plugin.xml. Does anyone have any idea how to set this? I
> would think it has to be some higher level than the ViewPart since that
> isn't until the view becomes active.
>
> Thanks!
>
> - Ken
Re: Change view icon programmatically [message #527516 is a reply to message #527298] Thu, 15 April 2010 09:55 Go to previous messageGo to next message
Eclipse UserFriend
Ken Prole wrote:
> I'd like to change my view's icon at runtime during startup. I can
> overrride getTitleImage in the ViewPart, but that will only work if the
> view becomes active. If it is hidden behind another view it will still
> use what is defined in the plugin.xml. Does anyone have any idea how to
> set this? I would think it has to be some higher level than the ViewPart
> since that isn't until the view becomes active.

No, you can't see the icon on an IViewReference (see another thread on
this that was active in the last week).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Change view icon programmatically [message #527589 is a reply to message #527516] Thu, 15 April 2010 13:09 Go to previous messageGo to next message
Eclipse UserFriend
What's the date and subject of this message?

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:hq75ql$i82$1@build.eclipse.org...
> Ken Prole wrote:
>> I'd like to change my view's icon at runtime during startup. I can
>> overrride getTitleImage in the ViewPart, but that will only work if the
>> view becomes active. If it is hidden behind another view it will still
>> use what is defined in the plugin.xml. Does anyone have any idea how to
>> set this? I would think it has to be some higher level than the ViewPart
>> since that isn't until the view becomes active.
>
> No, you can't see the icon on an IViewReference (see another thread on
> this that was active in the last week).
>
> PW
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> http://wiki.eclipse.org/Menu_Contributions
> http://wiki.eclipse.org/Menus_Extension_Mapping
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: Change view icon programmatically [message #527633 is a reply to message #527589] Thu, 15 April 2010 15:42 Go to previous message
Eclipse UserFriend
Change EditorReference image, April 10,12

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Previous Topic:RCP plugins session management?
Next Topic:XWT + RCP
Goto Forum:
  


Current Time: Mon Jun 23 10:54:32 EDT 2025

Powered by FUDForum. Page generated in 0.05803 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top