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 ; }
Check whether one scope is an ancestor of another