Replacing Editor Icons at workbench startup [message #331693] |
Tue, 16 September 2008 16:43 |
Richard Craddock 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
|
|
|
Powered by
FUDForum. Page generated in 0.03102 seconds