Package org.eclipse.emf.ecp.spi.ui
Class ECPReferenceServiceImpl
- java.lang.Object
-
- org.eclipse.emf.ecp.spi.ui.ECPReferenceServiceImpl
-
- All Implemented Interfaces:
ReferenceService
,ViewModelService
public class ECPReferenceServiceImpl extends java.lang.Object implements ReferenceService
- Since:
- 1.2
- Author:
- Eugen Neufeld
-
-
Constructor Summary
Constructors Constructor Description ECPReferenceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExistingModelElements(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
Adds existing model elements to theEReference
.void
addNewModelElements(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
Deprecated.Optional<org.eclipse.emf.ecore.EObject>
addNewModelElements(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference, boolean openInNewContext)
Adds new model elements to theEReference
.void
dispose()
Dispose.int
getPriority()
Returns the priority for this view service.void
instantiate(ViewModelContext context)
Instantiate the view service.void
openInNewContext(org.eclipse.emf.ecore.EObject eObject)
Opens anEObject
in a new context.
-
-
-
Method Detail
-
instantiate
public void instantiate(ViewModelContext context)
Instantiate the view service.- Specified by:
instantiate
in interfaceViewModelService
- Parameters:
context
- theViewModelContext
- See Also:
ViewModelService.instantiate(org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
-
dispose
public void dispose()
Dispose.- Specified by:
dispose
in interfaceViewModelService
- See Also:
ViewModelService.dispose()
-
getPriority
public int getPriority()
Returns the priority for this view service.- Specified by:
getPriority
in interfaceViewModelService
- Returns:
- the priority
- See Also:
ViewModelService.getPriority()
-
addNewModelElements
@Deprecated public void addNewModelElements(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
Deprecated.Adds new model elements to theEReference
. The implementation is responsible for providing a selection meachsims, e.g. a dialog.- Specified by:
addNewModelElements
in interfaceReferenceService
- Parameters:
eObject
- theEObject
to addeReference
- theEReference
to add theEObject
to- Since:
- 1.5
-
addNewModelElements
public Optional<org.eclipse.emf.ecore.EObject> addNewModelElements(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference, boolean openInNewContext)
Description copied from interface:ReferenceService
Adds new model elements to theEReference
. The implementation is responsible for providing a selection mechanism, e.g. a dialog.- Specified by:
addNewModelElements
in interfaceReferenceService
- Parameters:
eObject
- theEObject
to addeReference
- theEReference
to add theEObject
toopenInNewContext
- Hints the reference service whether the created model element should be opened in a new context- Returns:
- The created model element
-
addExistingModelElements
public void addExistingModelElements(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
Adds existing model elements to theEReference
. The implementation is responsible for providing a selection meachsims, e.g. a dialog.- Specified by:
addExistingModelElements
in interfaceReferenceService
- Parameters:
eObject
- theEObject
to addeReference
- theEReference
to add theEObject
to- Since:
- 1.5
-
openInNewContext
public void openInNewContext(org.eclipse.emf.ecore.EObject eObject)
Opens anEObject
in a new context.- Specified by:
openInNewContext
in interfaceReferenceService
- Parameters:
eObject
- theEObject
to open in a new context- See Also:
ReferenceService.openInNewContext(org.eclipse.emf.ecore.EObject)
-
-