public static @CheckForNull Project loadProject(MainFrame mainFrame, File f) { try { Project project = Project.readXML(f); project.setGuiCallback(mainFrame.getGuiCallback()); return project; } catch (IOException e) { JOptionPane.showMessageDialog(mainFrame, "Could not read " + f + "; " + e.getMessage()); } catch (SAXException e) { JOptionPane.showMessageDialog(mainFrame, "Could not read project from " + f + "; " + e.getMessage()); } return null; }
static SortedBugCollection createPreconfiguredBugCollection(List<String> workingDirList, List<String> srcDirList, IGuiCallback guiCallback) { Project project = new Project(); for (String cwd : workingDirList) { project.addWorkingDir(cwd); } for (String srcDir : srcDirList) { project.addSourceDir(srcDir); } project.setGuiCallback(guiCallback); return new SortedBugCollection(project); }
public void openBugCollection(SortedBugCollection bugs) { acquireDisplayWait(); try { mainFrameLoadSaveHelper.prepareForFileLoad(null, null); Project project = bugs.getProject(); project.setGuiCallback(guiCallback); BugLoader.addDeadBugMatcher(bugs); setProjectAndBugCollectionInSwingThread(project, bugs); } finally { releaseDisplayWait(); } }
@Override public void run() { mainFrame.acquireDisplayWait(); try { Project project = new Project(); project.setGuiCallback(mainFrame.getGuiCallback()); project.setCurrentWorkingDirectory(file.getParentFile()); BugLoader.loadBugs(mainFrame, project, file); project.getSourceFinder(); // force source finder to be // initialized mainFrame.updateBugTree(); } finally { mainFrame.releaseDisplayWait(); } } };
@Override public void run() { mainFrame.acquireDisplayWait(); try { Project project = new Project(); project.setGuiCallback(mainFrame.getGuiCallback()); BugLoader.loadBugs(mainFrame, project, url); project.getSourceFinder(); // force source finder to be // initialized mainFrame.updateBugTree(); } finally { mainFrame.releaseDisplayWait(); } } };
p = project; oldCloudId = project.getCloudId(); p.setGuiCallback(MainFrame.getInstance().getGuiCallback()); clearProjectSettings(p);