diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java index fe7372bd2364b2989608283027ccb9910d247094..e7334bcce8917404108bcb4ed5c311cf2b91027a 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java @@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 9BE107FF231996DA57A0530B9CB163F5 + * @ConQAT.Rating YELLOW Hash: 9C6BFB0E29B3623A7A4BE3DC69FA3BEC */ public final class KernelModelElementUtils { @@ -168,4 +168,27 @@ public final class KernelModelElementUtils { return qualifiedName; } + + /** + * Computes the fully qualified name of an element. + * + * @param element + * the element whose fully qualified name will be computed. + * + * @return the fully qualified name + */ + public static String computeFullyName(INamedElement element) { + String qualifiedName = element.getName(); + + EObject current = element; + while (current != null) { + current = current.eContainer(); + if (current instanceof INamedElement) { + qualifiedName = ((INamedElement) current).getName() + "." + + qualifiedName; + } + } + + return qualifiedName; + } }