use of com.intellij.psi.impl.source.codeStyle.CodeStyleSchemeXmlImporter in project intellij-community by JetBrains.
the class CodeStyleXmlImporterTest method importSettings.
private CodeStyleSettings importSettings() throws SchemeImportException {
final CodeStyleScheme targetScheme = new CodeStyleSchemeImpl("Test", false, null);
SchemeFactory<CodeStyleScheme> schemeFactory = new SchemeFactory<CodeStyleScheme>() {
@Override
public CodeStyleScheme createNewScheme(@Nullable String name) {
return targetScheme;
}
};
File ioFile = new File(getTestDataPath() + getTestName(true) + ".xml");
assertExists(ioFile);
VirtualFile vFile = VfsUtil.findFileByIoFile(ioFile, true);
CodeStyleSchemeXmlImporter importer = new CodeStyleSchemeXmlImporter();
return importer.importScheme(getProject(), vFile, targetScheme, schemeFactory).getCodeStyleSettings();
}
Aggregations