Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Replacing Editor Icons at workbench startup
Replacing Editor Icons at workbench startup [message #331693] Tue, 16 September 2008 16:43
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
We have a requirement to change the icons for an editor based on some
attributes of the object being edited.

We currently do this using the following code (which is indirectly called
from addPages():

setPartName(artifact.getName());
AbstractArtifactLabelProvider prov = new AbstractArtifactLabelProvider();
setTitleImage(prov.getImage(artifact));

This works fine up to the point when you close eclipse. When you restart,
the editor in focus is loaded correctly, but those without focus do not
get the correct icon. They do all get the correct Title (that which was
set using the partName above).

Items that are out of focus clealry read their titles from workbench.xml
at start up, but they simply pick up the icon that is defined in the
org.eclipse.ui.editors extension.

Is there a way of either saving the icon to be used when the workbench
state is saved, or forcing all editors to execute some code before they
gain focus?

Thanks in advance,

Richard
Previous Topic:Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards?
Next Topic:Export-Package version when creating Plug-in from existing JAR archives
Goto Forum:
  


Current Time: Wed Apr 24 20:31:53 GMT 2024

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

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

Back to the top