IPath path= null; if (fProject != null) { path= fProject.getProject().getFullPath();  URL url= JavaDocLocations.getJavadocLocation(path);  if (url == null || !url.getProtocol().equals("file")) { fDestination= fProject.getProject().getLocation().addTrailingSeparator().append("doc").toOSString(); } else {  File file= new File(url.getFile()); IPath tpath= new Path(file.getPath()); fDestination= tpath.toOSString(); } } else fDestination= "";
fDestination= settings.get(DESTINATION); IPath path = null;  if ((fDestination == null) || fDestination.equals("")) { path = null; if (fProject != null) { URL url = JavaDocLocations.getProjectJavadocLocation(fProject);  if (url == null || !url.getProtocol().equals("file")) { fDestination = fProject .getProject() .getLocation() .addTrailingSeparator() .append("doc") .toOSString(); } else {  File file = new File(url.getFile()); IPath tpath = new Path(file.getPath()); fDestination = tpath.toOSString(); } } else fDestination = ""; }
	private void loadStore(IDialogSettings settings, ISelection sel) {	if(settings!= null){		fPackages= new ArrayList();		//getValidSelection will also find the project		IStructuredSelection selection= getValidSelection(sel);		fPackages= selection.toList();		fAccess= settings.get(VISIBILITY);		if (fAccess == null)			fAccess= PRIVATE;		fFromStandard= false;		fDocletpath= settings.get(DOCLETPATH);		fDocletname= settings.get(DOCLETNAME);		if (fDocletpath == null || fDocletname == null) {			fFromStandard= true;			fDocletname= fDocletname= "";		}		//load a destination even if a custom doclet is being used		IPath path= null;		if (fProject != null) {			path= fProject.getProject().getFullPath();			URL url= JavaDocLocations.getJavadocLocation(path);			//uses default if source is has http protocol			if (url == null || !url.getProtocol().equals("file")) {				fDestination= fProject.getProject().getLocation().addTrailingSeparator().append("doc").toOSString();			} else {				//must do this to remove leading "/"				File file= new File(url.getFile());				IPath tpath= new Path(file.getPath());				fDestination= tpath.toOSString();			}		} else			fDestination= "";		if (fProject != null) {			path= fProject.getProject().getLocation();			fAntpath= path.addTrailingSeparator().append("javadoc.xml").toOSString();		} else			fAntpath= "";		fStylesheet= settings.get(STYLESHEETFILE);		if (fStylesheet == null)			fStylesheet= "";		fAdditionalParams= settings.get(EXTRAOPTIONS);		if (fAdditionalParams == null)			fAdditionalParams= "";		fOverview= settings.get(OVERVIEW);		if (fOverview == null)			fOverview= "";		fAuthor= loadbutton(settings.get(AUTHOR));		fVersion= loadbutton(settings.get(VERSION));		fNodeprecated= loadbutton(settings.get(NODEPRECATED));		fNoDeprecatedlist= loadbutton(settings.get(NODEPRECATEDLIST));		fNonavbar= loadbutton(settings.get(NONAVBAR));		fNoindex= loadbutton(settings.get(NOINDEX));		fNotree= loadbutton(settings.get(NOTREE));		fSplitindex= loadbutton(settings.get(SPLITINDEX));		}else loadDefaults(sel);	}