Skip to content
Snippets Groups Projects
Commit 5500e623 authored by Simon Barner's avatar Simon Barner
Browse files

- Assign unique IDs to annotations as soon as the are instantiated (before,...

- Assign unique IDs to annotations as soon as the are instantiated (before, annotations relied on the ID-fixup that is triggered when the model is persisted)
refs 2309
parent e4a881a3
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.base.model.element.IAnnotatedSpecification;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.service.IPersistencyService;
/**
* Base class for {@link IAnnotationValueProvider}s.
......@@ -39,7 +40,7 @@ import org.fortiss.tooling.base.model.element.IModelElement;
* @author diewald, barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 4A309AB5ED479F1856AD26C2AB61B259
* @ConQAT.Rating YELLOW Hash: 68F8F5C4D491184B72784AC7242EEADC
*/
public abstract class ValueProviderBase<T extends IAnnotatedSpecification> implements
IAnnotationValueProvider<T> {
......@@ -198,6 +199,9 @@ public abstract class ValueProviderBase<T extends IAnnotatedSpecification> imple
}
}
// Assign unique id
IPersistencyService.INSTANCE.getTopLevelElementFor(element).prepareIDs(specification);
// Hook specification to model element
element.addSpecification(specification);
......
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