lookupButton.setImage(ToolEditorActivator.getImage("icons/look_up.gif"));
lookupButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
ToolType typeClass = ToolClass.fetch(so.getProject(), so.getType());
TypeSelectionDialog dialog = new TypeSelectionDialog(getSite().getWorkbenchWindow().getShell(), true);
dialog.setInitialPattern(soClassText.getText());
dialog.setBlockOnOpen(true);
if (dialog.open() == Dialog.OK){
// find the resource and edit it
Object[] result = dialog.getResult();
if (result.length > 0){
IFile file = (IFile) result[0];
so.setType(file.getName().substring(0, file.getName().lastIndexOf('.')));
}
}