Class PipelinedViewerUpdate
PipelinedViewerUpdate as the input and return type from intercept
methods on IPipelinedTreeContentProvider.
Clients should use the viewer update to describe how the request from the
upstream extension (see IPipelinedTreeContentProvider for more
information on upstream extensions) should be reshaped when applied
to the tree. A request from an upstream extension to refresh a given element
could result in multiple refresh requests from downstream extensions.
Therefore, the refresh targets are modeled as a set.
Initially, this set will contain the original element that was passed to the refresh requests. Clients may squash the refresh by clearing the set, change the original target by removing the current element and adding a new target, or expand the refresh by adding more elements to the set.
A pipelined extension may receive a PipelinedViewerUpdate as the
result of a call to StructuredViewer.refresh()-methods or
ColumnViewer.update(Object, String[])-methods. The
properties field is only applicable for update()
calls and the updateLabels field is only applicable for
refresh() calls.
- Since:
- 3.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String[]getProperties(Object aTarget) Properties allow optimization forupdatecalls.final Setfinal booleanfinal voidsetProperties(Object aTarget, String[] theProperties) Properties allow optimization forupdatecalls.final voidsetUpdateLabels(boolean toUpdateLabels)
-
Constructor Details
-
PipelinedViewerUpdate
public PipelinedViewerUpdate()
-
-
Method Details
-
getProperties
Properties allow optimization forupdatecalls.- Parameters:
aTarget- The target which may have specific properties associated with it for an optimized refresh.- Returns:
- Returns the properties for the given target. If no properties are specified, then an empty array is returned. null will never be returned.
-
setProperties
Properties allow optimization forupdatecalls.- Parameters:
aTarget- The target of the properties.theProperties- The properties to pass along to theupdatecall.- See Also:
-
getRefreshTargets
- Returns:
- Returns the current set of refresh targets. Clients may add or remove directly to or from this set.
-
isUpdateLabels
public final boolean isUpdateLabels()- Returns:
- Returns the true if the labels should also be updated during the
refresh.
-
setUpdateLabels
public final void setUpdateLabels(boolean toUpdateLabels) - Parameters:
toUpdateLabels- True indicates that calls torefreshshould force the update of the labels in addition to refreshing the structure.
-