Bug 36141 Misbehaving property page causes property dialog to fail to open
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
public void widgetDefaultSelected(final SelectionEvent event) {
				TreeItem[] selection = tree.getSelection();
				if (selection.length > 0)
					selection[0].setExpanded(!selection[0].getExpanded());
			}
		});
		
		
		tree.addHelpListener(new HelpListener() {
			 public void helpRequested(HelpEvent event) {
				 
				 if (currentPage != null) {
					 currentPage.performHelp();
				 }
			 }
		});
		IPreferenceNode node = preferenceManager.getRoot();
		IPreferenceNode[] subnodes = node.getSubNodes();
		tree.setFont(parent.getFont());
		for (int i = 0; i < subnodes.length; i++) {
			createTreeItemFor(tree, subnodes[i]);
		}
	}
	/**
	 * Creates a TreeItem structure that reflects to the page hierarchy.
	 */
	private void createTreeItemFor(Widget parent, IPreferenceNode node) {
		TreeItem item = null;
		if (parent instanceof Tree)
			item = new TreeItem((Tree) parent, SWT.DEFAULT);