File file = new File( filename ); Project project = new Project(file.getPath()); FileInputStream in = new FileInputStream(file); project.read(in);
Project project = new Project(); project.read(filename);
    private void reloadProjectItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reloadProjectItemActionPerformed        Project current = getCurrentProject();        if ( current == null )            return;                try {            String filename = current.getFileName();            File file = new File( filename );            Project project = new Project(file.getPath());            FileInputStream in = new FileInputStream(file);            project.read(in);            setProject( null );            setProject(project);            findBugsButtonActionPerformed( evt );        } catch (IOException e) {            logger.logMessage(ConsoleLogger.ERROR, "Could not reload project: " + e.getMessage());        }    }//GEN-LAST:event_reloadProjectItemActionPerformed