IFeatureProvider featureProvider = getFeatureProvider();
Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);
if (bo instanceof AbstractNode) {
AbstractNode node = (AbstractNode) bo;
ValidationResult res = ValidationFactory.getInstance().validate(node);
if (res.getInformationCount() > 0) {
for (String message : res.getInformations()) {
IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_INFORMATION_TSK);
imageRenderingDecorator.setMessage(message);
decorators.add(imageRenderingDecorator);
}
}
if (res.getWarningCount() > 0) {
for (String message : res.getWarnings()) {
IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_WARNING_TSK);
imageRenderingDecorator.setMessage(message);
decorators.add(imageRenderingDecorator);
}
}
if (res.getErrorCount() > 0) {
for (String message : res.getErrors()) {
IDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_ERROR_TSK);
imageRenderingDecorator.setMessage(message);
decorators.add(imageRenderingDecorator);
}
}