本文整理汇总了Java中com.intellij.codeInsight.folding.CodeFoldingSettings.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java CodeFoldingSettings.getInstance方法的具体用法?Java CodeFoldingSettings.getInstance怎么用?Java CodeFoldingSettings.getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.codeInsight.folding.CodeFoldingSettings
的用法示例。
在下文中一共展示了CodeFoldingSettings.getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isRegionCollapsedByDefault
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
protected boolean isRegionCollapsedByDefault(@NotNull ASTNode node) {
if (PyFileImpl.isImport(node, false)) {
return CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS;
}
if (node.getElementType() == PyElementTypes.STRING_LITERAL_EXPRESSION) {
if (getDocStringOwnerType(node) == PyElementTypes.FUNCTION_DECLARATION && CodeFoldingSettings.getInstance().COLLAPSE_METHODS) {
// method will be collapsed, no need to also collapse docstring
return false;
}
return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS;
}
if (node.getElementType() == PyElementTypes.STATEMENT_LIST && node.getTreeParent().getElementType() == PyElementTypes.FUNCTION_DECLARATION) {
return CodeFoldingSettings.getInstance().COLLAPSE_METHODS;
}
return false;
}
示例2: isRegionCollapsedByDefault
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
protected boolean isRegionCollapsedByDefault(@NotNull final ASTNode node) {
final IElementType elementType = node.getElementType();
final PsiElement psiElement = node.getPsi();
final CodeFoldingSettings settings = CodeFoldingSettings.getInstance();
if (psiElement instanceof SquirrelFile)
return settings.COLLAPSE_FILE_HEADER;
if (elementType == MULTI_LINE_DOC_COMMENT) {
return settings.COLLAPSE_DOC_COMMENTS;
}
if (elementType == MULTI_LINE_COMMENT || elementType == SINGLE_LINE_COMMENT) {
return settings.COLLAPSE_DOC_COMMENTS;
}
if (psiElement instanceof SquirrelFunctionBody) {
return settings.COLLAPSE_METHODS;
}
return false;
}
示例3: isRegionCollapsedByDefault
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
protected boolean isRegionCollapsedByDefault(@NotNull ASTNode node) {
if (node.getElementType() == FUNCTION_DEFINITION ||
node.getElementType() == LOCAL_FUNCTION ||
node.getElementType() == ANONYMOUS_FUNCTION_EXPRESSION)
return CodeFoldingSettings.getInstance().COLLAPSE_METHODS;
if (node.getElementType() == LUADOC_COMMENT)
return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS;
return false;
}
示例4: BaseCodeFoldingOptionsProvider
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
public BaseCodeFoldingOptionsProvider() {
super(CodeFoldingSettings.getInstance());
checkBox("COLLAPSE_FILE_HEADER", ApplicationBundle.message("checkbox.collapse.file.header"));
checkBox("COLLAPSE_IMPORTS", ApplicationBundle.message("checkbox.collapse.title.imports"));
checkBox("COLLAPSE_DOC_COMMENTS", ApplicationBundle.message("checkbox.collapse.javadoc.comments"));
checkBox("COLLAPSE_METHODS", ApplicationBundle.message("checkbox.collapse.method.bodies"));
checkBox("COLLAPSE_CUSTOM_FOLDING_REGIONS", ApplicationBundle.message("checkbox.collapse.custom.folding.regions"));
}
示例5: BaseCodeFoldingOptionsProvider
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
public BaseCodeFoldingOptionsProvider() {
super(CodeFoldingSettings.getInstance());
checkBox("COLLAPSE_FILE_HEADER", ApplicationBundle.message("checkbox.collapse.file.header"));
checkBox("COLLAPSE_IMPORTS", ApplicationBundle.message("checkbox.collapse.title.imports"));
checkBox("COLLAPSE_DOC_COMMENTS", ApplicationBundle.message("checkbox.collapse.javadoc.comments"));
checkBox("COLLAPSE_METHODS", ApplicationBundle.message("checkbox.collapse.method.bodies"));
}
示例6: isRegionCollapsedByDefault
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
protected boolean isRegionCollapsedByDefault(@NotNull ASTNode node)
{
PsiElement psi = node.getPsi();
if(psi instanceof CSharpUsingListChild)
{
return true;
}
else if(psi instanceof PsiComment)
{
return CodeFoldingSettings.getInstance().COLLAPSE_FILE_HEADER;
}
return false;
}
示例7: isCollapsedByDefault
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapsedByDefault(@NotNull ASTNode node) {
if (node.getElementType() == FUNCTION_DEFINITION ||
node.getElementType() == LOCAL_FUNCTION ||
node.getElementType() == ANONYMOUS_FUNCTION_EXPRESSION)
return CodeFoldingSettings.getInstance().COLLAPSE_METHODS;
if (node.getElementType() == LUADOC_COMMENT)
return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS;
return false;
}
示例8: GeneralCodeFoldingConfigurable
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
public GeneralCodeFoldingConfigurable() {
super(CodeFoldingSettings.getInstance());
checkBox("COLLAPSE_FILE_HEADER", ApplicationBundle.message("checkbox.collapse.file.header"));
checkBox("COLLAPSE_IMPORTS", ApplicationBundle.message("checkbox.collapse.title.imports"));
checkBox("COLLAPSE_DOC_COMMENTS", ApplicationBundle.message("checkbox.collapse.javadoc.comments"));
checkBox("COLLAPSE_METHODS", ApplicationBundle.message("checkbox.collapse.method.bodies"));
}
示例9: isCollapsedByDefault
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapsedByDefault(ASTNode node)
{
if(node.getTreeParent().getElementType() instanceof JSFileElementType && node.getTreePrev() == null &&
node.getPsi() instanceof PsiComment)
{
return CodeFoldingSettings.getInstance().COLLAPSE_FILE_HEADER;
}
if(node.getElementType() == JSElementTypes.IMPORT_STATEMENT)
{
return CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS;
}
return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS && node.getElementType() == JSTokenTypes.DOC_COMMENT;
}
示例10: isCollapseImports
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapseImports() {
return CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS;
}
示例11: setCollapseImports
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public void setCollapseImports(boolean value) {
CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS = value;
}
示例12: isCollapseMethods
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapseMethods() {
return CodeFoldingSettings.getInstance().COLLAPSE_METHODS;
}
示例13: setCollapseMethods
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public void setCollapseMethods(boolean value) {
CodeFoldingSettings.getInstance().COLLAPSE_METHODS = value;
}
示例14: isCollapseJavadocs
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapseJavadocs() {
return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS;
}
示例15: setCollapseJavadocs
import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public void setCollapseJavadocs(boolean value) {
CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS = value;
}