folder[0]= dialog.getCreatedFolder(); isSourceFolder[0]= dialog.isSourceFolder();
fFolder= dialog.getCreatedFolder(); fIsSourceFolder= dialog.isSourceFolder();
            public boolean doQuery() {                final boolean[] isOK= {false};                Display.getDefault().syncExec(new Runnable() {                    public void run() {                        Shell sh= shell != null ? shell : JavaPlugin.getActiveWorkbenchShell();                        IContainer container;                                                if (selection instanceof IFolder)                            container= (IFolder)selection;                        else {                            IJavaElement javaElement= (IJavaElement)selection;                            IJavaProject project= javaElement.getJavaProject();                            container= project.getProject();                            if (!(selection instanceof IJavaProject)) {                                container= container.getFolder(javaElement.getPath().removeFirstSegments(1));                            }                        }                                                boolean javaProjectSelected= false;                        if (selection instanceof IJavaProject)                            javaProjectSelected= true;                        ExtendedNewFolderDialog dialog= new ExtendedNewFolderDialog(sh, container, javaProjectSelected);                        isOK[0]= dialog.open() == Window.OK;                        if (isOK[0]) {                            folder[0]= dialog.getCreatedFolder();                            isSourceFolder[0]= dialog.isSourceFolder();                        }                    }                });                return isOK[0];            }