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


Java DefaultCodeFormatterConstants.getIndentStyle方法代码示例

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


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

示例1: insertIntoMap

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private void insertIntoMap(Map<Object, Integer> wrappingMap, Map<Object, Integer> indentMap, Map<Object, Integer> forceMap, Category category) {
         final String value= fWorkingValues.get(category.key);
         Integer wrappingStyle;
         Integer indentStyle;
         Boolean forceWrapping;

         try {
             wrappingStyle= new Integer(DefaultCodeFormatterConstants.getWrappingStyle(value));
             indentStyle= new Integer(DefaultCodeFormatterConstants.getIndentStyle(value));
             forceWrapping= new Boolean(DefaultCodeFormatterConstants.getForceWrapping(value));
         } catch (IllegalArgumentException e) {
	forceWrapping= new Boolean(false);
	indentStyle= new Integer(DefaultCodeFormatterConstants.INDENT_DEFAULT);
	wrappingStyle= new Integer(DefaultCodeFormatterConstants.WRAP_NO_SPLIT);
}

         increaseMapEntry(wrappingMap, wrappingStyle);
         increaseMapEntry(indentMap, indentStyle);
         increaseMapEntry(forceMap, forceWrapping);
     }
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:LineWrappingTabPage.java

示例2: prefArrayIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefArrayIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants
              .FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER);
  try {
    if (DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_BY_ONE) return 1;
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }

  return prefContinuationIndent(); // default
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:JavaIndenter.java

示例3: prefArrayDeepIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefArrayDeepIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants
              .FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER);
  try {
    return DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }

  return true;
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:JavaIndenter.java

示例4: prefTernaryDeepAlign

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefTernaryDeepAlign() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION);
  try {
    return DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }
  return false;
}
 
开发者ID:eclipse,项目名称:che,代码行数:13,代码来源:JavaIndenter.java

示例5: prefTernaryIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefTernaryIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION);
  try {
    if (DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_BY_ONE) return 1;
    else return prefContinuationIndent();
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }

  return prefContinuationIndent();
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:JavaIndenter.java

示例6: prefMethodDeclDeepIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefMethodDeclDeepIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants
              .FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION);
  try {
    return DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }

  return true;
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:JavaIndenter.java

示例7: prefMethodDeclIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefMethodDeclIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants
              .FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION);
  try {
    if (DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_BY_ONE) return 1;
    else return prefContinuationIndent();
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }
  return 1;
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:JavaIndenter.java

示例8: prefMethodCallDeepIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefMethodCallDeepIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION);
  try {
    return DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }
  return false; // sensible default
}
 
开发者ID:eclipse,项目名称:che,代码行数:13,代码来源:JavaIndenter.java

示例9: prefMethodCallIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefMethodCallIndent() {
  String option =
      getCoreFormatterOption(
          DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION);
  try {
    if (DefaultCodeFormatterConstants.getIndentStyle(option)
        == DefaultCodeFormatterConstants.INDENT_BY_ONE) return 1;
    else return prefContinuationIndent();
  } catch (IllegalArgumentException e) {
    // ignore and return default
  }

  return 1; // sensible default
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:JavaIndenter.java

示例10: prefArrayIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefArrayIndent() {
	String option= getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER);
	try {
		if (DefaultCodeFormatterConstants.getIndentStyle(option) == DefaultCodeFormatterConstants.INDENT_BY_ONE)
			return 1;
	} catch (IllegalArgumentException e) {
		// ignore and return default
	}

	return prefContinuationIndent(); // default
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:JavaIndenter.java

示例11: prefArrayDeepIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefArrayDeepIndent() {
	String option= getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER);
	try {
		return DefaultCodeFormatterConstants.getIndentStyle(option) == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
	} catch (IllegalArgumentException e) {
		// ignore and return default
	}

	return true;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:JavaIndenter.java

示例12: prefTernaryDeepAlign

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefTernaryDeepAlign() {
	String option= getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION);
	try {
		return DefaultCodeFormatterConstants.getIndentStyle(option) == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
	} catch (IllegalArgumentException e) {
		// ignore and return default
	}
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:JavaIndenter.java

示例13: prefTernaryIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefTernaryIndent() {
	String option= getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION);
	try {
		if (DefaultCodeFormatterConstants.getIndentStyle(option) == DefaultCodeFormatterConstants.INDENT_BY_ONE)
			return 1;
		else
			return prefContinuationIndent();
	} catch (IllegalArgumentException e) {
		// ignore and return default
	}

	return prefContinuationIndent();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:14,代码来源:JavaIndenter.java

示例14: prefMethodDeclDeepIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private boolean prefMethodDeclDeepIndent() {
	String option= getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION);
	try {
		return DefaultCodeFormatterConstants.getIndentStyle(option) == DefaultCodeFormatterConstants.INDENT_ON_COLUMN;
	} catch (IllegalArgumentException e) {
		// ignore and return default
	}

	return true;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:JavaIndenter.java

示例15: prefMethodDeclIndent

import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; //导入方法依赖的package包/类
private int prefMethodDeclIndent() {
	String option= getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION);
	try {
		if (DefaultCodeFormatterConstants.getIndentStyle(option) == DefaultCodeFormatterConstants.INDENT_BY_ONE)
			return 1;
		else
			return prefContinuationIndent();
	} catch (IllegalArgumentException e) {
		// ignore and return default
	}
	return 1;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:JavaIndenter.java


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