Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOEFeatureAnnotator.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOEFeatureAnnotator.java106
1 files changed, 53 insertions, 53 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOEFeatureAnnotator.java b/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOEFeatureAnnotator.java
index 2bee81d1ff..27c05c7486 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOEFeatureAnnotator.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate.teneo/src/org/eclipse/emf/cdo/server/hibernate/teneo/CDOEFeatureAnnotator.java
@@ -1,53 +1,53 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Taal - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.emf.cdo.server.hibernate.teneo;
-
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.teneo.annotations.mapper.EFeatureAnnotator;
-import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEReference;
-import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEStructuralFeature;
-import org.eclipse.emf.teneo.annotations.pannotation.PannotationFactory;
-
-/**
- * Extends the Teneo EFeatureAnnotator to add an external annotation to each EReference to an EModelElement.
- *
- * @author Martin Taal
- * @since 3.0
- */
-public class CDOEFeatureAnnotator extends EFeatureAnnotator
-{
- public CDOEFeatureAnnotator()
- {
- }
-
- @Override
- public void annotate(PAnnotatedEStructuralFeature aStructuralFeature)
- {
- super.annotate(aStructuralFeature);
-
- // now determine if it needs to be annotated with External
- if (aStructuralFeature instanceof PAnnotatedEReference)
- {
- final PAnnotatedEReference paReference = (PAnnotatedEReference)aStructuralFeature;
- final boolean refersToEcoreModelElement = paReference.getModelEReference().getEReferenceType().getEPackage() == EcorePackage.eINSTANCE;
-
- // these are done with a <any ..> mapping
- final boolean refersToEObject = paReference.getModelEReference().getEReferenceType() == EcorePackage.eINSTANCE
- .getEObject();
- final boolean isPartOfEcoreModel = paReference.getModelEReference().getEContainingClass().getEPackage() == EcorePackage.eINSTANCE;
- if (refersToEcoreModelElement && !isPartOfEcoreModel && !refersToEObject)
- {
- paReference.setExternal(PannotationFactory.eINSTANCE.createExternal());
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Martin Taal - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.emf.cdo.server.hibernate.teneo;
+
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.teneo.annotations.mapper.EFeatureAnnotator;
+import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEReference;
+import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEStructuralFeature;
+import org.eclipse.emf.teneo.annotations.pannotation.PannotationFactory;
+
+/**
+ * Extends the Teneo EFeatureAnnotator to add an external annotation to each EReference to an EModelElement.
+ *
+ * @author Martin Taal
+ * @since 3.0
+ */
+public class CDOEFeatureAnnotator extends EFeatureAnnotator
+{
+ public CDOEFeatureAnnotator()
+ {
+ }
+
+ @Override
+ public void annotate(PAnnotatedEStructuralFeature aStructuralFeature)
+ {
+ super.annotate(aStructuralFeature);
+
+ // now determine if it needs to be annotated with External
+ if (aStructuralFeature instanceof PAnnotatedEReference)
+ {
+ final PAnnotatedEReference paReference = (PAnnotatedEReference)aStructuralFeature;
+ final boolean refersToEcoreModelElement = paReference.getModelEReference().getEReferenceType().getEPackage() == EcorePackage.eINSTANCE;
+
+ // these are done with a <any ..> mapping
+ final boolean refersToEObject = paReference.getModelEReference().getEReferenceType() == EcorePackage.eINSTANCE
+ .getEObject();
+ final boolean isPartOfEcoreModel = paReference.getModelEReference().getEContainingClass().getEPackage() == EcorePackage.eINSTANCE;
+ if (refersToEcoreModelElement && !isPartOfEcoreModel && !refersToEObject)
+ {
+ paReference.setExternal(PannotationFactory.eINSTANCE.createExternal());
+ }
+ }
+ }
+}

Back to the top