本文整理汇总了Java中com.intellij.formatting.Indent.getSpaceIndent方法的典型用法代码示例。如果您正苦于以下问题:Java Indent.getSpaceIndent方法的具体用法?Java Indent.getSpaceIndent怎么用?Java Indent.getSpaceIndent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.formatting.Indent
的用法示例。
在下文中一共展示了Indent.getSpaceIndent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIndent
import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
@Nullable
public Indent getIndent() {
return formattingInfo.getCsvCodeStyleSettings().TABULARIZE || formattingInfo.getCsvCodeStyleSettings().TRIM_LEADING_WHITE_SPACES
? null
: Indent.getSpaceIndent(this.getNode().getStartOffset());
}
示例2: getIndent
import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public Indent getIndent() {
if (formattingInfo.getCsvCodeStyleSettings().TABULARIZE
&& (formattingInfo.getCsvCodeStyleSettings().LEADING_WHITE_SPACES || this.getElementType() == CsvTypes.COMMA)
&& (formattingInfo.getCsvCodeStyleSettings().WHITE_SPACES_OUTSIDE_QUOTES || !CsvFormatHelper.isQuotedField(getField()))
&& getField() != null) {
CsvColumnInfo columnInfo = formattingInfo.getColumnInfo(0);
return Indent.getSpaceIndent(columnInfo.getMaxLength() - getField().getTextLength() + getAdditionalSpaces(null, this));
} else if (!formattingInfo.getCsvCodeStyleSettings().TABULARIZE &&
this.getElementType() == CsvTypes.COMMA &&
formattingInfo.getCsvCodeStyleSettings().SPACE_BEFORE_SEPARATOR) {
return Indent.getSpaceIndent(1);
}
return null;
}
示例3: getIndent
import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@SuppressWarnings("ConstantConditions")
@Override
public Indent getIndent() {
if (myNode.getElementType() == IonTypes.PAIR ||
(myNode.getElementType() == VALUE && myNode.getTreeParent().getElementType() == ELEMENTS) ||
((myNode.getElementType() == VALUE || myNode.getElementType() == OPERATOR) && myNode.getTreeParent().getElementType() == ATOMS)) {
return Indent.getSpaceIndent(this.settings.getIndentOptions().INDENT_SIZE);
} else {
return Indent.getNoneIndent();
}
}
示例4: visitDocComment
import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitDocComment(GrDocComment comment) {
if (myChildType != GroovyDocTokenTypes.mGDOC_COMMENT_START) {
myResult = Indent.getSpaceIndent(GDOC_COMMENT_INDENT);
}
}
示例5: visitDocTag
import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitDocTag(GrDocTag docTag) {
if (myChildType != GroovyDocTokenTypes.mGDOC_TAG_NAME) {
myResult = Indent.getSpaceIndent(GDOC_COMMENT_INDENT);
}
}