}
private static Header createHeader(Project project, String headerName, String valueText) {
String text = String.format("%s: %s\n", headerName, valueText);
PsiFile file = PsiFileFactory.getInstance(project).createFileFromText("DUMMY.MF", ManifestFileTypeFactory.MANIFEST, text);
Header header = ((ManifestFile)file).getHeader(headerName);
if (header == null) {
throw new IncorrectOperationException("Bad header: '" + text + "'");
}
return header;
}