当前位置: 首页>>代码示例>>Java>>正文


Java CodeStyleSettings.writeExternal方法代码示例

本文整理汇总了Java中com.intellij.psi.codeStyle.CodeStyleSettings.writeExternal方法的典型用法代码示例。如果您正苦于以下问题:Java CodeStyleSettings.writeExternal方法的具体用法?Java CodeStyleSettings.writeExternal怎么用?Java CodeStyleSettings.writeExternal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.psi.codeStyle.CodeStyleSettings的用法示例。


在下文中一共展示了CodeStyleSettings.writeExternal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import com.intellij.psi.codeStyle.CodeStyleSettings; //导入方法依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();
  CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
  myOldSettings = new Element("dummy2");
  settings.writeExternal(myOldSettings);
  settings.FIELD_NAME_PREFIX = "my";
  settings.STATIC_FIELD_NAME_PREFIX = "our";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AssignFieldFromParameterTest.java

示例2: 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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:JoinLinesTest.java

示例3: checkSettingsEqual

import com.intellij.psi.codeStyle.CodeStyleSettings; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
protected static void checkSettingsEqual(CodeStyleSettings expected, CodeStyleSettings settings, String message) throws Exception {
  if (expected == null || settings == null) return;

  Element oldS = new Element("temp");
  expected.writeExternal(oldS);
  Element newS = new Element("temp");
  settings.writeExternal(newS);

  String newString = JDOMUtil.writeElement(newS, "\n");
  String oldString = JDOMUtil.writeElement(oldS, "\n");
  Assert.assertEquals(message, oldString, newString);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:UsefulTestCase.java


注:本文中的com.intellij.psi.codeStyle.CodeStyleSettings.writeExternal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。