}
protected void storeProperties(IProgressMonitor monitor, Properties props)
throws CoreException
{
IDestecsProject dp = (IDestecsProject) getProject().getAdapter(IDestecsProject.class);
if (dp != null)
{
IFile file = dp.getVdmModelFolder().getFile(".metadata");
ByteArrayOutputStream out = new ByteArrayOutputStream();
try
{
props.store(out, "");
} catch (IOException e)
{
VdmMetadataBuilderPlugin.log("Failed to store metadatafile for project: "+getProject(), e);
}
if (file.exists())
{
file.setContents(new ByteArrayInputStream(out.toByteArray()), IFile.FORCE, monitor);
} else if( dp.getVdmModelFolder().isAccessible() && dp.getVdmModelFolder().exists())
{
file.create(new ByteArrayInputStream(out.toByteArray()), IFile.FORCE, monitor);
}
}