1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 15:05:36 +02:00

documentation enhancement

This commit is contained in:
John Cortell 2009-09-29 20:33:03 +00:00
parent d3c83b869d
commit 8e3c7dcb2e

View file

@ -81,6 +81,14 @@ public class PropertiesBasedLabelProvider
return fColumnInfos.get(columnId); return fColumnInfos.get(columnId);
} }
/**
* In addition to guarantees on [labelUpdates] declared by
* {@link IElementLabelProvider}, we further require/assume that all the
* model elements referenced by [labelUpdates] adapt to the same
* {@link IElementPropertiesProvider}.
*
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate[])
*/
public void update(ILabelUpdate[] labelUpdates) { public void update(ILabelUpdate[] labelUpdates) {
IElementPropertiesProvider propertiesProvider = getElementPropertiesProvider(labelUpdates[0].getElement()); IElementPropertiesProvider propertiesProvider = getElementPropertiesProvider(labelUpdates[0].getElement());
if (propertiesProvider == null) { if (propertiesProvider == null) {
@ -91,7 +99,11 @@ public class PropertiesBasedLabelProvider
return; return;
} }
// We are guaranteed that all the provided updates are for the same
// presentation context. Thus we can safely assume they request the same
// columns
String[] columnIds = labelUpdates[0].getColumnIds(); String[] columnIds = labelUpdates[0].getColumnIds();
Set<String> propertyNames = calcPropertyNamesForColumns(columnIds); Set<String> propertyNames = calcPropertyNamesForColumns(columnIds);
// Call the properties provider. Create a request monitor for each label update. // Call the properties provider. Create a request monitor for each label update.