Bug 157174 [Viewers] Refactor new Viewer API
We are yet not completely happy with the API and refactor it.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DecoratingLabelProvider.java
updateForDecorationReady(settings, element);
			}
		}
	}
	/**
	 * Decorate the settings
	 * 
	 * @param settings
	 *            the settings obtained from the label provider
	 * @param elementPath
	 *            the element path being decorated
	 */
	private void decorateSettings(ViewerLabel settings, TreePath elementPath) {
		Object element = elementPath.getLastSegment();
		if (decorator != null) {
			if (decorator instanceof LabelDecorator) {
				LabelDecorator labelDecorator = (LabelDecorator) decorator;
				String text = labelDecorator.decorateText(settings.getText(),
						element, getDecorationContext());
				if (text != null && text.length() > 0)
					settings.setText(text);
				Image image = labelDecorator.decorateImage(settings.getImage(),
						element, getDecorationContext());
				if (image != null)
					settings.setImage(image);
			} else {
				String text = decorator.decorateText(settings.getText(),
						element);
				if (text != null && text.length() > 0)
					settings.setText(text);