* (org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
@Override
public void setInput(IWorkbenchPart part, ISelection selection) {
if (part instanceof WorkbenchPart) {
final WorkbenchPart workbenchPart = (WorkbenchPart) part;
if (lastPart != workbenchPart) {
lastPart = workbenchPart;
ISelectionProvider selectionProvider = workbenchPart.getSite()
.getSelectionProvider();
// lets remove the listener just in case we've already added it
try {
selectionProvider
.removeSelectionChangedListener(selectionChangedListener);