Package com.intellij.ide.util.gotoByName

Examples of com.intellij.ide.util.gotoByName.GotoClassModel2


        return null;
    }

    public static ArrayList<String> searchClasses(String regex, Project project) {
        GotoClassModel2 model = new GotoClassModel2(project);
        Pattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
        ArrayList classesNamesFounded = new ArrayList<String>();
        String[] models = model.getNames(true);
        for (String clazz : models) {

            if (p.matcher(clazz).find()) {
                classesNamesFounded.add(clazz);
            }
View Full Code Here


     */
    @NotNull
    public static List<PsiElement> getPsiElementsFromClassesNames(List<String> classes, Project project) {
        List<PsiElement> psiElements = new ArrayList<PsiElement>();
        if (classes != null && project != null) {
            GotoClassModel2 model = new GotoClassModel2(project);
            for (String className : classes) {
                Object[] elements = model.getElementsByName(className, true, className);
                if (elements != null && elements.length > 0) {
                    for (Object element : elements) {
                        if (element instanceof PsiElement) {
                            psiElements.add((PsiElement) element);

View Full Code Here

TOP

Related Classes of com.intellij.ide.util.gotoByName.GotoClassModel2

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.