Examples of FoldingGroup


Examples of com.intellij.openapi.editor.FoldingGroup

        for (final PsiMethod method : methods) {

            Collection<PsiLocalVariable> vars = PsiTreeUtil.findChildrenOfType(method, PsiLocalVariable.class);
            Collection<PsiForeachStatement> iters = PsiTreeUtil.findChildrenOfType(method, PsiForeachStatement.class);
            FoldingGroup group = FoldingGroup.newGroup(method.getName());

            for (final PsiVariable var : vars) {
                PsiTypeElement typeElem = var.getTypeElement();
                if (typeElem == null)
                    continue;
View Full Code Here

Examples of com.intellij.openapi.editor.FoldingGroup

public class SimpleFoldingBuilder extends FoldingBuilderEx {
    @NotNull
    @Override
    public FoldingDescriptor[] buildFoldRegions(@NotNull PsiElement root, @NotNull Document document, boolean quick) {
        FoldingGroup group = FoldingGroup.newGroup("simple");

        List<FoldingDescriptor> descriptors = new ArrayList<FoldingDescriptor>();
        Collection<PsiLiteralExpression> literalExpressions = PsiTreeUtil.findChildrenOfType(root, PsiLiteralExpression.class);
        for (final PsiLiteralExpression literalExpression : literalExpressions) {
            String value = (String) literalExpression.getValue();
View Full Code Here

Examples of com.intellij.openapi.editor.FoldingGroup

        if(!codeFoldingPhpRoute && !codeFoldingPhpModel && !codeFoldingPhpTemplate) {
            return new FoldingDescriptor[0];
        }

        List<FoldingDescriptor> descriptors = new ArrayList<FoldingDescriptor>();
        FoldingGroup model = FoldingGroup.newGroup("model");
        FoldingGroup template = FoldingGroup.newGroup("template");

        Collection<StringLiteralExpression> stringLiteralExpressiones = PsiTreeUtil.findChildrenOfType(psiElement, StringLiteralExpression.class);
        for(StringLiteralExpression stringLiteralExpression: stringLiteralExpressiones) {

            if(codeFoldingPhpRoute) {
View Full Code Here

Examples of com.intellij.openapi.editor.FoldingGroup


    private void attachRouteShortcuts(List<FoldingDescriptor> descriptors, Collection<StringLiteralExpression> stringLiteralExpressions) {

        Map<String,Route> routes = null;
        FoldingGroup group = FoldingGroup.newGroup("route");

        for(StringLiteralExpression stringLiteralExpression: stringLiteralExpressions) {

            if (MethodMatcher.getMatchedSignatureWithDepth(stringLiteralExpression, PhpRouteReferenceContributor.GENERATOR_SIGNATURES) != null) {
View Full Code Here

Examples of com.intellij.openapi.editor.FoldingGroup

        if(fileReferences.length == 0) {
            return;
        }

        FoldingGroup group = FoldingGroup.newGroup("template");

        for(PsiElement fileReference: fileReferences) {
            final String templateShortcutName = TwigUtil.getFoldingTemplateName(fileReference.getText());
            if(templateShortcutName != null) {
                descriptors.add(new FoldingDescriptor(fileReference.getNode(),
View Full Code Here

Examples of com.intellij.openapi.editor.FoldingGroup

        if(psiElements.length == 0) {
            return;
        }

        FoldingGroup group = FoldingGroup.newGroup("route");
        Map<String,Route> routes = null;
        for(PsiElement psiElement1: psiElements) {

            // cache routes if we need them
            if(routes == null) {
View Full Code Here

Examples of com.intellij.openapi.editor.FoldingGroup

        if(constantReferences.length == 0) {
            return;
        }

        FoldingGroup group = FoldingGroup.newGroup("constant");

        for(PsiElement fileReference: constantReferences) {
            String contents = fileReference.getText();
            if(StringUtils.isNotBlank(contents) && contents.contains(":")) {
                final String[] parts = contents.split("::");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.