try {
IFile tempFile = prismModelResource.getFile();
if (!tempFile.exists()) tempFile.create(inStream, false, null);
else tempFile.setContents(inStream, IFile.NONE, null);
} catch (ResourceException e) {
throw new TaskException(this, "Invalid location for PRISM model", e);
} catch (CoreException e) {
throw new TaskException(this, "Unable to save PRISM model", e);
} finally {
try {
inStream.close();
} catch (IOException e) {
assert false;
}
}
inStream = new ByteArrayInputStream(propsStream.toByteArray());
try {
IFile tempFile = prismPropertiesResource.getFile();
if (!tempFile.exists()) tempFile.create(inStream, false, null);
else tempFile.setContents(inStream, IFile.NONE, null);
} catch (ResourceException e) {
throw new TaskException(this, "Invalid location for PRISM properties", e);
} catch (CoreException e) {
throw new TaskException(this, "Unable to save PRISM properties", e);
} finally {
try {
inStream.close();
} catch (IOException e) {
assert false;