documentDescriptor.setHidden(true);
documentDescriptor.setAsTemplate(true);
LoadDocumentOperation loadDocumentOperation = new LoadDocumentOperation(officeApplication, file.getContents(), documentDescriptor);
loadDocumentOperation.setIsSubTask(true);
try {
loadDocumentOperation.run(progressMonitor);
}
catch(InvocationTargetException invocationTargetException) {
throw new CoreException(new Status(IStatus.ERROR, NOASearchPlugin.PLUGIN_ID,
IStatus.ERROR, invocationTargetException.getCause().getMessage(),
invocationTargetException.getCause()));