/**
  * Return whether the given node is visible in the page based on the mode in the configuration.
  *
  * @param node a diff node
  * @return whether the given node is visible in the page
  */
 protected boolean isVisible(IDiff node) {
   ISynchronizePageConfiguration configuration = getConfiguration();
   if (configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
       && node instanceof IThreeWayDiff) {
     IThreeWayDiff twd = (IThreeWayDiff) node;
     int mode = configuration.getMode();
     switch (mode) {
       case ISynchronizePageConfiguration.INCOMING_MODE:
         if (twd.getDirection() == IThreeWayDiff.CONFLICTING
             || twd.getDirection() == IThreeWayDiff.INCOMING) {
           return true;
         }
         break;
       case ISynchronizePageConfiguration.OUTGOING_MODE:
         if (twd.getDirection() == IThreeWayDiff.CONFLICTING
             || twd.getDirection() == IThreeWayDiff.OUTGOING) {
           return true;
         }
         break;
       case ISynchronizePageConfiguration.CONFLICTING_MODE:
         if (twd.getDirection() == IThreeWayDiff.CONFLICTING) {
           return true;
         }
         break;
       case ISynchronizePageConfiguration.BOTH_MODE:
         return true;
     }
   } else if (configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY
       && node instanceof ITwoWayDiff) {
     return true;
   }
   return false;
 }