public void widgetSelected(SelectionEvent e) {
if (e.getSource() == openPreferences) {
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(new PreferenceNode(
"Hadoop Installation Directory", new MapReducePreferencePage()));
PreferenceDialog dialog =
new PreferenceDialog(this.getShell(), manager);
dialog.create();
dialog.setMessage("Select Hadoop Installation Directory");
dialog.setBlockOnOpen(true);