Skip to content
Snippets Groups Projects
Commit eb2c6cfc authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

RED

refs 2255
parent 144ff478
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ public class IDMigrationProvider implements IMigrationProvider {
public boolean needMigration(ITopLevelElement modelElement,
Map<EObject, AnyType> unknownFeatures) {
// if the id of model element is 0
// TODO(VA,B11 & C1)
if(modelElement != null && modelElement.getRootModelElement() != null &&
hasMissingIDs(modelElement.getRootModelElement())) {
return true;
......
......@@ -42,6 +42,8 @@ public class DerivedAnnotationBaseStaticImpl {
* @return See above.
*/
public static <T> T getValue(IDerivedAnnotation<T> annotation) {
// TODO(VA) Am I right that annotation.getDerivedValue entails a calculation?
// If so it would benefit being stored into a local variable instead of being called twice.
if(annotation.getUserAnnotatedValue() != null &&
(annotation.isUserAnnotatedValuePreferred() || annotation.getDerivedValue() == null)) {
return annotation.getUserAnnotatedValue();
......
......@@ -51,6 +51,7 @@ public class AnnotationUtils {
private static <T extends IAnnotatedSpecification> T getAnnotation(
final IModelElement modelElement, EClass eClass) {
// TODO(VA, B11)
final T annotation =
(T)pickFirstInstanceOf((Class<IAnnotatedSpecification>)eClass.getInstanceClass(),
modelElement.getSpecifications());
......@@ -115,7 +116,7 @@ public class AnnotationUtils {
}
// Retrieve annotation / create if the creation does not need to be wrapped into a
// command
// command.
return getAnnotation(modelElement, eClass);
}
......@@ -137,6 +138,7 @@ public class AnnotationUtils {
EList<T> parentSpecificationList = new BasicEList<T>();
List<IModelElement> parentsElements = getParentsWithType(startElement, IModelElement.class);
for(IModelElement currentParentElement : parentsElements) {
// TODO(VA, B11)
parentSpecificationList.add(pickFirstInstanceOf(clazz,
currentParentElement.getSpecifications()));
}
......
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