本文整理匯總了Java中com.intellij.psi.codeStyle.CodeStyleSettings.readExternal方法的典型用法代碼示例。如果您正苦於以下問題:Java CodeStyleSettings.readExternal方法的具體用法?Java CodeStyleSettings.readExternal怎麽用?Java CodeStyleSettings.readExternal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.psi.codeStyle.CodeStyleSettings
的用法示例。
在下文中一共展示了CodeStyleSettings.readExternal方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testReformatInsertsNewlines
import com.intellij.psi.codeStyle.CodeStyleSettings; //導入方法依賴的package包/類
public void testReformatInsertsNewlines() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
final Element root = new Element("fake");
settings.writeExternal(root);
try {
settings.getIndentOptions(StdFileTypes.JAVA).USE_TAB_CHARACTER = true;
settings.getIndentOptions(StdFileTypes.JAVA).SMART_TABS = true;
settings.IF_BRACE_FORCE = CommonCodeStyleSettings.FORCE_BRACES_ALWAYS;
settings.METHOD_BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE;
doTest();
} finally {
settings.readExternal(root);
}
}
示例2: tearDown
import com.intellij.psi.codeStyle.CodeStyleSettings; //導入方法依賴的package包/類
@Override
protected void tearDown() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.readExternal(myOldSettings);
super.tearDown();
}