Button button= ((SelectionButtonDialogField)field).getSelectionButton(null); if (button.getSelection()) {
boolean isUseFolders= fUseFolderOutputs.isSelected(); if (isUseFolders) {
    public Control getControl(Composite parent) {        final int[] sashWeight= {60};        final IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();        preferenceStore.setDefault(OPEN_SETTING, true);                // ScrolledPageContent is needed for resizing on expand the expandable composite        ScrolledPageContent scrolledContent = new ScrolledPageContent(parent);        Composite body= scrolledContent.getBody();        body.setLayout(new GridLayout());                final SashForm sashForm= new SashForm(body, SWT.VERTICAL | SWT.NONE);                ViewerPane pane= new ViewerPane(sashForm, SWT.BORDER | SWT.FLAT);        pane.setContent(fPackageExplorer.createControl(pane));                final ExpandableComposite excomposite= new ExpandableComposite(sashForm, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);        excomposite.setText(NewWizardMessages.getString("NewSourceContainerWorkbookPage.HintTextGroup.title")); //$NON-NLS-1$        final boolean isExpanded= preferenceStore.getBoolean(OPEN_SETTING);        excomposite.setExpanded(isExpanded);        excomposite.addExpansionListener(new ExpansionAdapter() {                       public void expansionStateChanged(ExpansionEvent e) {                           ScrolledPageContent parentScrolledComposite= getParentScrolledComposite(excomposite);                           if (parentScrolledComposite != null) {                              boolean expanded= excomposite.isExpanded();                              parentScrolledComposite.reflow(true);                              adjustSashForm(sashWeight, sashForm, expanded);                              preferenceStore.setValue(OPEN_SETTING, expanded);                           }                       }                 });                excomposite.setClient(fHintTextGroup.createControl(excomposite));        fUseFolderOutputs.doFillIntoGrid(body, 1);        fUseFolderOutputs.setDialogFieldListener(new IDialogFieldListener() {            public void dialogFieldChanged(DialogField field) {                Button button= ((SelectionButtonDialogField)field).getSelectionButton(null);                if (button.getSelection()) {                    ResetAllOutputFoldersOperation op= new ResetAllOutputFoldersOperation(NewSourceContainerWorkbookPage.this, fHintTextGroup);                    try {                        op.run(null);                    } catch (InvocationTargetException e) {                        ExceptionHandler.handle(e, getShell(),                                NewWizardMessages.getFormattedString("NewSourceContainerWorkbookPage.Exception.Title", op.getName()), e.getMessage()); //$NON-NLS-1$                    }                }            }        });        final DialogPackageExplorerActionGroup actionGroup= new DialogPackageExplorerActionGroup(fHintTextGroup, this);        fUseFolderOutputs.getSelectionButton(null).addSelectionListener(new SelectionListener(){            public void widgetSelected(SelectionEvent event) {                boolean show= fUseFolderOutputs.getSelectionButton(null).getSelection();                fPackageExplorer.showOutputFolders(show);                try {                    ISelection selection= fPackageExplorer.getSelection();                    actionGroup.refresh(new DialogExplorerActionContext(selection, fHintTextGroup.getJavaProject()));                } catch (JavaModelException e) {                    ExceptionHandler.handle(e, getShell(),                            NewWizardMessages.getString("NewSourceContainerWorkbookPage.Exception.refresh"), e.getMessage()); //$NON-NLS-1$                }            }            public void widgetDefaultSelected(SelectionEvent e) {            }                    });                // Create toolbar with actions on the left        ToolBarManager tbm= actionGroup.createLeftToolBarManager(pane);        pane.setTopCenter(null);        pane.setTopLeft(tbm.getControl());                // Create toolbar with help on the right        tbm= actionGroup.createLeftToolBar(pane);        pane.setTopRight(tbm.getControl());                fHintTextGroup.setActionGroup(actionGroup);        fPackageExplorer.setActionGroup(actionGroup);        actionGroup.addListener(fHintTextGroup);                sashForm.setWeights(new int[] {60, 40});        adjustSashForm(sashWeight, sashForm, excomposite.isExpanded());        GridData gd= new GridData(GridData.FILL_BOTH);        PixelConverter converter= new PixelConverter(parent);        gd.heightHint= converter.convertHeightInCharsToPixels(25);        sashForm.setLayoutData(gd);                fUseFolderOutputs.dialogFieldChanged();                parent.layout(true);        return scrolledContent;    }