setCursor(new Cursor(Cursor.DEFAULT_CURSOR));  setProjectChanged(false);
while (true) { int returnValue = jfc.showOpenDialog(new JFrame());  if (returnValue != JFileChooser.APPROVE_OPTION) return;  File file = jfc.getSelectedFile();  if (!file.exists()) { JOptionPane.showMessageDialog(jfc, "That file does not exist"); continue; } try { FileInputStream in = new FileInputStream(file); loadAnalysisFromInputStream(in); return; } catch (IOException e) { JOptionPane.showMessageDialog(jfc, e.getMessage());
	private void loadAnalysis() {		saveCommentsToBug(currentSelectedBugLeaf);				FBFileChooser jfc= new FBFileChooser();		jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);		jfc.setFileFilter(new FindBugsAnalysisFileFilter());				// jfc.setCurrentDirectory(GUISaveState.getInstance().getStarterDirectoryForLoadBugs()); this is done by FBFileChooser now.								boolean importing = true;		while(importing){			int returnValue=jfc.showOpenDialog(new JFrame());						if (returnValue==JFileChooser.APPROVE_OPTION)			{				File file=jfc.getSelectedFile();								if(!file.exists()){					JOptionPane.showMessageDialog(jfc, "That file does not exist");					importing = true;					continue;				}				else					importing = false;								setCursor(new Cursor(Cursor.WAIT_CURSOR));								final File extraFinalReferenceToXmlFile=file;				new Thread(new Runnable(){					public void run()					{						BugTreeModel model=(BugTreeModel)tree.getModel();//								BugTreeModel.pleaseWait();						MainFrame.this.setRebuilding(true);						Project project = new Project();						BugSet bs=BugLoader.loadBugs(project, extraFinalReferenceToXmlFile);						MainFrame.this.setRebuilding(false);						if (bs!=null)						{							ProjectSettings.newInstance();							model.getOffListenerList();							updateDesignation();							model.changeSet(bs);							curProject=project;							MainFrame.this.updateStatusBar();							MainFrame.this.setTitle(project.getProjectFileName());						}					}				}).start();				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));								setProjectChanged(false);			}			else				return;//					GUISaveState.getInstance().setStarterDirectoryForLoadBugs(jfc.getCurrentDirectory()); This is done by FBFileChooser		}	}