Package org.eclipse.emf.ecp.ui.view.swt
Class DefaultReferenceServiceFactory
- java.lang.Object
-
- org.eclipse.emf.ecp.ui.view.swt.DefaultReferenceServiceFactory
-
- All Implemented Interfaces:
EMFFormsViewServiceFactory<ReferenceService>
public class DefaultReferenceServiceFactory extends java.lang.Object implements EMFFormsViewServiceFactory<ReferenceService>
The Factory for creating theDefaultReferenceService
.- Since:
- 1.8
- Author:
- Eugen Neufeld
-
-
Constructor Summary
Constructors Constructor Description DefaultReferenceServiceFactory()
Initializes me.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReferenceService
createService(EMFFormsViewContext emfFormsViewContext)
Creates a new instance of the provided service.EMFFormsViewServicePolicy
getPolicy()
Defines when the service should be activated.double
getPriority()
The priority of the service.EMFFormsViewServiceScope
getScope()
Defines where the service should be activated.java.lang.Class<ReferenceService>
getType()
The type of the actual service provided by this provider.
-
-
-
Method Detail
-
getPolicy
public EMFFormsViewServicePolicy getPolicy()
Description copied from interface:EMFFormsViewServiceFactory
Defines when the service should be activated.- Specified by:
getPolicy
in interfaceEMFFormsViewServiceFactory<ReferenceService>
- Returns:
- The
EMFFormsViewServicePolicy
describing when the service should be activated
-
getScope
public EMFFormsViewServiceScope getScope()
Description copied from interface:EMFFormsViewServiceFactory
Defines where the service should be activated.- Specified by:
getScope
in interfaceEMFFormsViewServiceFactory<ReferenceService>
- Returns:
- The
EMFFormsViewServiceScope
describing where the service should be activated
-
getPriority
public double getPriority()
Description copied from interface:EMFFormsViewServiceFactory
The priority of the service. The usage of this service is twofold:- A service with a higher priority is more likely to be used if more than one service of the same type is registered.
- A service with lower priority is instantiated and thereby executed earlier than other services of all types with higher priorities
- Specified by:
getPriority
in interfaceEMFFormsViewServiceFactory<ReferenceService>
- Returns:
- The priority of this service
-
getType
public java.lang.Class<ReferenceService> getType()
Description copied from interface:EMFFormsViewServiceFactory
The type of the actual service provided by this provider.- Specified by:
getType
in interfaceEMFFormsViewServiceFactory<ReferenceService>
- Returns:
- The Class of the actual service
-
createService
public ReferenceService createService(EMFFormsViewContext emfFormsViewContext)
Description copied from interface:EMFFormsViewServiceFactory
Creates a new instance of the provided service.- Specified by:
createService
in interfaceEMFFormsViewServiceFactory<ReferenceService>
- Parameters:
emfFormsViewContext
- TheEMFFormsViewContext
to use during the creation of the service- Returns:
- A new instance of the provided service or null if the service should not be created
-
-