try { if (ClasspathModifier.hasOutputFolders(javaProject, null)) { fUseFolderOutputs.setSelection(true); fUseFolderOutputs.dialogFieldChanged(); } else { fUseFolderOutputs.setSelection(false); fUseFolderOutputs.dialogFieldChanged(); } } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), NewWizardMessages.getString("NewSourceContainerWorkbookPage.Exception.init"), e.getMessage()); fUseFolderOutputs.setSelection(false); }
boolean useFolderOutputs= false; List cpelements= fClassPathList.getElements(); for (int i= 0; i < cpelements.size() && !useFolderOutputs; i++) { CPListElement cpe= (CPListElement) cpelements.get(i); if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (cpe.getAttribute(CPListElement.OUTPUT) != null) { useFolderOutputs= true; } } } fUseFolderOutputs.setSelection(useFolderOutputs);
    public void init(IJavaProject jProject) {        IJavaProject javaProject= jProject;        fHintTextGroup.setJavaProject(jProject);                saveFile(javaProject.getProject());        fPackageExplorer.setContentProvider();        fPackageExplorer.setInput(javaProject);        try {            if (ClasspathModifier.hasOutputFolders(javaProject, null)) {                fUseFolderOutputs.setSelection(true);                fUseFolderOutputs.dialogFieldChanged();            }            else {                fUseFolderOutputs.setSelection(false);                fUseFolderOutputs.dialogFieldChanged();            }        } catch (JavaModelException e) {            ExceptionHandler.handle(e, getShell(), NewWizardMessages.getString("NewSourceContainerWorkbookPage.Exception.init"), e.getMessage()); //$NON-NLS-1$            fUseFolderOutputs.setSelection(false);        }    }