Skip to content
Snippets Groups Projects
Commit 64f49786 authored by Chen Wenwen's avatar Chen Wenwen
Browse files

YELLOW

refs 1005
parent 8563a532
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: DB0DCA3496B606ED204F984FD71F3658
* @ConQAT.Rating YELLOW Hash: 13865E34DE72E3D2CD6F39A3B7D5C8F0
*/
public final class KernelModelElementUtils {
......@@ -112,6 +112,9 @@ public final class KernelModelElementUtils {
* @return the referenced element or <code>null</code>.
*/
public static EObject findElementById(int id, EObject root) {
if(root instanceof IIdLabeled && ((IIdLabeled)root).getId() == id) {
return root;
}
for(Iterator<EObject> iter = root.eAllContents(); iter.hasNext();) {
EObject eo = iter.next();
if(eo instanceof IIdLabeled && ((IIdLabeled)eo).getId() == id) {
......
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