From 233cf9a9d05fa01087336b5aaf60fdf0104b724b Mon Sep 17 00:00:00 2001
From: Daniel Ratiu <ratiu@fortiss.org>
Date: Thu, 5 Jan 2012 08:03:11 +0000
Subject: [PATCH] added fully qualified name

---
 .../kernel/utils/KernelModelElementUtils.java | 25 ++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

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 fe7372bd2..e7334bcce 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;
+	}
 }
-- 
GitLab