if (selectedElement != null && part.equals(fPreviousSelectionProvider) && selectedElement.equals(fPreviousSelectedElement))
if (selectedElement != null && (part == null || part.equals(fPreviousSelectionProvider)) && selectedElement.equals(fPreviousSelectedElement))
	public void selectionChanged(IWorkbenchPart part, ISelection selection) {		if (!needsToProcessSelectionChanged(part, selection))			return;				// Set selection		Object selectedElement= getSingleElementFromSelection(selection);				if (selectedElement != null && part.equals(fPreviousSelectionProvider) && selectedElement.equals(fPreviousSelectedElement))			return;		fPreviousSelectedElement= selectedElement;		Object currentInput= getViewer().getInput();				if (selectedElement != null && selectedElement.equals(currentInput)) {			IJavaElement elementToSelect= findElementToSelect(selectedElement);			if (elementToSelect != null && getTypeComparator().compare(selectedElement, elementToSelect) < 0)				setSelection(new StructuredSelection(elementToSelect), true);			else if (elementToSelect == null && (this instanceof MembersView)) {				setSelection(StructuredSelection.EMPTY, true);				fPreviousSelectedElement= StructuredSelection.EMPTY;			}			fPreviousSelectionProvider= part;			return;		}				// Clear input if needed		if (part != fPreviousSelectionProvider && selectedElement != null && !selectedElement.equals(currentInput) && isInputResetBy(selectedElement, currentInput, part)) {			if (!isAncestorOf(selectedElement, currentInput))				setInput(null);			fPreviousSelectionProvider= part;			return;		} else	if (selection.isEmpty() && !isInputResetBy(part)) {			fPreviousSelectionProvider= part;			return;		} else if (selectedElement == null && part == fPreviousSelectionProvider) {			setInput(null);			fPreviousSelectionProvider= part;			return;		}		fPreviousSelectionProvider= part;				// Adjust input and set selection and 		if (selectedElement instanceof IJavaElement)			adjustInputAndSetSelection((IJavaElement)selectedElement);		else			setSelection(StructuredSelection.EMPTY, true);	}