|Change EditorReference image [message #526432]
||Sun, 11 April 2010 00:17
| Fabio Zadrozny
Registered: July 2009
I'm trying to change the editor image depending on the file name (my use case is that some files always have the same name -- e.g.: __init__.py or models.py, etc) and I'd like to show an icon that represents that file and show the name of the folder where it lies instead of that name...|
Now, I can change the editor name and image without any problems in my subclass of TextEditor with setPartName/setTitleImage, and all goes well, but when the eclipse session is restored, although the title is properly persisted, the icon is not, so, I'm trying to find a way to update that icon, but the only way I found so far is by restoring the editor (while I'd like to only change the image without restoring it).
Anyone knows how to do that? I've experimented a bit with some internal APIs (to propose changing those to public later on), such as WorkbenchPartReference.setImageDescriptor, but even on that case it doesn't update the image properly.
Powered by FUDForum
. Page generated in 0.02411 seconds