Bug 93162 [api] [open type] Require ability to extend the Type selection mechanism
The Visual Editor for Java has a ChooseBean dialog which directly extends the internal TypeSelectionDialog2. The ChooseBean dialog is used during UI designing to select a 'bean' from the existing 'types', and drop it onto the designing surface (like adding buttons to shells etc.) Optionally we have a text field to let the user say what he wants the bean to be named as, like 'okButton', 'cancelButton' etc. Currently we have to extend the internal TypeSelectionDialog2 dialog to reap the benefits of the caching of types, the jobs which do searches in the background etc. Since we dont want to rely on internals, we would like to have a public mechanism by which we could make use of all the efficient internals of the Type selection process. Also required is ways by which we could control the contents shown in the list of types - like the label provider, image provider, filter for classes, selection notification etc. Implementaion wise, the person owning the dialog could pass in the composite where JDT can house the type selection text and list, or the other way round. This would be a great for us in effectively making resue of the efficient type selection process.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeInfoViewer.java
runnable.run();
			}
		});
	}
	
	private void fillDashLine(TableItem item) {
		Rectangle bounds= item.getImageBounds(0);
		Rectangle area= fTable.getBounds();
		boolean willHaveScrollBar= fExpectedItemCount + 1 > fNumberOfVisibleItems;
		item.setText(fDashLine.getText(area.width - bounds.x - bounds.width - fTableWidthDelta - 
			(willHaveScrollBar ? fScrollbarWidth : 0)));
		item.setImage(fSeparatorIcon);
		item.setForeground(fDashLineColor);
		item.setData(fDashLine);
	}
	private void shortenTable() {
		if (VIRTUAL)
			return;
        if (fNextElement < fItems.size()) {
            fTable.setRedraw(false);
            fTable.remove(fNextElement, fItems.size() - 1);
            fTable.setRedraw(true);
        }
		for (int i= fItems.size() - 1; i >= fNextElement; i--) {
			fItems.remove(i);
		}
	}
	
	private void checkEmptyList() {
		if (fTable.getItemCount() == 0) {