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

cleaning up some code

refs 1338
parent f1f59f52
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 YELLOW Hash: 13865E34DE72E3D2CD6F39A3B7D5C8F0
* @ConQAT.Rating YELLOW Hash: 1CABED52F473065610847443BA1A3920
*/
public final class KernelModelElementUtils {
......@@ -111,14 +111,14 @@ public final class KernelModelElementUtils {
* the root model element to be searched.
* @return the referenced element or <code>null</code>.
*/
public static EObject findElementById(int id, EObject root) {
public static IIdLabeled findElementById(int id, EObject root) {
if(root instanceof IIdLabeled && ((IIdLabeled)root).getId() == id) {
return root;
return (IIdLabeled)root;
}
for(Iterator<EObject> iter = root.eAllContents(); iter.hasNext();) {
EObject eo = iter.next();
if(eo instanceof IIdLabeled && ((IIdLabeled)eo).getId() == id) {
return eo;
return (IIdLabeled)eo;
}
}
return null;
......
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