Search in sources :

Example 1 with CodeStyleSettingsLoader

use of com.intellij.psi.impl.source.codeStyle.CodeStyleSettingsLoader in project intellij-community by JetBrains.

the class FormatterStarter method readSettings.

private static CodeStyleSettings readSettings(@NotNull String settingsPath) throws SchemeImportException {
    VirtualFile vFile = VfsUtil.findFileByIoFile(new File(settingsPath), true);
    CodeStyleSettingsLoader loader = new CodeStyleSettingsLoader();
    if (vFile == null) {
        throw new SchemeImportException("Cannot find file " + settingsPath);
    }
    return loader.loadSettings(vFile);
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) CodeStyleSettingsLoader(com.intellij.psi.impl.source.codeStyle.CodeStyleSettingsLoader) SchemeImportException(com.intellij.openapi.options.SchemeImportException) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File)

Aggregations

SchemeImportException (com.intellij.openapi.options.SchemeImportException)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 CodeStyleSettingsLoader (com.intellij.psi.impl.source.codeStyle.CodeStyleSettingsLoader)1 File (java.io.File)1