Package org.eclipse.ui.views

# Class WorkbenchViewerSetup

java.lang.Object
org.eclipse.ui.views.WorkbenchViewerSetup

public class WorkbenchViewerSetup extends Object

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the API development team.

Since:
  3.130

## Constructor Summary

Constructors
Constructor
Description
`WorkbenchViewerSetup()`

## Method Summary

Modifier and Type
Method
Description
`static int`
`getItemsLimit()`
EXPERIMENTAL.
`static void`
`setupViewer(ColumnViewer viewer)`
EXPERIMENTAL.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WorkbenchViewerSetup

public WorkbenchViewerSetup()

## Method Details

### getItemsLimit

public static int getItemsLimit()

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the API development team.

Returns the current viewer limit set in the `General` preference page.

Returns:
  `IWorkbenchPreferenceConstants.LARGE_VIEW_LIMIT`

### setupViewer

public static void setupViewer(ColumnViewer viewer)

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the API development team.

Configure a `ColumnViewer` to show limited items per parent before showing an ExpandableNode. Limit used is read from preference `IWorkbenchPreferenceConstants.LARGE_VIEW_LIMIT`. Client must call this before `Viewer.setInput(Object)`

User can change the viewer limit on preference page any time in the lifetime of the viewer. This setup takes care of refreshing the viewer with the new limit set.

Parameters:
  `viewer` - `ColumnViewer` which has to configured for showing limited items.