btBrowsePackage.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
try {
PythonPackageSelectionDialog dialog = new PythonPackageSelectionDialog(getShell(), false);
dialog.open();
Object firstResult = dialog.getFirstResult();
if (firstResult instanceof SourceFolder) { //it is the default package
SourceFolder f = (SourceFolder) firstResult;
textPackage.setText("");
textSourceFolder.setText(f.folder.getFullPath().toString());