Search in sources :

Example 1 with StructuredViewerManager

use of org.eclipse.ui.internal.navigator.extensions.StructuredViewerManager in project polymap4-core by Polymap4.

the class NavigatorContentService method updateService.

protected void updateService(Viewer aViewer, Object anOldInput, Object aNewInput) {
    // NavigatorContentServiceContentProvider, which gets us here
    if (isDisposed)
        return;
    synchronized (this) {
        if (structuredViewerManager == null) {
            structuredViewerManager = new StructuredViewerManager((StructuredViewer) aViewer, this);
            structuredViewerManager.inputChanged(anOldInput, aNewInput);
        } else {
            structuredViewerManager.inputChanged(aViewer, anOldInput, aNewInput);
        }
        for (Iterator contentItr = contentExtensions.values().iterator(); contentItr.hasNext(); ) {
            NavigatorContentExtension ext = (NavigatorContentExtension) contentItr.next();
            if (ext.isLoaded()) {
                structuredViewerManager.initialize(ext.internalGetContentProvider());
            }
        }
        rootContentProviders = extractContentProviders(findRootContentExtensions(aNewInput));
    }
}
Also used : NavigatorContentExtension(org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension) INavigatorContentExtension(org.eclipse.ui.navigator.INavigatorContentExtension) ListIterator(java.util.ListIterator) Iterator(java.util.Iterator) StructuredViewerManager(org.eclipse.ui.internal.navigator.extensions.StructuredViewerManager) StructuredViewer(org.eclipse.jface.viewers.StructuredViewer)

Aggregations

Iterator (java.util.Iterator)1 ListIterator (java.util.ListIterator)1 StructuredViewer (org.eclipse.jface.viewers.StructuredViewer)1 NavigatorContentExtension (org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension)1 StructuredViewerManager (org.eclipse.ui.internal.navigator.extensions.StructuredViewerManager)1 INavigatorContentExtension (org.eclipse.ui.navigator.INavigatorContentExtension)1