| [news.eclipse.platform] Re: How to get default font in Table |
Ed,
Tom,
It's easy, though not self evident. I suppose it's documented somewhere in that documentation I never read. :-)
It also seems a little dangerous to use a global registry for a particular column viewer. You'd certainly need to be careful to create
a key that's unique to this particular column viewer wouldn't you? (Especially for code that might be reused a lot and have different fonts in different places.) And then I'm not certain if this registry gets cleaned up when my viewer is deleted, so it might accumulate viewer-specific garbage.
I'll bet there isn't a single IFontLabelProvider implementation that doesn't need to keep track of the default font for what it's viewing, so I would have hoped for something more "built-in". One problem I see in this regard is that while an IContentProvider has an inputChanged so it knows the viewer that's using it, the ILabelProvider has no such mechanism (that I know of).
Tom