Package org.eclipse.ui.internal
Class WorkbenchSupportFactory
java.lang.Object
org.eclipse.ui.services.AbstractServiceFactory
org.eclipse.ui.internal.WorkbenchSupportFactory
Create singleton services to make the Workbench singletons available. This is
a "hack" to provide access to the Workbench singletons.
- Since:
- 3.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(Class serviceInterface, IServiceLocator parentLocator, IServiceLocator locator) When a service locator cannot find a service it will request one from the registry, which will call this factory create method.
-
Constructor Details
-
WorkbenchSupportFactory
public WorkbenchSupportFactory()
-
-
Method Details
-
create
public Object create(Class serviceInterface, IServiceLocator parentLocator, IServiceLocator locator) Description copied from class:AbstractServiceFactory
When a service locator cannot find a service it will request one from the registry, which will call this factory create method.You can use the locator to get any needed services and a parent service locator will be provided if you need access to the parent service. If the parent object return from the parent locator is not
null
it can be cast to the service interface that is requested. The parent service locator will only return the serviceInterface service.- Specified by:
create
in classAbstractServiceFactory
- Parameters:
serviceInterface
- the service we need to create. Will not benull
.parentLocator
- A locator that can return a parent service instance if desired. The parent service can be cast to serviceInterface. Will not benull
.locator
- the service locator which can be used to retrieve dependent services. Will not benull
- Returns:
- the created service or
null
-