use of org.erlide.engine.model.root.IOpenable in project erlide_eclipse by erlang.
the class SourceRefElement method getOpenableParent.
/**
* Return the first instance of IOpenable in the hierarchy of this type
* (going up the hierarchy from this type);
*/
@Override
public IOpenable getOpenableParent() {
IParent parent = getParent();
while (parent != null) {
if (parent instanceof IOpenable) {
return (IOpenable) parent;
}
if (parent instanceof IErlElement) {
final IErlElement parentElement = (IErlElement) parent;
parent = parentElement.getParent();
} else {
break;
}
}
return null;
}
Aggregations