Package fr.adrienbrault.idea.symfony2plugin.navigation

Examples of fr.adrienbrault.idea.symfony2plugin.navigation.NavigationItemEx


                    String serviceClass = getServiceCollector().resolve(name);
                    if (serviceClass != null) {
                        PhpClass phpClass = PhpElementsUtil.getClassInterface(this.project, serviceClass);
                        if(phpClass != null) {
                            processor.process(new NavigationItemEx(phpClass, containerService.getName(), containerService.isWeak() ? Symfony2Icons.SERVICE_PRIVATE_OPACITY : Symfony2Icons.SERVICE, "Service"));
                        }
                    }

                }
            }

            if(getTemplateMap().containsKey(name)) {
                VirtualFile virtualFile = getTemplateMap().get(name);
                PsiFile psiFile = PsiManager.getInstance(this.project).findFile(virtualFile);
                if(psiFile != null) {
                    processor.process(new NavigationItemEx(psiFile, name, psiFile.getFileType().getIcon(), "Template"));
                }
            }

            if(getRoutes().containsKey(name)) {
                String controllerName = getRoutes().get(name).getController();
                if(controllerName != null) {
                    for(PsiElement psiElement: RouteHelper.getMethodsOnControllerShortcut(this.project, controllerName)) {
                        processor.process(new NavigationItemEx(psiElement, name, Symfony2Icons.ROUTE, "Route"));
                    }
                }
            }

            if(getTwigMacroSet().contains(name)) {
                for(PsiElement macroTarget: TwigHelper.getTwigMacroTargets(project, name)) {
                    processor.process(new NavigationItemEx(macroTarget, name, TwigIcons.TwigFileIcon, "Macro"));
                }
            }

            if(getModelLookupElements().containsKey(name)) {
                PsiElement[] psiElements = EntityHelper.getModelPsiTargets(this.project, name);

                getModelLookupElements().get(name).getLookupString();
                for(PsiElement target: psiElements) {
                    processor.process(new NavigationItemEx(target, name, target.getIcon(0), "Entity"));
                }
            }

        }
View Full Code Here

TOP

Related Classes of fr.adrienbrault.idea.symfony2plugin.navigation.NavigationItemEx

Copyright © 2018 www.massapicom. 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.