org.eclipse.emf.ecp.edit.spi
Interface ReferenceService

All Superinterfaces:
ViewModelService
All Known Implementing Classes:
DummyReferenceService, ECPReferenceServiceImpl, PreviewReferenceService

public interface ReferenceService
extends ViewModelService

Since:
1.2
Author:
Eugen Neufeld

Method Summary
 void addModelElement(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
          Adds a model element to the EReference.
 org.eclipse.emf.ecore.EObject getExistingElementFor(org.eclipse.emf.ecore.EReference eReference)
          Returns an existing EObject that is suitable for the passed EReference.
 org.eclipse.emf.ecore.EObject getNewElementFor(org.eclipse.emf.ecore.EReference eReference)
          Returns a new EObject that is suitable for the passed EReference.
 void openInNewContext(org.eclipse.emf.ecore.EObject eObject)
          Opens an EObject in a new context.
 
Methods inherited from interface org.eclipse.emf.ecp.view.spi.context.ViewModelService
dispose, getPriority, instantiate
 

Method Detail

addModelElement

void addModelElement(org.eclipse.emf.ecore.EObject eObject,
                     org.eclipse.emf.ecore.EReference eReference)
Adds a model element to the EReference.

Parameters:
eObject - the EObject to add
eReference - the EReference to add the EObject to

getNewElementFor

org.eclipse.emf.ecore.EObject getNewElementFor(org.eclipse.emf.ecore.EReference eReference)
Returns a new EObject that is suitable for the passed EReference.

Parameters:
eReference - the reference to create the element for
Returns:
the created EObject, this EObject is not contained in the tree

getExistingElementFor

org.eclipse.emf.ecore.EObject getExistingElementFor(org.eclipse.emf.ecore.EReference eReference)
Returns an existing EObject that is suitable for the passed EReference.

Parameters:
eReference - the EReference to find an existing Element for
Returns:
an existing EObject that can be used in this EReference, the returned EObject must already be in the containment tree

openInNewContext

void openInNewContext(org.eclipse.emf.ecore.EObject eObject)
Opens an EObject in a new context.

Parameters:
eObject - the EObject to open in a new context


Copyright © 2014. All Rights Reserved.