Package org.netbeans.gradle.model

Examples of org.netbeans.gradle.model.GenericModelFetcher


        for (int i = 0; i < builders.length; i++) {
            buildInfos.put(i, Collections.<GradleBuildInfoQuery<?>>singletonList(
                    InfoQueries.toCustomQuery(builders[i])));
        }
        return new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
    }
View Full Code Here


        for (int i = 0; i < builders.length; i++) {
            projectInfos.put(i, Collections.<GradleProjectInfoQuery<?>>singletonList(
                    InfoQueries.toCustomQuery(builders[i])));
        }
        return new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
    }
View Full Code Here

    public static GenericModelFetcher basicInfoFetcher() {
        Map<Object, List<GradleBuildInfoQuery<?>>> buildInfos = Collections.emptyMap();
        Map<Object, List<GradleProjectInfoQuery<?>>> projectInfos = Collections.emptyMap();
        Set<Class<?>> toolingModels = Collections.emptySet();

        return new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
    }
View Full Code Here

    public static BuilderResult fetchSingleBuildInfoWithError(
            ProjectConnection connection,
            BuildInfoBuilder<?> infoBuilder) throws IOException {

        GenericModelFetcher modelFetcher = buildInfoFetcher(infoBuilder);
        FetchedModels models = verifyNoError(modelFetcher.getModels(connection, defaultInit()));

        assertTrue(models.getDefaultProjectModels().getProjectInfoResults().isEmpty());

        return getSingleElement(models.getBuildInfoResults().get(0));
    }
View Full Code Here

    public static BuilderResult fetchSingleProjectInfoWithError(
            ProjectConnection connection,
            ProjectInfoBuilder<?> infoBuilder) throws IOException {

        GenericModelFetcher modelFetcher = projectInfoFetcher(infoBuilder);
        FetchedModels models = verifyNoError(modelFetcher.getModels(connection, defaultInit()));

        assertTrue(models.getBuildInfoResults().isEmpty());

        return getSingleElement(models.getDefaultProjectModels().getProjectInfoResults().get(0));
    }
View Full Code Here

    }

    public static GradleMultiProjectDef fetchProjectDef(
            ProjectConnection connection) throws IOException {

        GenericModelFetcher modelFetcher = basicInfoFetcher();
        FetchedModels models = verifyNoError(modelFetcher.getModels(connection, defaultInit()));

        return models.getDefaultProjectModels().getProjectDef();
    }
View Full Code Here

        buildInfos.put(0, Collections.<GradleBuildInfoQuery<?>>singletonList(
                InfoQueries.toCustomQuery(TestBuilders.testBuildInfoBuilder(prefix))));

        toolingModels.add(IdeaProject.class);

        final GenericModelFetcher fetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        runTestForSubProject("apps:app1", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                FetchedModels models = verifyNoError(fetcher.getModels(connection, TestUtils.defaultInit()));

                String buildInfo = (String)getSingleBuildResult(
                        models.getBuildInfoResults().get(0));
                assertEquals(prefix + ROOT_NAME, buildInfo);
View Full Code Here

        buildInfos.put(0, Collections.<GradleBuildInfoQuery<?>>singletonList(
                InfoQueries.toCustomQuery(TestBuilders.testBuildInfoBuilder(prefix))));

        toolingModels.add(IdeaProject.class);

        final GenericModelFetcher fetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        runTestForSubProject("apps:app1", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                FetchedModels models = verifyNoError(fetcher.getModels(connection, TestUtils.defaultInit()));

                String buildInfo = (String)getSingleBuildResult(
                        models.getBuildInfoResults().get(0));
                assertEquals(prefix + ROOT_NAME, buildInfo);
View Full Code Here

        buildInfos.put(4, Collections.<GradleBuildInfoQuery<?>>singletonList(
                InfoQueries.toQueryWithKnownClassPath(ConstBuilders.constBuildInfoBuilder(new SerializableObject()))));

        toolingModels.add(IdeaProject.class);

        final GenericModelFetcher fetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        runTestForSubProject("apps:app1", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                FetchedModels models = verifyNoError(fetcher.getModels(connection, TestUtils.defaultInit()));

                BuilderResult buildInfo1 = CollectionUtils
                        .getSingleElement(models.getBuildInfoResults().get(1));
                BuilderResult buildInfo2 = CollectionUtils
                        .getSingleElement(models.getBuildInfoResults().get(2));
View Full Code Here

        Map<Object, List<GradleBuildInfoQuery<?>>> buildInfos = Collections.emptyMap();
        Map<Object, List<GradleProjectInfoQuery<?>>> projectInfos = Collections.emptyMap();
        Set<Class<?>> toolingModels = new HashSet<Class<?>>(Arrays.asList(modelClasses));

        GenericModelFetcher modelFetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        FetchedModels models = verifyNoError(modelFetcher.getModels(connection, defaultInit()));

        return models.getDefaultProjectModels().getToolingModels();
    }
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.model.GenericModelFetcher

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.