Retrieving font preference setting in Eclipse JDT plugin
I'm not familiar with Eclipse plugin development, so just two minor notes after going through javadoc of the relevant APIs:


FontRegistry has an addListener method which you might want and/or need to listen to and change the font of the textControl when the user changes their font settings.
The comment could be a great method name here (retrieveFontPreference, for example):


// retrieve the font preference from the theme manager
IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
ITheme currentTheme = themeManager.getCurrentTheme();
FontRegistry fontRegistry = currentTheme.getFontRegistry();
Font font = fontRegistry.get(PreferenceConstants.EDITOR_TEXT_FONT);



See also: Clean Code by Robert C. Martin, Bad Comments, p67: Don’t Use a Comment When You Can Use a Function or a Variable