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


Java CodeFoldingSettings.getInstance方法代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PythonFoldingBuilder.java

示例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;
}
 
开发者ID:shvetsgroup,项目名称:squirrel-lang-idea-plugin,代码行数:23,代码来源:SquirrelFoldingBuilder.java

示例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;
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:13,代码来源:LuaFoldingBuilder.java

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

示例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"));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:BaseCodeFoldingOptionsProvider.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:16,代码来源:CSharpFoldingBuilder.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-lua,代码行数:13,代码来源:LuaFoldingBuilder.java

示例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"));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:GeneralCodeFoldingConfigurable.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:15,代码来源:JavaScriptFoldingBuilder.java

示例10: isCollapseImports

import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapseImports() {
  return CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeFoldingSettingsBase.java

示例11: setCollapseImports

import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public void setCollapseImports(boolean value) {
  CodeFoldingSettings.getInstance().COLLAPSE_IMPORTS = value;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeFoldingSettingsBase.java

示例12: isCollapseMethods

import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapseMethods() {
  return CodeFoldingSettings.getInstance().COLLAPSE_METHODS;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeFoldingSettingsBase.java

示例13: setCollapseMethods

import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public void setCollapseMethods(boolean value) {
  CodeFoldingSettings.getInstance().COLLAPSE_METHODS = value;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeFoldingSettingsBase.java

示例14: isCollapseJavadocs

import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public boolean isCollapseJavadocs() {
  return CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeFoldingSettingsBase.java

示例15: setCollapseJavadocs

import com.intellij.codeInsight.folding.CodeFoldingSettings; //导入方法依赖的package包/类
@Override
public void setCollapseJavadocs(boolean value) {
  CodeFoldingSettings.getInstance().COLLAPSE_DOC_COMMENTS = value;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeFoldingSettingsBase.java


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