Package org.gradle.util

Examples of org.gradle.util.NameMatcher


            this.tasks = tasks;
            this.taskName = path;
            return;
        }

        NameMatcher matcher = new NameMatcher();
        String actualName = matcher.find(baseName, tasksByName.keySet());

        if (actualName != null) {
            // A partial match
            this.tasks = tasksByName.get(actualName);
            this.taskName = prefix + actualName;
            return;
        }

        throw new TaskSelectionException(matcher.formatErrorMessage("task", project));
    }
View Full Code Here


            path = path.substring(1);
        }
        for (String pattern : path.split(Project.PATH_SEPARATOR)) {
            Map<String, Project> children = current.getChildProjects();

            NameMatcher matcher = new NameMatcher();
            Project child = matcher.find(pattern, children);
            if (child != null) {
                current = child;
                continue;
            }

            throw new TaskSelectionException(matcher.formatErrorMessage("project", current));
        }

        return (ProjectInternal) current;
    }
View Full Code Here

            // An exact match
            return new TaskSelection(taskPath.getProject().getPath(), path, tasks);
        }

        Map<String, TaskSelectionResult> tasksByName = taskNameResolver.selectAll(taskPath.getProject(), !taskPath.isQualified());
        NameMatcher matcher = new NameMatcher();
        String actualName = matcher.find(taskPath.getTaskName(), tasksByName.keySet());
        if (actualName != null) {
            return new TaskSelection(taskPath.getProject().getPath(), taskPath.getPrefix() + actualName, tasksByName.get(actualName));
        }

        throw new TaskSelectionException(matcher.formatErrorMessage("task", taskPath.getProject()));
    }
View Full Code Here

            projectPath = projectPath.substring(1);
        }
        for (String pattern : projectPath.split(Project.PATH_SEPARATOR)) {
            Map<String, Project> children = current.getChildProjects();

            NameMatcher matcher = new NameMatcher();
            Project child = matcher.find(pattern, children);
            if (child != null) {
                current = child;
                continue;
            }

            throw new ProjectLookupException(matcher.formatErrorMessage("project", current));
        }

        return (ProjectInternal) current;
    }
View Full Code Here

TOP

Related Classes of org.gradle.util.NameMatcher

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.