Examples of PhpClassAnnotationLookupElement


Examples of de.espend.idea.php.annotation.completion.lookupelements.PhpClassAnnotationLookupElement

        }

        private void attachLookupElements(Project project, Map<String, String> importMap, AnnotationTarget foundTarget, CompletionResultSet completionResultSet) {
            for(PhpAnnotation phpClass: getPhpAnnotationTargetClasses(project, foundTarget)) {
                PhpClassAnnotationLookupElement lookupElement = new PhpClassAnnotationLookupElement(phpClass.getPhpClass()).withInsertHandler(AnnotationTagInsertHandler.getInstance());
                String fqnClass = phpClass.getPhpClass().getPresentableFQN();

                if(fqnClass != null) {
                    if(!fqnClass.startsWith("\\")) {
                        fqnClass = "\\" + fqnClass;
                    }

                    for(Map.Entry<String, String> entry: importMap.entrySet()) {
                        if(fqnClass.startsWith(entry.getValue() + "\\")) {
                            lookupElement.withTypeText(entry.getKey() + fqnClass.substring(entry.getValue().length()));
                        }
                    }
                }

                completionResultSet.addElement(lookupElement);
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.