* @param ancestor Scope to check
* @return <code>true</code> if ancestor scope is really an ancestor of
* scope passed as from parameter, <code>false</code> otherwise.
*/
public static boolean isAncestor(IBasicScope from, IBasicScope ancestor) {
IBasicScope current = from;
while (current.hasParent()) {
current = current.getParent();
if (current.equals(ancestor)) {
return true;
}
}
return false;
}