if (!_metadataFolder.exists()) {
_metadataFolder.create(true, true, new NullProgressMonitor());
_metadataFile = _metadataFolder.getFile(_tmlFile.getName().substring(0, _tmlFile.getName().length() - _tmlFile.getFileExtension().length()) + "metadata.xml");
}
writer = new OutputStreamWriter(new FileOutputStream(_metadataFile.getLocation().toFile()), _fileEncoding);
xstream.toXML(metaData, writer);
} catch (CoreException e) {
IOException ioe = new IOException("Unable to save metadata file '" + _metadataFile.getLocation() + "'.");
ioe.setStackTrace(e.getStackTrace());