}
}
private Image updateIcon(Type type) {
AnnotationStyle style = editor.getAnnotationStyle(type);
Color fg = new Color(Display.getCurrent(), 0, 0, 0);
Color bg = new Color(Display.getCurrent(), style.getColor().getRed(), style.getColor()
.getGreen(), style.getColor().getBlue());
PaletteData paletteData = new PaletteData(new RGB[] { bg.getRGB(), fg.getRGB() });
ImageData imageData = new ImageData(40, 40, 1, paletteData);
Image image = new Image(Display.getCurrent(), imageData);
GC gc = new GC(image);
String styleString = style.getStyle().name().substring(0, 2);
Point p = gc.stringExtent(styleString);
gc.dispose();
image.dispose();