Package org.eclipse.ui.navigator
Class NavigatorContentServiceFactory
- java.lang.Object
-
- org.eclipse.ui.navigator.NavigatorContentServiceFactory
-
public final class NavigatorContentServiceFactory extends Object
Provides a factory pattern for creatingINavigatorContentService
s for given viewer ids.Clients may supply the viewer in
createContentService(String, StructuredViewer)
or wait until the content provider is created by the service and set on the viewer. When the content provider is set, the viewer will call inputChanged(), and the content service will update its managed viewer accordingly. Therefore, each content service should be attached to at most one viewer.- Since:
- 3.2
-
-
Field Summary
Fields Modifier and Type Field Description static NavigatorContentServiceFactory
INSTANCE
The singleton instance for creating NavigatorContentServices.
-
Constructor Summary
Constructors Constructor Description NavigatorContentServiceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description INavigatorContentService
createContentService(String aViewerId)
Returns an instance of INavigatorContentService configured for the given id.INavigatorContentService
createContentService(String aViewerId, StructuredViewer aViewer)
Returns an instance of INavigatorContentService configured for the given id.
-
-
-
Field Detail
-
INSTANCE
public static final NavigatorContentServiceFactory INSTANCE
The singleton instance for creating NavigatorContentServices.
-
-
Method Detail
-
createContentService
public INavigatorContentService createContentService(String aViewerId)
Returns an instance of INavigatorContentService configured for the given id. Instances are not shared for the same viewerId.- Parameters:
aViewerId
- The viewer id of interest- Returns:
- An instance of INavigatorContentService configured for the given id.
-
createContentService
public INavigatorContentService createContentService(String aViewerId, StructuredViewer aViewer)
Returns an instance of INavigatorContentService configured for the given id. Instances are not shared for the same viewerId.- Parameters:
aViewerId
- The viewer id of interestaViewer
- The content service can use the given viewer to initialize content providers- Returns:
- An instance of INavigatorContentService configured for the given id.
- See Also:
IContentProvider.inputChanged(org.eclipse.jface.viewers.Viewer, Object, Object)
-
-