Community
Participate
Working Groups
SWT Color objects require operating system resources, and so must be disposed when finished with. Furthermore the visualiser allocates all the set Colors it may need upfront - much better would be to only allocate the Colors if/when they are required.
Fixing this by changing the colour classes to return RGB values instead of Color objects. It is then up to the markup provider to allocate and dispose of the required Color objects. In the process of doing this I have also generalised the mechanism of defining a set of colours. I have created an new extension point: org.eclipse.contribution.visualiser.palettes that can be used to contribue a class implementing the new IVisualiserPalette interface. I have converted the two existing colour sets (one in the visualiser and one in AJDT) to be implementors of this extension point. Provider extensions can now optionally include a "paletteid" attribute, refering to a palette which should become the current palette when that provider is selected. A future enhancement would be to add preference page support to allow users to select between contributed palettes.
The preference page support for this and other options is covered by enhancement 73341: Visualiser rendering enhancements