The method ToolBehaviorProvider.getDecorators() returns an array of Decorators for a pictogram element. What is the expected behaviour when more than one is returned? I expected that they were displayed side by side, but it seems I was too optimistic
For example, in the tutorial:
public class TutorialToolBehaviorProvider extends DefaultToolBehaviorProvider {
...
@Override
public IDecorator[] getDecorators(PictogramElement pe) {
IFeatureProvider featureProvider = getFeatureProvider();
Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);
if (bo instanceof EClass) {
IDecorator imageRenderingDecorator1 = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_ERROR);
imageRenderingDecorator1.setMessage("Error");
IDecorator imageRenderingDecorator2 = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_INFORMATION);
imageRenderingDecorator2.setMessage("Info");
return new IDecorator[] { imageRenderingDecorator1,imageRenderingDecorator2};
}
return super.getDecorators(pe);
}
The two images are placed one in top of the other - only the last one is visible. Is this right?