/** * Specific should be hidden method taking into account the selected filters. * * <p>Almost the same as {@link * org.eclipse.emf.compare.diff.metamodel.util.DiffAdapterFactory#shouldBeHidden(EObject)} but * call {@link #isHidden(DiffElement)}. * * @param element The element of which we need to check the "hidden" state. * @return <code>true</code> if the given element should be hidden, <code>false</code> otherwise. */ private boolean shouldBeHidden(EObject element) { boolean result = false; if (element instanceof DiffElement) { final DiffElement diff = (DiffElement) element; final Iterator<AbstractDiffExtension> it = diff.getIsHiddenBy().iterator(); while (it.hasNext()) { final AbstractDiffExtension extension = it.next(); if (!extension.isIsCollapsed()) { result = true; } } result = result || isHiddenInMyContext((DiffElement) element); } if (element instanceof DiffGroup) { final DiffGroup group = (DiffGroup) element; if (filteredSubchanges(group) == 0) { result = true; } } return result; }