Skip to content
Snippets Groups Projects
Commit 233cf9a9 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

added fully qualified name

parent 9c1958b6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
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