diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ModelUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ModelUtils.java index 0baa5ea7dd6d31e63848a74126e29c004a91616e..0fbd6d6ae98884e22f20ec45970b5d586828b7b7 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ModelUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/ModelUtils.java @@ -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); + } }