use of com.intellij.codeInsight.folding.impl.JavaCodeFoldingSettingsImpl in project kotlin by JetBrains.
the class AbstractKotlinFoldingTest method doTestWithSettings.
protected static void doTestWithSettings(@NotNull String fileText, @NotNull Function<String, Void> runnable) {
JavaCodeFoldingSettings settings = JavaCodeFoldingSettings.getInstance();
JavaCodeFoldingSettingsImpl restoreSettings = new JavaCodeFoldingSettingsImpl();
restoreSettings.loadState((JavaCodeFoldingSettingsImpl) settings);
try {
SettingsConfigurator configurator = new SettingsConfigurator(fileText, settings);
configurator.configureSettings();
runnable.apply(fileText);
} finally {
((JavaCodeFoldingSettingsImpl) JavaCodeFoldingSettings.getInstance()).loadState(restoreSettings);
}
}
Aggregations