/**
* Prompts for a file name and saves the complex there.
*/
public void saveAs()
{
final SaveComplexDialog dialog = SaveComplexDialog.getInstance();
dialog.setSelectedFile(getSuggestedFile());
File file = dialog.open();
if (file != null)
{
// Add file extension if none present
if (FileUtils.getExtension(file) == null)
file = new File(file.getPath() + ".x3c");