Bug 95843 [open type] Open Type dialog re-selects selected item.
Version: 3.1.0 Build id: I20050509-2010 When opening a type in the open type dialog on M7, if you type in text that does not change the current selection (i.e. continue typing already matched text) the dialog re-selects the item and causes a lot of flashing.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeInfoViewer.java
}
	private void addPopupMenu() {
		Menu menu= new Menu(fTable.getShell(), SWT.POP_UP);
		fTable.setMenu(menu);
		final MenuItem remove= new MenuItem(menu, SWT.NONE);
		remove.setText(JavaUIMessages.TypeInfoViewer_remove_from_history);
		menu.addMenuListener(new MenuAdapter() {
			public void menuShown(MenuEvent e) {
				TableItem[] selection= fTable.getSelection();
				remove.setEnabled(canEnable(selection));
			}
		});
		remove.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				deleteHistoryEntry();
			}
		});
	}
	
	private boolean canEnable(TableItem[] selection) {
		if (selection.length == 0)
			return false;
		for (int i= 0; i < selection.length; i++) {
			TableItem item= selection[i];
			Object data= item.getData();
			if (!(data instanceof TypeInfo))
				return false;
			if (!(fHistory.contains((TypeInfo)data)))
				return false; 
		}