* Remove the given project from the set of active projects.
*
* @param project Project to close.
*/
public boolean close(ACSProjectElement project) throws IOException {
DOMDocument doc = project.getOwnerDocument();
// Check to see is the project has been modified and
// ask the user if they would like to save it before
// closing.
int select = JOptionPane.NO_OPTION;
if (doc.isModified()) {
select = JOptionPane.showConfirmDialog(null,
project.getDisplayName() +
" has been modified.\n\nWould you like to save it?\n\n",
"Save Modified Project",
JOptionPane.YES_NO_CANCEL_OPTION);
}
if (select == JOptionPane.YES_OPTION) {
// Try to save the project
SaveCmd cmd = new SaveCmd(_context);
cmd.run();
// If it is still modified, then the save was canceled.
if (doc.isModified()) {
select = JOptionPane.CANCEL_OPTION;
}
}
if (select != JOptionPane.CANCEL_OPTION) {