Community
Participate
Working Groups
The following code compiles cleanly in RC2, but should fail: static { Display display = Display.getCurrent(); PaletteData pData = new PaletteData(0xFF, 0xFF00, 0xFF0000); RGB rgb = ColorConstants.button.getRGB(); int fillColor = pData.getPixel(rgb); ImageData iData = new ImageData(1, 1, 24, pData); iData.setPixel(0, 0, fillColor); iData.setAlpha(0, 0, 200); TRANSPARENCY = new Image(display, iData); } private static final Image TRANSPARENCY; This is a regression (or maybe some preference I don't know about). Eclipse 2.0.2 recognizes the error correctly.
The compilation error, according to however releng is building GEF, is: 1. ERROR in /builds/gefbuilder/eclipse/plugins/org.eclipse.gef/src/org/eclipse/gef/intern al/ui/palette/editparts/PaletteScrollBar.java (at line 52) TRANSPARENCY = new Image(display, iData); ^^^^^^^^^^^^ Cannot reference a field before it is defined
We fixed the compiler since 2.0 to match the spec. Please see bug 26604.
Closing