Skip to content
Snippets Groups Projects
Commit 5f8f90a7 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Annotations: Allow recursive instantiation for EObjects.

parent 5ab69cde
No related branches found
No related tags found
1 merge request!603746
AngleUtils.java 462551eae71738ff51f92c9906bff9a21a375d2b GREEN
AnnotationUtils.java 1da750d19d92658b0bdf6bc18ceb18aa667e557b GREEN
AnnotationUtils.java b136478429b947e265e6c57015ae659fdfb3eac8 YELLOW
BaseMathUtils.java 65f6c39b641cba3c984a38f42b1bbf7dbf3287a3 GREEN
BaseModelElementUtils.java b8775b7a462efc168cf79a017aa3377a782d10f6 GREEN
ConstraintsBaseUtils.java bba938b43756ce6f35c338f6cef21c3ab5d49a9d GREEN
......
......@@ -32,6 +32,7 @@ import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.fortiss.tooling.base.ToolingBaseActivator;
import org.fortiss.tooling.base.annotation.AnnotationEntry;
......@@ -295,11 +296,13 @@ public class AnnotationUtils {
* convenient).
*
* @param element
* {@link IModelElement} for which annotations should be instantiated recursively.
* {@link EObject} for which annotations should be instantiated recursively.
*/
public static void instantiateAnnotationsRecursive(IModelElement element) {
public static void instantiateAnnotationsRecursive(EObject element) {
IAnnotationValueService as = IAnnotationValueService.getInstance();
as.instantiateAnnotations(element);
if(element instanceof IModelElement) {
as.instantiateAnnotations((IModelElement)element);
}
for(IModelElement child : getChildrenWithType(element, IModelElement.class)) {
as.instantiateAnnotations(child);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment