本文整理汇总了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);
}
示例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
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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
}
示例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
}
示例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
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}