/**
  * {@inheritDoc}
  *
  * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#getPriority()
  */
 @Override
 public int getPriority() {
   if (delegate == null) {
     return 0;
   }
   return delegate.getPriority() - 1;
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.ecp.edit.spi.ReferenceService#addExistingModelElements(org.eclipse.emf.ecore.EObject,
  *     org.eclipse.emf.ecore.EReference)
  */
 @Override
 public void addExistingModelElements(EObject eObject, EReference eReference) {
   if (delegate == null) {
     return;
   }
   delegate.addExistingModelElements(eObject, eReference);
 }
 /**
  * {@inheritDoc}
  *
  * @see org.eclipse.jface.action.Action#run()
  */
 @Override
 public void run() {
   final EClassifier selectedClassifier = getExistingEClassifiers();
   if (selectedClassifier == null) {
     return;
   }
   referenceService.addNewModelElements(
       selectedClassifier, (EReference) getSetting().getEStructuralFeature());
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.ecp.edit.spi.ReferenceService#openInNewContext(org.eclipse.emf.ecore.EObject)
  */
 @Override
 public void openInNewContext(EObject eObject) {
   treeViewer.setSelection(new StructuredSelection(eObject), true);
   final ISelection selection = treeViewer.getSelection();
   if (!selection.isEmpty()) {
     return;
   }
   if (delegate == null) {
     return;
   }
   delegate.openInNewContext(eObject);
 }