DefaultTreeModel treeModel = (DefaultTreeModel) navigatorTree.getModel(); TreePath treePath = navigatorTree.getSelectionPath(); DefaultMutableTreeNode projectNode = (DefaultMutableTreeNode) treePath.getPath()[1]; DefaultMutableTreeNode analysisRunNode = new DefaultMutableTreeNode(analysisRun); treeModel.insertNodeInto(analysisRunNode, projectNode, projectNode.getChildCount());   TreePath path = new TreePath(new Object[]{rootNode, projectNode, analysisRunNode}); navigatorTree.makeVisible(path); navigatorTree.setSelectionPath(path);
synchAnalysisRun(analysisRun); currentAnalysisRun = analysisRun; setView("BugTree");
    private void findBugsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_findBugsButtonActionPerformed	Project project = getCurrentProject();	AnalysisRun analysisRun = new AnalysisRun(project, logger);		logger.logMessage(ConsoleLogger.INFO, "Beginning analysis of " + project);		// Run the analysis!	RunAnalysisDialog dialog = new RunAnalysisDialog(this, analysisRun);	dialog.setSize(400, 300);	dialog.setLocationRelativeTo(null); // center the dialog	dialog.show();		if (dialog.isCompleted()) {	    logger.logMessage(ConsoleLogger.INFO, "Analysis " + project + " completed");	    	    // Create a navigator tree node for the analysis run	    DefaultTreeModel treeModel = (DefaultTreeModel) navigatorTree.getModel();	    TreePath treePath = navigatorTree.getSelectionPath();	    DefaultMutableTreeNode projectNode = (DefaultMutableTreeNode) treePath.getPath()[1];	    DefaultMutableTreeNode analysisRunNode = new DefaultMutableTreeNode(analysisRun);	    treeModel.insertNodeInto(analysisRunNode, projectNode, projectNode.getChildCount());	    	    // Make the new node the currently selected node	    TreePath path = new TreePath(new Object[]{rootNode, projectNode, analysisRunNode});	    navigatorTree.makeVisible(path);	    navigatorTree.setSelectionPath(path);	} else {	    logger.logMessage(ConsoleLogger.INFO, "Analysis of " + project + " cancelled by user");	}    }//GEN-LAST:event_findBugsButtonActionPerformed