Skip to content
Snippets Groups Projects
Commit e9f1964c authored by Florian Hölzl's avatar Florian Hölzl
Browse files

added convenience method for unique ID preparation

parent 35afb7c8
No related branches found
No related tags found
No related merge requests found
......@@ -40,4 +40,16 @@ public class ModelUtils {
topLevel.runAsCommand(command);
}
/**
* Assigns unique IDs to the given target model element.
*
* @param context
* a model element already contained in a persisted model
* @throws NullPointerException
* if the context is not contained in a persisted model
*/
public static void prepareUniqueID(EObject element, EObject context) {
IPersistencyService.INSTANCE.getTopLevelElementFor(context).prepareIDs(
element);
}
}
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