public void updateLabel(ViewerLabel label, TreePath elementPath) {
Object element = elementPath.getLastSegment();
if (element instanceof ISourceModelElement && elementPath.getSegmentCount() > 1) {
Object parent = elementPath.getParentPath().getLastSegment();
IModelElement context = (parent instanceof IModelElement ? (IModelElement) parent : null);
// TODO CD revise
label.setImage(getImage((ISourceModelElement) element, context, false));
label.setText(getText((ISourceModelElement) element, context, false));
}
}