Example usage for org.eclipse.jface.viewers ContentViewer setInput

List of usage examples for org.eclipse.jface.viewers ContentViewer setInput

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers ContentViewer setInput.

Prototype

@Override
public void setInput(Object input) 

Source Link

Document

The ContentViewer implementation of this Viewer method invokes inputChanged on the content provider and then the inputChanged hook method.

Usage

From source file:org.reuseware.coconut.description.classify.views.facet.JFaceFacetView.java

License:Open Source License

@Override
public void refreshContext(FacetTypeDecorator context, Facet select) {
    if (context == null)
        return;/*from  w ww  . j  a v a  2s.  co  m*/

    // update the viewer
    ContentViewer viewer = getViewer();
    if (viewer != null) {
        if (viewer.getControl().isDisposed() || viewer.getContentProvider() == null) {
            renewView();
            setContentProvider(context.getDecoratee().isMultiValue());
        }
        viewer.setInput(context);
    }

    // if there were an old selection, set viewer's selection
    if (select != null)
        supportEdit(select);

    super.refreshContext(context, select);
}