Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElementFactory.java')
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElementFactory.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElementFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElementFactory.java
index 8d84047ace7..7c998fe3f5e 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElementFactory.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AnnotationModelElementFactory.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2011, 2014 CEA LIST 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
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 417409
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.views.properties.modelelement;
@@ -22,7 +22,7 @@ import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
/**
* A ModelElementFactory for AnnotationModelElements
- *
+ *
* @author Camille Letavernier
*/
public class AnnotationModelElementFactory extends AbstractModelElementFactory<AnnotationModelElement> {
@@ -30,26 +30,26 @@ public class AnnotationModelElementFactory extends AbstractModelElementFactory<A
@Override
protected AnnotationModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
EObject source = EMFHelper.getEObject(sourceElement);
- if(source == null) {
+ if (source == null) {
Activator.log.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
return null;
}
- if (! (source instanceof EModelElement)){
+ if (!(source instanceof EModelElement)) {
Activator.log.warn("The selected element must be an EModelElement"); //$NON-NLS-1$
}
EditingDomain domain = EMFHelper.resolveEditingDomain(source);
- return new AnnotationModelElement((EModelElement)source, domain, context.getName());
+ return new AnnotationModelElement((EModelElement) source, domain, context.getName());
}
@Override
protected void updateModelElement(AnnotationModelElement modelElement, Object newSourceElement) {
EObject eObject = EMFHelper.getEObject(newSourceElement);
- if(!(eObject instanceof EModelElement)) {
+ if (!(eObject instanceof EModelElement)) {
throw new IllegalArgumentException("Cannot resolve EModelElement selection: " + newSourceElement);
}
- modelElement.source = (EModelElement)eObject;
+ modelElement.source = (EModelElement) eObject;
modelElement.domain = EMFHelper.resolveEditingDomain(eObject);
}
}

Back to the top